From f73173771bd2a5e623c27ce1aeb198ecf6d16fae Mon Sep 17 00:00:00 2001 From: Imran Ansari Date: Wed, 11 Apr 2018 11:33:23 +0530 Subject: [PATCH] Fixed issue #58 iSCSI plugin: Volume mount request fails when host entry is already present in 3PAR array --- hpedockerplugin/hpe/hpe_3par_iscsi.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/hpedockerplugin/hpe/hpe_3par_iscsi.py b/hpedockerplugin/hpe/hpe_3par_iscsi.py index 694e26fc..14899dfc 100644 --- a/hpedockerplugin/hpe/hpe_3par_iscsi.py +++ b/hpedockerplugin/hpe/hpe_3par_iscsi.py @@ -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):