Skip to content

Commit 7c56104

Browse files
committed
Add missing condition
Change [1] added new fields 'src|dst_supports_numa_live_migration' to LibvirtLiveMigrateData object, but missed if condition for dst_supports_numa_live_migration field in obj_make_compatible method. This change adds the if condition as well as fix typo in unit test because of which this wasn't catched earlier. Closes-Bug: #1975891 Change-Id: Ice5a2c7aca77f47ea6328a10d835854d9aff408e (cherry picked from commit 3aa77a3) (cherry picked from commit dfa05d6) (cherry picked from commit 7c40596)
1 parent 7d5b289 commit 7c56104

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

nova/objects/migrate_data.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ def obj_make_compatible(self, primitive, target_version):
261261
if (target_version < (1, 10) and
262262
'src_supports_numa_live_migration' in primitive):
263263
del primitive['src_supports_numa_live_migration']
264+
if (target_version < (1, 10) and
265+
'dst_supports_numa_live_migration' in primitive):
266+
del primitive['dst_supports_numa_live_migration']
264267
if target_version < (1, 10) and 'dst_numa_info' in primitive:
265268
del primitive['dst_numa_info']
266269
if target_version < (1, 9) and 'vifs' in primitive:

nova/tests/unit/objects/test_migrate_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def test_obj_make_compatible(self):
9494
target_connect_addr='127.0.0.1',
9595
dst_wants_file_backed_memory=False,
9696
file_backed_memory_discard=False,
97-
src_supports_numa_live_migraton=True,
98-
dst_supports_numa_live_migraton=True,
97+
src_supports_numa_live_migration=True,
98+
dst_supports_numa_live_migration=True,
9999
dst_numa_info=migrate_data.LibvirtLiveMigrateNUMAInfo())
100100
manifest = ovo_base.obj_tree_get_versions(obj.obj_name())
101101

0 commit comments

Comments
 (0)