Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. Conflicts: nova/tests/unit/virt/libvirt/test_driver.py nova/virt/libvirt/driver.py NOTE(melwitt): Conflicts in driver.py are because changes: I6ac601e633ab2b0a67b4802ff880865255188a93 (libvirt: Provide VGPU inventory for a single GPU type) I947bf0ad34a48e9182a3dc016f47f0c9f71c9d7b ([libvirt] Allow multiple volume attachments) Ibfa64f18bbd2fb70db7791330ed1a64fe61c1355 (libvirt: QEMU native LUKS decryption for encrypted volumes) If2035cac931c42c440d61ba97ebc7e9e92141a28 (libvirt: Rework 'EBUSY' (SIGKILL) error handling code path) Ibf210dd27972fed2651d6c9bd73a0bcf352c8bab (libvirt: create vGPU for instance) are not in Pike. Conflict in test_driver.py is because the Pike backport of change I9b545ca8aa6dd7b41ddea2d333190c9fbed19bc1 explicitly asserts byte string destination_xml in _test_live_migration_block_migration_flags and the change is not in Queens where this is being backported from. Co-authored-by: Tadayoshi Hosoya <tad-hosoya@wr.jp.nec.com> Closes-Bug: #1890501 Change-Id: Ia3f1d8e83cbc574ce5cb440032e12bbcb1e10e98 (cherry picked from commit 1bb8ee9) (cherry picked from commit bbf9d1d) (cherry picked from commit 6a07edb) (cherry picked from commit b9ea91d) (cherry picked from commit c438fd9) (cherry picked from commit a721ca5)
- Loading branch information