nova/nova
Hiroyuki Eguchi cca94d032b Fix connecting unnecessary iSCSI sessions issue
In Icehouse with "iscsi_use_multipath=true", attaching a multipath
iSCSI volume may create unnecessary iSCSI sessions.

The iscsiadm discovery command in connect_volume() returns all of the
targets in the Cinder node, not just the ones related to the multipath
volume which is specified by iqn. If the storage has many targets,
connecting to all these volumes will also result in many unnecessary
connections.

There are two types of iSCSI multipath devices. One which shares
the same iqn between multiple portals, and the other which use
different iqns on different portals. connect_volume() needs to
identify the type by checking iscsiadm the output if the iqn is
used by multiple portals.

This patch changes the behavior of attaching volume:

   1. Identify the type by checking the iscsiadm output.
   2. Connect to the correct targets by connect_to_iscsi_portal().

Closes-Bug: #1382440

(cherry picked from commit fb0de106f2)

Conflicts:
        nova/tests/unit/virt/libvirt/test_volume.py

Change-Id: I488ad0c09bf26a609e27d67b9ef60b65bb45e0ad
2014-12-26 09:38:03 +09:00
..
CA
api Fix XML UnicodeEncode serialization error 2014-10-17 09:07:01 -07:00
cells Fix CellStateManagerFile init to failure 2014-10-06 08:55:10 +01:00
cert Remove vi modelines 2014-02-03 14:19:44 +00:00
cloudpipe Remove vi modelines 2014-02-03 14:19:44 +00:00
cmd Fix the wrong dest of 'vlan' option and add new 'vlan_start' option 2014-06-30 01:16:56 +00:00
compute Merge "Fix nova evacuate issues for RBD" into stable/icehouse 2014-11-23 04:12:10 +00:00
conductor InvalidCPUInfo exception added to except block 2014-04-22 13:55:37 -04:00
console Enable flake8 H404 checking 2014-02-27 11:15:55 +04:00
consoleauth Move consoleauth_manager option into nova.service and fix imports 2014-02-15 08:38:42 -08:00
db Add @_retry_on_deadlock to _instance_update() 2014-10-21 17:17:05 -04:00
hacking Revert "Adding image multiple location support" 2014-03-12 08:27:20 -07:00
image Catch missing Glance image attrs with None 2014-08-22 19:31:42 -07:00
ipv6 Remove vi modelines 2014-02-03 14:19:44 +00:00
keymgr Enable flake8 H404 checking 2014-02-27 11:15:55 +04:00
locale Fix Jenkins translation jobs 2014-04-08 11:03:04 +02:00
network share neutron admin auth tokens 2014-10-15 13:33:10 +00:00
objects Fix FloatingIP.save() passing FixedIP object to sqlalchemy 2014-08-07 23:48:15 -04:00
objectstore Add HEAD api response for test s3 server BucketHandler 2014-02-09 01:16:33 +08:00
openstack Merge "Add _wrap_db_error() support to SessionTransaction.commit()" into stable/icehouse 2014-11-08 11:38:14 +00:00
pci Enable flake8 H404 checking 2014-02-27 11:15:55 +04:00
rdp Adds RDP console support 2014-02-07 21:20:08 +02:00
scheduler Scheduler: enable scheduler hint to pass the group name 2014-07-07 09:45:27 -04:00
servicegroup Change initial delay for servicegroup api reporting 2014-03-19 12:13:57 -06:00
spice Remove vi modelines 2014-02-03 14:19:44 +00:00
storage Fix live-migration failure in FC multipath case 2014-09-24 15:39:50 +08:00
tests Fix connecting unnecessary iSCSI sessions issue 2014-12-26 09:38:03 +09:00
virt Fix connecting unnecessary iSCSI sessions issue 2014-12-26 09:38:03 +09:00
vnc Remove vi modelines 2014-02-03 14:19:44 +00:00
volume Retry on closing of luks encrypted volume in case device is busy 2014-10-24 09:57:03 +00:00
__init__.py Remove vi modelines 2014-02-03 14:19:44 +00:00
availability_zones.py Merge "Fixing availability-zone not take effect error" 2014-02-02 08:08:40 +00:00
baserpc.py Port to oslo.messaging 2014-02-01 09:53:24 +00:00
block_device.py Fix BDM legacy usage with objects 2014-03-06 13:17:27 -08:00
config.py Re-work how debugger CLI opts are registered 2014-03-25 06:44:50 -04:00
context.py Enable flake8 H404 checking 2014-02-27 11:15:55 +04:00
crypto.py Remove vi modelines 2014-02-03 14:19:44 +00:00
debugger.py Re-work how debugger CLI opts are registered 2014-03-25 06:44:50 -04:00
exception.py Fixes missing ec2 api address disassociate error on failure 2014-10-03 14:10:40 +09:30
filters.py Merge "Fixes typos in the files in the nova folder" 2013-10-14 09:34:14 +00:00
hooks.py Remove vi modelines 2014-02-03 14:19:44 +00:00
loadables.py
manager.py add support for host driver cleanup during shutdown 2014-03-14 12:01:34 -04:00
netconf.py Enable flake8 H404 checking 2014-02-27 11:15:55 +04:00
notifications.py Remove vi modelines 2014-02-03 14:19:44 +00:00
paths.py Reverts change to default state_path 2014-03-12 17:49:42 +00:00
policy.py Adds unit test for etc/nova/policy.json data 2014-02-28 07:24:32 +01:00
quota.py Enable flake8 H404 checking 2014-02-27 11:15:55 +04:00
rpc.py Serialize the notification payload in json 2014-02-20 11:42:40 +01:00
safe_utils.py Remove vi modelines 2014-02-03 14:19:44 +00:00
service.py Handle service creation race by service workers 2014-07-21 16:14:42 +01:00
test.py Turn periodic tasks off in all unit tests 2014-07-24 20:45:44 +00:00
utils.py Avoid possible timing attack in metadata api 2014-07-23 12:45:06 +10:00
version.py Remove vi modelines 2014-02-03 14:19:44 +00:00
weights.py Using six.add_metaclass 2014-02-11 09:45:20 +08:00
wsgi.py Nova api service doesn't handle SIGHUP properly 2014-10-21 08:07:17 +00:00