Skip to content

Commit 68d4cb4

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "fix up numa-topology live migration hypervisor check"
2 parents eee3e0d + 4da0587 commit 68d4cb4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

nova/conductor/tasks/live_migrate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,10 @@ def _check_instance_has_no_numa(self):
163163
# HyperV's vNUMA feature doesn't allow specific pinning
164164
hypervisor_type = objects.ComputeNode.get_by_host_and_nodename(
165165
self.context, self.source, self.instance.node).hypervisor_type
166-
if hypervisor_type != obj_fields.HVType.KVM:
166+
167+
# KVM is not a hypervisor, so when using a virt_type of "kvm" the
168+
# hypervisor_type will still be "QEMU".
169+
if hypervisor_type.lower() != obj_fields.HVType.QEMU:
167170
return
168171

169172
msg = ('Instance has an associated NUMA topology. '

nova/tests/unit/conductor/tasks/test_live_migrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def test_check_instance_has_no_numa_passes_workaround(self, mock_get):
205205
def test_check_instance_has_no_numa_fails(self, mock_get):
206206
self.flags(enable_numa_live_migration=False, group='workarounds')
207207
mock_get.return_value = objects.ComputeNode(
208-
uuid=uuids.cn1, hypervisor_type='kvm')
208+
uuid=uuids.cn1, hypervisor_type='QEMU')
209209
self.task.instance.numa_topology = objects.InstanceNUMATopology(
210210
cells=[objects.InstanceNUMACell(id=0, cpuset=set([0]),
211211
memory=1024)])

0 commit comments

Comments
 (0)