nova/nova/tests/unit/virt/libvirt
Matthew Booth 2cfdb9c056 libvirt: Don't VIR_MIGRATE_NON_SHARED_INC without migrate_disks
If we specify block migration, but there are no disks which actually
require block migration we call libvirt's migrateToURI3() with
VIR_MIGRATE_NON_SHARED_INC in flags and an empty migrate_disks in
params. Libvirt interprets this to be the default block migration
behaviour of "block migrate all writeable disks". However,
migrate_disks may only be empty because we filtered attached volumes
out of it, in which case libvirt will block migrate attached volumes.
This is a data corruptor.

This change addresses the issue at the point we call migrateToURI3().
As we never want the default block migration behaviour, we can safely
remove the flag if the list of disks to migrate is empty.

(cherry picked from commit ea9bf5216b)

nova/tests/unit/virt/libvirt/test_driver.py:
  Explicitly asserts byte string destination_xml in
  _test_live_migration_block_migration_flags. Not required in master
  due to change I85cd9a90.

(cherry picked from commit 2486f34ec4)

Change-Id: I9b545ca8aa6dd7b41ddea2d333190c9fbed19bc1
Resolves-bug: #1719362
2018-02-19 21:50:26 +00:00
..
storage Merge "Fix decoding of encryption key passed to dmcrypt" into stable/ocata 2017-05-23 23:31:32 +00:00
volume libvirt: handle missing rbd_secret_uuid from old connection info 2017-06-12 09:16:49 -04:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fake_imagebackend.py libvirt: update logic to configure device for scsi controller 2017-07-28 06:06:59 -04:00
fake_libvirt_utils.py libvirt: ephemeral disk support for virtuozzo containers 2017-01-26 14:19:08 +03:00
fake_os_brick_connector.py Switch to using os-brick 2015-07-27 10:47:22 -07:00
fakelibvirt.py libvirt: Fix getting a wrong guest object 2017-09-15 20:48:34 +01:00
test_blockinfo.py Merge "Fix root_device_name for Xen" 2017-01-31 18:56:46 +00:00
test_compat.py Workaround for race condition in libvirt 2015-03-14 20:17:41 -03:00
test_config.py Add format_dom for PCI device addresses 2017-08-21 10:34:45 +00:00
test_designer.py libvirt: conditionally set script path for ethernet vif types 2017-03-21 15:09:28 -04:00
test_driver.py libvirt: Don't VIR_MIGRATE_NON_SHARED_INC without migrate_disks 2018-02-19 21:50:26 +00:00
test_fakelibvirt.py libvirt: Fix getting a wrong guest object 2017-09-15 20:48:34 +01:00
test_firewall.py Port libvirt.test_firewall to Python 3 2017-01-05 10:26:19 +00:00
test_guest.py libvirt: bandwidth param should be set in guest migrate 2017-11-01 17:18:48 +00:00
test_host.py libvirt: Fix getting a wrong guest object 2017-09-15 20:48:34 +01:00
test_imagebackend.py Merge "Remove mox from unit/virt/libvirt/test_imagebackend.py (5)" 2017-01-28 00:24:10 +00:00
test_imagecache.py conf: Remove config option compute_ manager 2016-12-08 20:05:52 +08:00
test_migration.py Fix misuse of assertIsNone 2017-08-11 00:33:20 +00:00
test_utils.py Merge "libvirt: workaround findmnt behaviour change" 2017-02-03 13:37:23 +00:00
test_vif.py Assign mac address to vf netdevice when using macvtap port 2017-08-03 09:20:14 +00:00