Volume discovery and local storage management lib
Go to file
Gorka Eguileor 56c8665d3d Refactor iSCSI connect
This patch refactors iSCSI connect code changing the approach to one
that relies primarily on sysfs, instead of CLI tools, to retrieve all
the required information: devices from the connection, multipath system
device name, multipath name, the WWN for the block devices...

By doing so, not only do we fix a good number of bugs, but we also
improve the reliability and speed of the mechanism.

A good example of improvements and benefits achieved by this patch are:

- Clean all leftovers on exceptions on a connection.

- Parallelize logins on multipath to increase speed on flaky network
  connections.

- As long as there is at least one good path when working with multipath
  we will return a multipath device instead of a single path device,
  which helps with temporary flaky connections.

- Don't use the rescan retry parameter as log in retry on multipath
  connections so both single and multipath cases are consistent.

- We no longer rely on just one device to get the wwn and look for the
  multipath.  This would be problematic with flaky connections.

- No more querying iSCSI devices for their WWN (page 0x83) removing
  delays and issue on flaky connections.

- It's no longer a problem for the mechanism the fact that a device
  exists but is not accessible.

- We use links in `/dev/disk/by-id` to get the WWID on connect, so we
  make sure there are no leftovers on disconnect, but we no longer use
  symlinks from `/dev/disk/by-path`, `/dev/disk/by-id`, or `/dev/mapper`
  to find devices.

- We no longer need to rely on the WWN to determine the multipath, we
  have the session and the LUN, so we trace the devices and from those
  we get if they belong to a multipath.

- Stop polluting the logs with unnecessary exceptions from checking if
  the node or session exist.

- Action retries will now only log the final exception instead of
  logging all the exceptions.

- Warn when a multipath could not be formed and a single device is being
  used, as performance will be degraded.

- We no longer do global rescans on single connections that could be
  bringing in unrelated and unwanted devices (`iscsiadm -T iqn -p portal
  --rescan`).

- Fix scan mechanism that would not request all scans when the same iqn
  was shareed between portals and could send a scan request to the wrong
  IP if they shared the same iqn.

- When doing single pathed connections we could end with a multipath
  because we didn't clean up unfruitful connections.

It's worth mentioning that this patch does not touch the extend
operation.

Change-Id: Ia1c47bfaa7bc3544a5feba6a8a30faf2f132b8d7
2017-06-16 16:09:35 +02:00
doc/source Retire ISERConnector from documentation 2016-04-27 05:48:08 -04:00
etc/os-brick/rootwrap.d Trivial rootwrap -> privsep replacement 2016-04-15 15:29:25 +00:00
os_brick Refactor iSCSI connect 2017-06-16 16:09:35 +02:00
releasenotes Refactor iSCSI connect 2017-06-16 16:09:35 +02:00
tools Stop ignoring H405 hacking rule in tox 2017-05-24 00:44:57 +02:00
.coveragerc Fix coverage generation 2016-04-20 15:52:31 +00:00
.gitignore Add ignore for . directories 2016-07-22 17:02:41 +00:00
.gitreview Correct project name in .gitreview 2015-03-18 13:00:51 +01:00
.mailmap Created the Brick library from Cinder 2015-01-22 19:09:30 +00:00
.testr.conf Created the Brick library from Cinder 2015-01-22 19:09:30 +00:00
CONTRIBUTING.rst Update the documentation for os-brick 2015-02-19 14:37:13 -08:00
HACKING.rst Created the Brick library from Cinder 2015-01-22 19:09:30 +00:00
LICENSE Created the Brick library from Cinder 2015-01-22 19:09:30 +00:00
README.rst Show team and repo badges on README 2016-11-25 13:40:47 +01:00
babel.cfg Created the Brick library from Cinder 2015-01-22 19:09:30 +00:00
bindep.txt Add libssl to bindep 2017-06-08 06:14:15 -05:00
pylintrc Add pylint tox env 2016-04-04 18:02:19 -04:00
requirements.txt Updated from global requirements 2017-05-26 17:26:52 +00:00
setup.cfg Add Python 3.5 classifier and venv 2017-01-23 08:21:39 +07:00
setup.py Updated from global requirements 2017-03-10 19:12:09 +00:00
test-requirements.txt Update hacking version to align with Cinder 2017-05-24 00:08:24 +02:00
tox.ini Removed invalid comments in tox.ini [flake8] 2017-05-24 00:44:57 +02: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-gdbm (for Debian derived distributions), Python 2.7 and Python 3.4. A recent tox is required, as is a recent virtualenv (13.1.0 or newer).

If "tox -e py34" fails with the error "db type could not be determined", remove the .testrepository/ directory and then run "tox -e py34".

For any other information, refer to the developer documents:

http://docs.openstack.org/developer/os-brick/index.html

OR refer to the parent project, Cinder:

http://docs.openstack.org/developer/cinder/