nova/nova/tests/unit/virt/libvirt
Lee Yarwood b9ea91d177 libvirt: Provide VIR_MIGRATE_PARAM_PERSIST_XML during live migration
The VIR_MIGRATE_PARAM_PERSIST_XML parameter was introduced in libvirt
v1.3.4 and is used to provide the new persistent configuration for the
destination during a live migration:

https://libvirt.org/html/libvirt-libvirt-domain.html#VIR_MIGRATE_PARAM_PERSIST_XML

Without this parameter the persistent configuration on the destination
will be the same as the original persistent configuration on the source
when the VIR_MIGRATE_PERSIST_DEST flag is provided.

As Nova does not currently provide the VIR_MIGRATE_PARAM_PERSIST_XML
param but does provide the VIR_MIGRATE_PERSIST_DEST flag this means that
a soft reboot by Nova of the instance after a live migration can revert
the domain back to the original persistent configuration from the
source.

Note that this is only possible in Nova as a soft reboot actually
results in the virDomainShutdown and virDomainLaunch libvirt APIs being
called that recreate the domain using the persistent configuration.
virDomainReboot does not result in this but is not called at this time.

The impact of this on the instance after the soft reboot is pretty
severe, host devices referenced in the original persistent configuration
on the source may not exist or could even be used by other users on the
destination. CPU and NUMA affinity could also differ drastically between
the two hosts resulting in the instance being unable to start etc.

As MIN_LIBVIRT_VERSION is now > v1.3.4 this change simply includes the
VIR_MIGRATE_PARAM_PERSIST_XML param using the same updated XML for the
destination as is already provided to VIR_MIGRATE_PARAM_DEST_XML.

Co-authored-by: Tadayoshi Hosoya <tad-hosoya@wr.jp.nec.com>
Closes-Bug: #1890501
Change-Id: Ia3f1d8e83cbc574ce5cb440032e12bbcb1e10e98
(cherry picked from commit 1bb8ee95d4)
(cherry picked from commit bbf9d1de06)
(cherry picked from commit 6a07edb4b2)
2020-08-25 16:04:34 +01:00
..
storage Fix python3 compatibility of rbd get_fsid 2019-06-18 12:33:08 +01:00
volume Fixes multi-registry config in Quobyte driver 2019-05-24 16:03:52 +02:00
__init__.py
fake_imagebackend.py Pass disk_info dict to libvirt_info 2018-11-02 13:54:13 +00:00
fake_libvirt_utils.py libvirt: Use SATA bus for cdrom devices when using Q35 machine type 2019-06-13 15:56:58 +00:00
fake_os_brick_connector.py Switch to using os-brick 2015-07-27 10:47:22 -07:00
fakelibvirt.py libvirt: check job status for VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED event 2019-12-30 09:34:49 -05:00
test_blockinfo.py libvirt: Use SATA bus for cdrom devices when using Q35 machine type 2019-06-13 15:56:58 +00:00
test_compat.py Workaround for race condition in libvirt 2015-03-14 20:17:41 -03:00
test_config.py Use assertXmlEqual() helper for all XML comparison tests 2019-03-08 11:40:41 +00:00
test_designer.py add mtu to libvirt xml for ethernet and bridge types 2018-06-06 09:39:40 -04:00
test_driver.py libvirt: Provide VIR_MIGRATE_PARAM_PERSIST_XML during live migration 2020-08-25 16:04:34 +01:00
test_fakelibvirt.py Use assertXmlEqual() helper for all XML comparison tests 2019-03-08 11:40:41 +00:00
test_firewall.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_guest.py libvirt: Provide VIR_MIGRATE_PARAM_PERSIST_XML during live migration 2020-08-25 16:04:34 +01:00
test_host.py libvirt: check job status for VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED event 2019-12-30 09:34:49 -05:00
test_imagebackend.py Make RBD imagebackend flatten method idempotent 2020-04-23 15:53:10 +00:00
test_imagecache.py Guard against missing image cache directory 2020-07-10 07:39:22 +00:00
test_migration.py libvirt: check job status for VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED event 2019-12-30 09:34:49 -05:00
test_utils.py libvirt: Provide the backing file format when creating qcow2 disks 2020-03-02 14:53:26 +00:00
test_vif.py libvirt: Mark e1000e VIF as supported 2020-07-22 10:43:19 +00:00