Hyper-V is trying to log in to portals/targets every time a volume
is attached, even if the portal/target was already connected. This
is not an issue with most volume backends, but it causes the attach
to fail when using Storwize as a Cinder backend.
This patch fixes the issue by checking if the target or portal is
already connected, and simply perform an update in this case,
instead of attempting to create a new connection.
Also, a retry loop is introduced for the case when the iSCSI target
login fails. As in this loop it is checked whether or not the
operation completed successfully, this method does not rely anymore
only on a sleep interval to ensure that the connection to the target
has been made. Even so, on V2 volume utilities, the sleep interval
is still needed to avoid having a new connection attempt before the
last one finished.
The method which gets the according mounted disk must raise an
exception when the device number is -1, which signifies that the
disk has not been mounted properly.
Reviewed: https:/ /review. openstack. org/92866 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=ea91ad2b231 7cb88fb14c0cdaf 31187eca93ff57
Committed: https:/
Submitter: Jenkins
Branch: master
commit ea91ad2b2317cb8 8fb14c0cdaf3118 7eca93ff57
Author: Lucian Petrut <email address hidden>
Date: Thu May 8 18:46:22 2014 +0300
Fixes Hyper-V iSCSI target login method
Hyper-V is trying to log in to portals/targets every time a volume
is attached, even if the portal/target was already connected. This
is not an issue with most volume backends, but it causes the attach
to fail when using Storwize as a Cinder backend.
This patch fixes the issue by checking if the target or portal is
already connected, and simply perform an update in this case,
instead of attempting to create a new connection.
Also, a retry loop is introduced for the case when the iSCSI target
login fails. As in this loop it is checked whether or not the
operation completed successfully, this method does not rely anymore
only on a sleep interval to ensure that the connection to the target
has been made. Even so, on V2 volume utilities, the sleep interval
is still needed to avoid having a new connection attempt before the
last one finished.
The method which gets the according mounted disk must raise an
exception when the device number is -1, which signifies that the
disk has not been mounted properly.
Co-Authored-By: Jay Bryant <email address hidden>
Closes-bug: #1221525
Change-Id: I92d2a586704fa3 e857f46432bb571 c81e86d183b