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.
Reviewed: https:/ /review. fuel-infra. org/6476 ci/fuel- 6.1/2014. 2
Submitter: mos-infra-ci <>
Branch: openstack-
Commit: eb5cbb7fdbf2037 83fc8c1c463e804 910d061d46
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: unit/virt/ libvirt/ test_volume. py libvirt/ volume. py
nova/tests/
nova/virt/
Partial-Bug: #1443977
Change-Id: I77e6eda950726d 7ee9a0d92882d45 01e70a0d8f8