Rajat Dhasmana d3f4f3b45e iSCSI: wait for multipathd to remove paths
While disconnecting the volume, we flush the multipath device,
execute ``multipath del path`` and remove the individual
devices before finishing the operation.
There is an issue with the said order as removing individual
devices already triggers the uevent for multipathd to remove
the paths but it doesn't happen immediately.
With change[1], we tried to mitigate the issue by executing
``multipath del path`` manually but this also generates
another uevent for multipathd and doesn't guarantee that the
devices are removed synchronously from multipathd monitoring.
Overall, we are just increasing the number of uevents and
not guaranteeing that the paths are removed before we
return the call to caller (nova or cinder or glance).

This patch addresses the issue by waiting for the paths to
be removed from multipathd monitoring by introducing a
call to ``multipathd show paths raw format "%d" `` with an
exponential backoff. This ensures that the paths are not
monitored anymore before os-brick claims the removal of
devices and returns the call.
As a last mechanism, if the devices are still monitored
by multipathd, we execute the ``multipath del path``
command manually to make sure we tried our best to
remove the devices from multipathd monitoring.

[1] https://review.opendev.org/c/openstack/os-brick/+/785818

Closes-Bug: #2136842

Change-Id: Ie08f9bcbaf31390c33f74d95dde2798e9287a582
Signed-off-by: Rajat Dhasmana <rajatdhasmana@gmail.com>
2025-12-19 16:39:15 +00:00
2025-02-12 09:12:05 -05:00
2016-04-20 15:52:31 +00:00
2019-04-19 19:34:25 +00:00
2015-01-22 19:09:30 +00:00
2023-04-25 09:09:38 -04:00
2017-10-02 17:35:26 -05:00
2023-09-01 17:48:18 -04:00
2019-01-18 21:30:00 -05:00
2015-01-22 19:09:30 +00:00
2022-08-25 14:00:42 +00:00
2024-04-03 12:03:57 -04:00
2025-06-26 02:14:07 +00:00
2020-04-05 17:43:12 +02:00

Team and repository tags

image

brick

Latest Version

Downloads

OpenStack Cinder brick library for managing local volume attaches

Features

  • Discovery of volumes being attached to a host for many transport protocols.
  • Removal of volumes from a host.

Hacking

Hacking on brick requires Python 3.8+. A recent tox is required, as is a recent virtualenv (20.2.2 or newer).

For any other information, refer to the developer documents:

https://docs.openstack.org/os-brick/latest/

OR refer to the parent project, Cinder:

https://docs.openstack.org/cinder/latest/

Release notes for the project can be found at:

https://docs.openstack.org/releasenotes/os-brick

Description
Volume discovery and local storage management lib
Readme 32 MiB
Languages
Python 99.6%
Shell 0.4%