nova/nova/virt
Takashi NATSUME be553fb155 Set 'serial' to new volume ID in swap volumes
In swap_volume method of nova/virt/libvirt/driver.py,
before BDM was got by using the instance's UUID and
'serial' of new connection_info as the volume ID,
and driver BDM was updated by using the BDM.
('serial' has the volume ID information.)
But in _init_volume_connection method in ComputeManager class,
'serial' is passed from old connection_info to new connection_info.

It works fine in the case that cinder initiates swapping volumes
because the ID of the attached volume isn't changed after
swapping volumes.
But in the case that nova initiates swapping volumes,
the ID of the attached volume is changed.

So in the case that nova initiated swapping volumes,
after swap volume function was performed once,
BDM was got by wrong old volume id (serial)
when swap volume function was performed for the second time.

So if 'serial' of new connection_info is None,
it is set to new volume ID.
And if cinder 'migrate_volume_completion' API returns
old volume ID (the case that cinder initiates swapping volumes),
the 'serial' of new connection_info is set to old volume ID.
If cinder 'migrate_volume_completion' API returns new volume ID
(the case that nova initiated swapping volumes),
the 'serial' is left as it is (new volume ID).

Change-Id: I86b8fbb09b0f1ed4c667683de3827cd9b63bca7f
Closes-Bug: #1490236
2016-09-12 00:31:20 +00:00
..
disk Merge "Don't use locals() and globals(), use a dict instead" 2016-07-25 20:51:16 +00:00
hyperv Merge "Add support for vd2 user context to other drivers" 2016-08-31 02:40:59 +00:00
image libvirt: virtuozzo instance resize support 2016-06-28 22:13:49 +03:00
ironic Merge "Add support for vd2 user context to other drivers" 2016-08-31 02:40:59 +00:00
libvirt Set 'serial' to new volume ID in swap volumes 2016-09-12 00:31:20 +00:00
vmwareapi Merge "Add support for vd2 user context to other drivers" 2016-08-31 02:40:59 +00:00
xenapi Merge "Add support for vd2 user context to other drivers" 2016-08-31 02:40:59 +00:00
__init__.py Declare nova.virt namespace 2016-04-28 15:01:44 +00:00
block_device.py Remove virt.block_device._NoLegacy exception 2016-06-16 09:31:25 +01:00
configdrive.py Config options: centralize "configdrive" options 2016-04-06 09:35:51 +03:00
diagnostics.py
driver.py virt: handle unicode when logging LifecycleEvents 2016-09-08 11:14:52 -04:00
event.py Add 'suspended' lifecycle event 2015-04-03 03:59:20 +03:00
fake.py driver.pre_live_migration migrate_data is always an object 2016-08-22 12:12:24 -04:00
firewall.py Fix spelling mistake 2016-06-28 08:41:09 +02:00
hardware.py virt/hardware: Check for threads when "required" 2016-08-09 18:14:25 +00:00
imagecache.py Rename ImageCacheManager._list_base_images to _scan_base_images 2016-05-26 14:45:42 +01:00
images.py virt/image: between two words without a space in output message 2016-08-11 20:27:58 +08:00
interfaces.template Fixes interfaces template identification issue 2014-12-07 17:52:34 +02:00
netutils.py Fix network mtu in network_metadata 2016-05-15 11:45:23 +02:00
osinfo.py Trivial-Fix: Fix typos 2016-06-13 06:41:08 +00:00
storage_users.py Use oslo.log 2015-02-22 07:56:40 -05:00
virtapi.py Remove unused provider firewall rules functionality in nova 2016-02-01 15:50:04 +01:00
volumeutils.py nova.utils._get_root_helper() should be public 2015-08-19 04:00:50 +00:00
watchdog_actions.py