Browse Source

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

tags/21.1.0
Zuul 4 weeks ago
committed by Gerrit Code Review
parent
commit
7ed7eb74b0
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

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

# start test
@@ -11303,7 +11304,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
@@ -11462,6 +11464,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
@@ -11813,6 +11816,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
@@ -11939,6 +11943,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']
@@ -12078,6 +12083,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

@@ -682,6 +682,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')
@@ -699,6 +700,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

@@ -638,6 +638,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