nova/nova/tests/unit/virt/libvirt
Artom Lifshitz 8b9aa3e001 Use VIR_DOMAIN_BLOCK_REBASE_COPY_DEV when rebasing
Previously, in swap_volume, the VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag
was not passed to virDomainBlockRebase. In the case of iSCSI-backed
disks, this caused the XML to change from <source dev=/dev/iscsi/lun>
to <source file=/dev/iscsi/lun>. This was a problem because
/dev/iscsi/lun is not a regular file. This patch passes the
VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag to virDomainBlockRebase, causing
the correct <source dev=/dev/iscsi/lun> to be generated upon
volume-update.

Conflicts:
      nova/tests/unit/virt/libvirt/test_driver.py
      nova/virt/libvirt/driver.py
      nova/virt/libvirt/guest.py

NOTE(mriedem): The conflicts are due to
fbcf8d6733 needing to translate
the exception message in driver.py and for passing instance
to disconnect_volume in test_driver, which was added in Pike with
b66b7d4f9d.

NOTE(artom): In stable/newton, the conflict in guest.py is due to a
different docstring for the rebase() method.

NOTE(artom): This backport squashes
5d5c5a5d92 to guard againt older libvirt
versions that don't have the VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag.

Change-Id: I868a0dae0baf8cded9c7c5807ea63ffc5eec0c5e
Closes-bug: 1691195
(cherry picked from commit a8a4a8ea7b)
(cherry picked from commit ef853e038d)
2017-10-18 12:58:32 -04:00
..
storage Fix decoding of encryption key passed to dmcrypt 2017-05-23 16:01:53 +01:00
volume Remove hacked test that fails with latest os-brick 2016-09-01 12:42:55 -04:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fake_imagebackend.py Fix cold migration with qcow2 ephemeral disks 2017-01-11 12:35:12 +00:00
fake_libvirt_utils.py Remove backward compatibility with pre-grizzly releases 2016-08-04 12:37:31 +00:00
fake_os_brick_connector.py Switch to using os-brick 2015-07-27 10:47:22 -07:00
fakelibvirt.py Use VIR_DOMAIN_BLOCK_REBASE_COPY_DEV when rebasing 2017-10-18 12:58:32 -04:00
test_blockinfo.py libvirt: Delete the lase_device of find_disk_dev_for_disk_bus 2016-11-28 10:45:08 +00:00
test_compat.py Workaround for race condition in libvirt 2015-03-14 20:17:41 -03:00
test_config.py libvirt: Use the mirror element to detect job completion 2017-01-31 16:47:16 +00:00
test_designer.py libvirt: conditionally set script path for ethernet vif types 2017-03-21 15:32:35 -04:00
test_driver.py Use VIR_DOMAIN_BLOCK_REBASE_COPY_DEV when rebasing 2017-10-18 12:58:32 -04:00
test_fakelibvirt.py Use assertLess(Equal) instead of assertTrue(A > X) 2016-06-03 16:53:14 +01:00
test_firewall.py libvirt: ignore conflict when defining network filters 2016-09-30 20:48:23 +00:00
test_guest.py Use VIR_DOMAIN_BLOCK_REBASE_COPY_DEV when rebasing 2017-10-18 12:58:32 -04:00
test_host.py libvirt: cleanup baselineCPU return value checking 2016-06-15 17:35:47 +08:00
test_imagebackend.py Fix resizing in imagebackend.cache() 2016-09-09 18:36:23 +00:00
test_imagecache.py Merge "Fix invalid uuid warnings in virt testcases" 2016-06-16 10:29:24 +00:00
test_migration.py libvirt: prepare domain XML update for serial ports 2017-01-03 10:24:48 +00:00
test_utils.py Catch error and log warning when not able to update mtimes 2017-02-03 14:09:08 +00:00
test_vif.py Assign mac address to vf netdevice when using macvtap port 2017-08-03 09:20:32 +00:00