** Changed in: nova Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1403836
Title: Nova volume attach fails for a iscsi disk with CHAP enabled. Status in OpenStack Compute (nova): Fix Released Status in os-win: Fix Released Bug description: I was trying nova volume attach of a disk with CHAP enabled on Windows(HyperV driver), I notice that the attach volume fails with CHAP authentication enforced and the same works without CHAP authentication set. My current setup is Juno based: I saw a similar bug reported as https://bugs.launchpad.net/nova/+bug/1397549 . The fix of which is as per https://review.openstack.org/#/c/137623/ and https://review.openstack.org/#/c/134592/ . Even after incorporating these changes things do not work and it needs an additional fix. Issue: The issue even after having the code as in the commits mentioned earlier is that – when we try to do nova volume-attach , on Hyperv host we first do a login to portal , then attach the volume to target. Now, if we login to portal without chap authentication – it will fail (Authentication failure) and hence the code needs to be changed here (https://github.com/openstack/nova/blob/master/nova/virt/hyperv/volumeutilsv2.py#L64-65 ) . Resoultion: While creating/adding the new portal we need to add it with the CHAP credentials (as the way it is done on target.connect) . Sample snippet of the fix would be; if portal: portal[0].Update() else: # Adding target portal to iscsi initiator. Sending targets LOG.debug("Create a new portal") auth = {} if auth_username and auth_password: auth['AuthenticationType'] = self._CHAP_AUTH_TYPE auth['ChapUsername'] = auth_username auth['ChapSecret'] = auth_password LOG.debug(auth) portal = self._conn_storage.MSFT_iSCSITargetPortal portal.New(TargetPortalAddress=target_address, TargetPortalPortNumber=target_port, **auth) To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1403836/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp