Browse Source

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

tags/19.3.1
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
59aeffad9e
3 changed files with 10 additions and 1 deletions
  1. +7
    -1
      nova/tests/unit/virt/libvirt/test_driver.py
  2. +2
    -0
      nova/tests/unit/virt/libvirt/test_guest.py
  3. +1
    -0
      nova/virt/libvirt/guest.py

+ 7
- 1
nova/tests/unit/virt/libvirt/test_driver.py View File

@@ -9902,6 +9902,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_disks': disk_paths,
'bandwidth': _bandwidth,
'destination_xml': target_xml,
'persistent_xml': target_xml,
}

# start test
@@ -10009,7 +10010,8 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_disks': disk_paths,
'migrate_uri': 'tcp://127.0.0.2',
'bandwidth': CONF.libvirt.live_migration_bandwidth,
'destination_xml': target_xml
'destination_xml': target_xml,
'persistent_xml': target_xml,
}

# Start test
@@ -10109,6 +10111,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_uri': 'tcp://127.0.0.2',
'bandwidth': CONF.libvirt.live_migration_bandwidth,
'destination_xml': target_xml,
'persistent_xml': target_xml,
}

# start test
@@ -10459,6 +10462,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_disks': ['vda', 'vdb'],
'bandwidth': CONF.libvirt.live_migration_bandwidth,
'destination_xml': target_xml,
'persistent_xml': target_xml,
}

# start test
@@ -10585,6 +10589,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_disks': device_names,
'bandwidth': CONF.libvirt.live_migration_bandwidth,
'destination_xml': '<xml/>',
'persistent_xml': '<xml/>',
}
if not params['migrate_disks']:
del params['migrate_disks']
@@ -10724,6 +10729,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'migrate_disks': disk_paths,
'bandwidth': CONF.libvirt.live_migration_bandwidth,
'destination_xml': '<xml/>',
'persistent_xml': '<xml/>',
}

# Prepare mocks


+ 2
- 0
nova/tests/unit/virt/libvirt/test_guest.py View File

@@ -699,6 +699,7 @@ class GuestTestCase(test.NoDBTestCase):
'an-uri', flags=1, params={'migrate_uri': 'dest-uri',
'migrate_disks': 'disk1',
'destination_xml': '</xml>',
'persistent_xml': '</xml>',
'bandwidth': 2})

@testtools.skipIf(not six.PY2, 'libvirt python3 bindings accept unicode')
@@ -716,6 +717,7 @@ class GuestTestCase(test.NoDBTestCase):
'migrate_disks': ['disk1',
'disk2'],
'destination_xml': expect_dest_xml,
'persistent_xml': expect_dest_xml,
'bandwidth': 2})

def test_abort_job(self):


+ 1
- 0
nova/virt/libvirt/guest.py View File

@@ -654,6 +654,7 @@ class Guest(object):

if destination_xml:
params['destination_xml'] = destination_xml
params['persistent_xml'] = destination_xml
if migrate_disks:
params['migrate_disks'] = migrate_disks
if migrate_uri:


Loading…
Cancel
Save