Volume discovery and local storage management lib
Go to file
Rajat Dhasmana 985ef3cc45 Fix: FC partial target scan
When fetching the target value (T in HCTL) for the storage HBAs,
we use the /sys/class/fc_transport path to find available targets.
However, this path only contains targets that already have a LUN
attached from, to the host.

Scenario:
If we have 2 controllers on the backend side with 4 target HBAs each (total 8).
For the first LUN mapping from controller1, we will do a wildcard
scan and find the 4 targets from controller1 which will get
populated in the /fc_transport path.
If we try mapping a LUN from controller2, we try to find targets in the
fc_transport path but the path only contains targets from controller1 so
we will not be able to discover the LUN from controller2 and fail with
NoFibreChannelVolumeDeviceFound exception.

Solution:
In each rescan attempt, we will first search for targets in the
fc_transport path: "/sys/class/fc_transport/target<host>*".
If the target in not found then we will search in the fc_remote_ports
path: "/sys/class/fc_remote_ports/rport-<host>*"

If a [c,t,l] combination is found from either path, we add it to
the list of ctls we later use it for scanning.

This way, we don't alter the current "working" mechanism of scanning
but also add an additional way of discovering targets and improving
the scan to avoid failure scenarios in each rescan attempt.

Closes-Bug: #2051237
Change-Id: Ia74b0fc24e0cf92453e65d15b4a76e565ed04d16
(cherry picked from commit f2154eedf0)
2024-02-15 12:56:04 +00:00
doc [docs] add autodoc_mock_imports 2023-07-21 08:27:57 -04:00
etc/os-brick/rootwrap.d Trivial rootwrap -> privsep replacement 2016-04-15 15:29:25 +00:00
os_brick Fix: FC partial target scan 2024-02-15 12:56:04 +00:00
releasenotes Fix: FC partial target scan 2024-02-15 12:56:04 +00:00
tools mypy: work around mypy bug #13214 2022-08-18 14:04:26 -04:00
.coveragerc Fix coverage generation 2016-04-20 15:52:31 +00:00
.gitignore Add mypy-report directory to .gitignore 2022-08-25 09:03:04 -04:00
.gitreview Update .gitreview for stable/2023.2 2023-09-08 14:55:36 +00:00
.mailmap Created the Brick library from Cinder 2015-01-22 19:09:30 +00:00
.stestr.conf Add .stestr.conf configuration 2017-10-02 17:35:26 -05:00
.zuul.yaml Use generic testing template 2023-09-08 16:18:11 +00:00
CONTRIBUTING.rst Ussuri contrib docs community goal 2020-03-05 09:11:33 -05:00
HACKING.rst Update hacking version 2019-01-18 21:30:00 -05:00
LICENSE Created the Brick library from Cinder 2015-01-22 19:09:30 +00:00
README.rst Update README to drop py3.6 reference 2022-07-12 13:56:33 -04:00
bindep.txt bindep: remind people to sync the dependencies with devstack 2020-08-14 00:50:08 +02:00
mypy-files.txt mypy: lvm.py 2022-08-25 14:00:42 +00:00
pylintrc Add pylint tox env 2016-04-04 18:02:19 -04:00
requirements.txt Update minimum requirements in os-brick 2023-02-09 15:55:40 +00:00
setup.cfg Merge "Set packages in setup.cfg" 2023-04-21 16:39:09 +00:00
setup.py Cleanup py27 support 2020-04-05 17:43:12 +02:00
test-requirements.txt Bump mypy to 1.2.0 2023-05-02 09:35:21 -04:00
tox.ini Update TOX_CONSTRAINTS_FILE for stable/2023.2 2023-09-08 14:55:37 +00:00

README.rst

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