Comment 3 for bug 1443977

Revision history for this message
OSCI Robot (oscirobot) wrote : Fix merged to openstack/nova (openstack-ci/fuel-6.0-updates/2014.2)

Reviewed: https://review.fuel-infra.org/6189
Committed: https://review.fuel-infra.org/gitweb?p=openstack/nova.git;a=commitdiff;h=4495e8d8e7a3052cf04a5ceaf8d01d85c0c6c128
Submitter: mos-infra-ci
Branch: openstack-ci/fuel-6.0-updates/2014.2

commit 4495e8d8e7a3052cf04a5ceaf8d01d85c0c6c128
Author: Alexandr Nevenchannyy <email address hidden>

Fix connecting unnecessary iSCSI sessions issue

In Icehouse 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().

(cherry picked from commit fb0de106f2f15604750bafc318ba06c41070cc35)

Conflicts:
        nova/tests/unit/virt/libvirt/test_volume.py

Change-Id: I488ad0c09bf26a609e27d67b9ef60b65bb45e0ad

Change-Id: I926f50eaf4ea9384de376f2a4b07cac98f82a3b0
Closes-bug: #1443974
Closes-bug: #1443977