Gorka Eguileor 1905398f61 Fix iSCSI cleanup issue when using discovery
With the latest iSCSI disconnect refactoring [1] we have introduced a
regression where not all devices are properly cleaned up on a multipath
connection if we are using target discovery.

On connection we do the discovery so we get the targets, but on
disconnection  the code is expecting to have all the ips, iqns, and luns
information on the connection properties, so it will only flush the
multipath and disconnect volumes that were connected using the
information from the connection property.

This patch fixes this retrieving the targets information from the
discoverydb that was gathered during the connection phase.

Output from discoverydb query looks like this:

 SENDTARGETS:
 DiscoveryAddress: 192.168.1.33,3260
 DiscoveryAddress: 192.168.1.2,3260
 Target: iqn.2004-04.com.qnap:ts-831x:iscsi.cinder-20170531114245.9eff88
     Portal: 192.168.1.3:3260,1
         Iface Name: default
     Portal: 192.168.1.2:3260,1
         Iface Name: default
 Target: iqn.2004-04.com.qnap:ts-831x:iscsi.cinder-20170531114447.9eff88
     Portal: 192.168.1.3:3260,1
         Iface Name: default
     Portal: 192.168.1.2:3260,1
         Iface Name: default
 DiscoveryAddress: 192.168.1.38,3260
 iSNS:
 No targets found.
 STATIC:
 No targets found.
 FIRMWARE:
 No targets found.

[1] https://review.openstack.org/455392

Change-Id: Iada5d4fbeb07aeaf3afb953a289b6b89778c382c
Closes-Bug: #1699061
2017-06-20 15:57:22 +02:00
2016-04-20 15:52:31 +00:00
2016-07-22 17:02:41 +00:00
2015-03-18 13:00:51 +01:00
2015-01-22 19:09:30 +00:00
2017-06-08 06:14:15 -05:00
2015-01-22 19:09:30 +00:00
2016-04-04 18:02:19 -04:00
2016-11-25 13:40:47 +01:00
2017-01-23 08:21:39 +07:00
2017-03-10 19:12:09 +00: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-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/

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