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>
Reviewed: https:/ /review. fuel-infra. org/8263 ci/fuel- 7.0/2015. 1.0
Submitter: mos-infra-ci <>
Branch: openstack-
Commit: c593c1feb590d8e 17e50ebd0c3e421 770a6aa8dc
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: I77e6eda950726d 7ee9a0d92882d45 01e70a0d8f8
Closes-Bug: #1443977