commit a721ca5f510ce3c8ef24f22dac9e475b3d7651db
Author: Lee Yarwood <email address hidden>
Date: Wed Aug 5 23:00:06 2020 +0100
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:
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.
NOTE(lyarwood): Conflicts as If0a091a7441f2c3269148e40ececc3696d69684c
(libvirt: Bump MIN_{LIBVIRT,QEMU}_VERSION for "Rocky"),
Id9ee1feeadf612fa79c3d280cee3a614a74a00a7 (libvirt: Remove usage of
migrateToURI{2} APIs) and I3af68f745ffb23ef2b5407ccec0bebf4b2645734
(Remove mox in test_virt_drivers.py) are not present on stable/queens.
As a result we can now add the parameter directly in
_live_migration_operation before calling down into guest.migrate.
Co-authored-by: Tadayoshi Hosoya <email address hidden>
Closes-Bug: #1890501
Change-Id: Ia3f1d8e83cbc574ce5cb440032e12bbcb1e10e98
(cherry picked from commit 1bb8ee95d4c3ddc3f607ac57526b75af1b7fbcff)
(cherry picked from commit bbf9d1de06e9991acd968fceee899a8df3776d60)
(cherry picked from commit 6a07edb4b29d8bfb5c86ed14263f7cd7525958c1)
(cherry picked from commit b9ea91d17703f5b324a50727b6503ace0f4e95eb)
(cherry picked from commit c438fd9a0eb1903306a53ab44e3ae80660d8a429)
Reviewed: https:/ /review. opendev. org/747976 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=a721ca5f510 ce3c8ef24f22dac 9e475b3d7651db
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit a721ca5f510ce3c 8ef24f22dac9e47 5b3d7651db
Author: Lee Yarwood <email address hidden>
Date: Wed Aug 5 23:00:06 2020 +0100
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 PERSIST_ DEST flag is provided.
will be the same as the original persistent configuration on the source
when the VIR_MIGRATE_
As Nova does not currently provide the VIR_MIGRATE_ PARAM_PERSIST_ XML PERSIST_ DEST flag this means that
param but does provide the VIR_MIGRATE_
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 MIGRATE_ PARAM_PERSIST_ XML param using the same updated XML for the PARAM_DEST_ XML.
VIR_
destination as is already provided to VIR_MIGRATE_
Conflicts:
nova/tests/ unit/virt/ libvirt/ test_driver. py
nova/tests/ unit/virt/ test_virt_ drivers. py
nova/virt/ libvirt/ driver. py
nova/virt/ libvirt/ guest.py
NOTE(lyarwood): Conflicts as If0a091a7441f2c 3269148e40ececc 3696d69684c QEMU}_VERSION for "Rocky"), f612fa79c3d280c ee3a614a74a00a7 (libvirt: Remove usage of ef2b5407ccec0be bf4b2645734 drivers. py) are not present on stable/queens. migration_ operation before calling down into guest.migrate.
(libvirt: Bump MIN_{LIBVIRT,
Id9ee1feead
migrateToURI{2} APIs) and I3af68f745ffb23
(Remove mox in test_virt_
As a result we can now add the parameter directly in
_live_
Co-authored-by: Tadayoshi Hosoya <email address hidden> 4ce5cb440032e12 bbcb1e10e98 3f607ac57526b75 af1b7fbcff) acd968fceee899a 8df3776d60) b5c86ed14263f7c d7525958c1) 324a50727b6503a ce0f4e95eb) 306a53ab44e3ae8 0660d8a429)
Closes-Bug: #1890501
Change-Id: Ia3f1d8e83cbc57
(cherry picked from commit 1bb8ee95d4c3ddc
(cherry picked from commit bbf9d1de06e9991
(cherry picked from commit 6a07edb4b29d8bf
(cherry picked from commit b9ea91d17703f5b
(cherry picked from commit c438fd9a0eb1903