Comment 14 for bug 1443977

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

Reviewed: https://review.fuel-infra.org/8263
Submitter: mos-infra-ci <>
Branch: openstack-ci/fuel-7.0/2015.1.0

Commit: c593c1feb590d8e17e50ebd0c3e421770a6aa8dc
Author: Keiichi KII <email address hidden>
Date: Thu Jul 16 08:22:44 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.

Co-Authored-By: Pavel Kholkin <email address hidden>

Change-Id: I77e6eda950726d7ee9a0d92882d4501e70a0d8f8
Closes-Bug: #1443977