Comment 6 for bug 1443977

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/nova (openstack-ci/fuel-6.1/2014.2)

Reviewed: https://review.fuel-infra.org/6476
Submitter: mos-infra-ci <>
Branch: openstack-ci/fuel-6.1/2014.2

Commit: eb5cbb7fdbf203783fc8c1c463e804910d061d46
Author: Keiichi KII <email address hidden>
Date: Fri May 8 11:41:07 2015

libvirt: optimize multipath call to identify IQN

When detaching a multipath volume in an environment where there are
many attached volumes, excessive multipath calls are generated and
it takes too much time. This issue is due to the fact that a multipath -ll
call against many multipath devices takes a few seconds.

When detaching a volume, the current _disconnect_volume_multipath_iscsi()
calls 'multipath -ll <each iscsi device>' against every iscsi devices.
This behavior is to identify the IQNs used by multipath device, however
the IQNs are extracted from one 'multipath -ll' call without massive
'multipath -ll <each iscsi device>' calls.

This patch changes the behavior of identifying IQNs used by multipath device:

  1. add an utility to identify IQNs by using multipath device map
     (/dev/sdX => /dev/mapper/XXX) generated by parsing 'multipath -ll'.
  2. replace the current nested for loop to identify the IQNs with
     the utility.

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

Partial-Bug: #1443977

Change-Id: I77e6eda950726d7ee9a0d92882d4501e70a0d8f8