Go to file
Gorka Eguileor 05a4c05c14 NVMe-oF: Disconnect subsystems
Current code doesn't disconnect NVMe-oF subsystems when doing a
disconnect_volume or on connect_volume failure.

This is very problematic for systems that don't share subsytems for
multiple namespaces, because both the device (i.e., /dev/nvme0n1) and
the subsystem (i.e., /dev/nvme0) will stay forever (now that we connect
with the controller loss timeout set to infinite, before it was for 10
minutes) in the system (until manually removed) while the host keeps
trying to connect to the remote subsystem, but it won't be able to
connect because in this case drivers usually destroy both the namespace
and the subsystem simultaneously (so there's no AER message to indicate
the change in available namespaces within the subsystem).

We'll experience multiple issues with all these leftover devices, such
as an ever increasing number of kernel log messages with the connection
retries, possible exhaustion of number of connected NVMe subsystems
and/or files in /dev, and so on.

This patch makes sure the nvmeof connector disconnects a subsystem when
there is no longer a namespace present or when the only namespace
present is the one we are disconnecting. This is done both on the
disconnect_volume call as well as failures during connect_volume.

This is not a full solution to the problem of leaving leftover devices,
because for drivers that share the subsystem there are race conditions
between unexport/unmap of volumes on the cinder side and os-brick
disconnect_volume calls.  To fully prevent this situation Cinder needs
to start reporting the shared_targets value for NVMe volumes (something
it's already doing for iSCSI).

Partial-Bug: #1961102
Change-Id: Ia00be53420307d6ac1f100420d039da7b65dc349
2022-07-26 16:27:01 +02:00
2022-07-19 12:40:57 +02:00
2022-07-26 16:27:01 +02:00
2021-07-15 14:08:28 -04: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
2017-10-02 17:35:26 -05:00
2019-01-18 21:30:00 -05:00
2015-01-22 19:09:30 +00:00
2022-07-19 12:40:57 +02:00
2016-04-04 18:02:19 -04:00
2022-07-15 09:21:19 +00:00
2020-04-05 17:43:12 +02:00
2022-05-24 15:01:13 +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%