Merge "libvirt: Provide VIR_MIGRATE_PARAM_PERSIST_XML during live migration" into stable/ussuri

This commit is contained in:
Zuul 2020-08-26 09:45:41 +00:00 committed by Gerrit Code Review
commit 7ed7eb74b0
3 changed files with 10 additions and 1 deletions

View File

@ -11196,6 +11196,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_disks': disk_paths, 'migrate_disks': disk_paths,
'bandwidth': _bandwidth, 'bandwidth': _bandwidth,
'destination_xml': target_xml, 'destination_xml': target_xml,
'persistent_xml': target_xml,
} }
# start test # start test
@ -11303,7 +11304,8 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_disks': disk_paths, 'migrate_disks': disk_paths,
'migrate_uri': 'tcp://127.0.0.2', 'migrate_uri': 'tcp://127.0.0.2',
'bandwidth': CONF.libvirt.live_migration_bandwidth, 'bandwidth': CONF.libvirt.live_migration_bandwidth,
'destination_xml': target_xml 'destination_xml': target_xml,
'persistent_xml': target_xml,
} }
# Start test # Start test
@ -11462,6 +11464,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_uri': 'tcp://127.0.0.2', 'migrate_uri': 'tcp://127.0.0.2',
'bandwidth': CONF.libvirt.live_migration_bandwidth, 'bandwidth': CONF.libvirt.live_migration_bandwidth,
'destination_xml': target_xml, 'destination_xml': target_xml,
'persistent_xml': target_xml,
} }
# start test # start test
@ -11813,6 +11816,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_disks': ['vda', 'vdb'], 'migrate_disks': ['vda', 'vdb'],
'bandwidth': CONF.libvirt.live_migration_bandwidth, 'bandwidth': CONF.libvirt.live_migration_bandwidth,
'destination_xml': target_xml, 'destination_xml': target_xml,
'persistent_xml': target_xml,
} }
# start test # start test
@ -11939,6 +11943,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_disks': device_names, 'migrate_disks': device_names,
'bandwidth': CONF.libvirt.live_migration_bandwidth, 'bandwidth': CONF.libvirt.live_migration_bandwidth,
'destination_xml': '<xml/>', 'destination_xml': '<xml/>',
'persistent_xml': '<xml/>',
} }
if not params['migrate_disks']: if not params['migrate_disks']:
del params['migrate_disks'] del params['migrate_disks']
@ -12078,6 +12083,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_disks': disk_paths, 'migrate_disks': disk_paths,
'bandwidth': CONF.libvirt.live_migration_bandwidth, 'bandwidth': CONF.libvirt.live_migration_bandwidth,
'destination_xml': '<xml/>', 'destination_xml': '<xml/>',
'persistent_xml': '<xml/>',
} }
# Prepare mocks # Prepare mocks

View File

@ -682,6 +682,7 @@ class GuestTestCase(test.NoDBTestCase):
'an-uri', flags=1, params={'migrate_uri': 'dest-uri', 'an-uri', flags=1, params={'migrate_uri': 'dest-uri',
'migrate_disks': 'disk1', 'migrate_disks': 'disk1',
'destination_xml': '</xml>', 'destination_xml': '</xml>',
'persistent_xml': '</xml>',
'bandwidth': 2}) 'bandwidth': 2})
@testtools.skipIf(not six.PY2, 'libvirt python3 bindings accept unicode') @testtools.skipIf(not six.PY2, 'libvirt python3 bindings accept unicode')
@ -699,6 +700,7 @@ class GuestTestCase(test.NoDBTestCase):
'migrate_disks': ['disk1', 'migrate_disks': ['disk1',
'disk2'], 'disk2'],
'destination_xml': expect_dest_xml, 'destination_xml': expect_dest_xml,
'persistent_xml': expect_dest_xml,
'bandwidth': 2}) 'bandwidth': 2})
def test_abort_job(self): def test_abort_job(self):

View File

@ -638,6 +638,7 @@ class Guest(object):
if destination_xml: if destination_xml:
params['destination_xml'] = destination_xml params['destination_xml'] = destination_xml
params['persistent_xml'] = destination_xml
if migrate_disks: if migrate_disks:
params['migrate_disks'] = migrate_disks params['migrate_disks'] = migrate_disks
if migrate_uri: if migrate_uri: