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 ea9bf5216be60fb3fa1704cf6257adca4e634cb1)
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.
Reviewed: https:/ /review. openstack. org/519632 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=2486f34ec49 ffdf381912d7f0f d5199ce0dfa013
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 2486f34ec49ffdf 381912d7f0fd519 9ce0dfa013
Author: Matthew Booth <email address hidden>
Date: Mon Sep 25 17:32:14 2017 +0100
libvirt: Don't VIR_MIGRATE_ NON_SHARED_ INC without migrate_disks
If we specify block migration, but there are no disks which actually MIGRATE_ NON_SHARED_ INC in flags and an empty migrate_disks in
require block migration we call libvirt's migrateToURI3() with
VIR_
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 ea9bf5216be60fb 3fa1704cf6257ad ca4e634cb1)
nova/ tests/unit/ virt/libvirt/ test_driver. py: test_live_ migration_ block_migration _flags. Not required in master
Explicitly asserts byte string destination_xml in
_
due to change I85cd9a90.
Change-Id: I9b545ca8aa6dd7 b41ddea2d333190 c9fbed19bc1
Resolves-bug: #1719362