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
Team and repository tags
brick
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:
- OR refer to the parent project, Cinder:
- License: Apache License, Version 2.0
- Source: http://git.openstack.org/cgit/openstack/os-brick
- Bugs: http://bugs.launchpad.net/os-brick
Description
Languages
Python
99.6%
Shell
0.4%