Skip to content

Commit

Permalink
Fixed issue hpe-storage#58
Browse files Browse the repository at this point in the history
iSCSI plugin: Volume mount request fails when host entry is already present in 3PAR array
  • Loading branch information
imran-ansari committed Apr 11, 2018
1 parent ed21d8e commit f731737
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions hpedockerplugin/hpe/hpe_3par_iscsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,32 +445,19 @@ def _create_host(self, common, volume, connector, is_snap):
connector['initiator'],
domain,
persona_id)
self._set_3par_chaps(common, hostname, volume, username, password)
host = common._get_3par_host(hostname)
else:
if 'iSCSIPaths' not in host or len(host['iSCSIPaths']) < 1:
self._modify_3par_iscsi_host(
common, hostname,
connector['initiator'])
self._set_3par_chaps(
common,
hostname,
volume,
username,
password)
host = common._get_3par_host(hostname)
elif (not host['initiatorChapEnabled'] and
self.configuration.hpe3par_iscsi_chap_enabled):
LOG.warning(_LW("Host exists without CHAP credentials set and "
"has iSCSI attachments but CHAP is enabled. "
"Updating host with new CHAP credentials."))
self._set_3par_chaps(
common,
hostname,
volume,
username,
password)

self._set_3par_chaps(common, hostname, volume, username, password)
host = common._get_3par_host(hostname)
return host, username, password

def _do_export(self, common, volume, connector, is_snap):
Expand Down

0 comments on commit f731737

Please sign in to comment.