With "iscsi_use_multipath=true", attaching a multipath
iSCSI volume may create unnecessary iSCSI sessions.
The iscsiadm discovery command in connect_volume() returns all of
the targets in the Cinder node, not just the ones related to
the multipath volume which is specified by iqn. If the storage
has many targets, connecting to all these volumes will also
result in many unnecessary connections.
There are two types of iSCSI multipath devices.
One which shares the same iqn between multiple portals,
and the other which use different iqns on different portals.
connect_volume() needs to identify the type by checking iscsiadm
the output if the iqn is used by multiple portals.
This patch changes the behavior of attaching volume:
1. Identify the type by checking the iscsiadm output.
2. Connect to the correct targets by connect_to_iscsi_portal().
(Ported from I488ad0c09bf26a609e27d67b9ef60b65bb45e0ad)
Reviewed: https:/ /review. openstack. org/188159 /git.openstack. org/cgit/ openstack/ os-brick/ commit/ ?id=a8386d5cbe7 32a4e3f4daf836a 6efdf69ee6e11f
Committed: https:/
Submitter: Jenkins
Branch: master
commit a8386d5cbe732a4 e3f4daf836a6efd f69ee6e11f
Author: Tomoki Sekiyama <email address hidden>
Date: Wed Jun 3 13:42:34 2015 -0400
Fix connecting unnecessary iSCSI sessions issue
With "iscsi_ use_multipath= true", attaching a multipath
iSCSI volume may create unnecessary iSCSI sessions.
The iscsiadm discovery command in connect_volume() returns all of
the targets in the Cinder node, not just the ones related to
the multipath volume which is specified by iqn. If the storage
has many targets, connecting to all these volumes will also
result in many unnecessary connections.
There are two types of iSCSI multipath devices. volume( ) needs to identify the type by checking iscsiadm
One which shares the same iqn between multiple portals,
and the other which use different iqns on different portals.
connect_
the output if the iqn is used by multiple portals.
This patch changes the behavior of attaching volume:
1. Identify the type by checking the iscsiadm output. to_iscsi_ portal( ).
2. Connect to the correct targets by connect_
(Ported from I488ad0c09bf26a 609e27d67b9ef60 b65bb45e0ad)
Co-Authored-By: Hiroyuki Eguchi <email address hidden> a55772709242eed 69c10168c0f
Related-Bug: #1382440
Change-Id: I4c9b173cfab387