Skip to content

Commit

Permalink
Merge "fix up numa-topology live migration hypervisor check"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Mar 1, 2019
2 parents eee3e0d + 4da0587 commit 68d4cb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion nova/conductor/tasks/live_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ def _check_instance_has_no_numa(self):
# HyperV's vNUMA feature doesn't allow specific pinning
hypervisor_type = objects.ComputeNode.get_by_host_and_nodename(
self.context, self.source, self.instance.node).hypervisor_type
if hypervisor_type != obj_fields.HVType.KVM:

# KVM is not a hypervisor, so when using a virt_type of "kvm" the
# hypervisor_type will still be "QEMU".
if hypervisor_type.lower() != obj_fields.HVType.QEMU:
return

msg = ('Instance has an associated NUMA topology. '
Expand Down
2 changes: 1 addition & 1 deletion nova/tests/unit/conductor/tasks/test_live_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def test_check_instance_has_no_numa_passes_workaround(self, mock_get):
def test_check_instance_has_no_numa_fails(self, mock_get):
self.flags(enable_numa_live_migration=False, group='workarounds')
mock_get.return_value = objects.ComputeNode(
uuid=uuids.cn1, hypervisor_type='kvm')
uuid=uuids.cn1, hypervisor_type='QEMU')
self.task.instance.numa_topology = objects.InstanceNUMATopology(
cells=[objects.InstanceNUMACell(id=0, cpuset=set([0]),
memory=1024)])
Expand Down

0 comments on commit 68d4cb4

Please sign in to comment.