Browse Source

Merge "fix up numa-topology live migration hypervisor check" into stable/queens

tags/17.0.11^0
Zuul 2 months ago
parent
commit
de7a8f9e44

+ 4
- 1
nova/conductor/tasks/live_migrate.py View File

@@ -152,7 +152,10 @@ class LiveMigrationTask(base.TaskBase):
152 152
         # HyperV's vNUMA feature doesn't allow specific pinning
153 153
         hypervisor_type = objects.ComputeNode.get_by_host_and_nodename(
154 154
             self.context, self.source, self.instance.node).hypervisor_type
155
-        if hypervisor_type != obj_fields.HVType.KVM:
155
+
156
+        # KVM is not a hypervisor, so when using a virt_type of "kvm" the
157
+        # hypervisor_type will still be "QEMU".
158
+        if hypervisor_type.lower() != obj_fields.HVType.QEMU:
156 159
             return
157 160
 
158 161
         msg = ('Instance has an associated NUMA topology. '

+ 1
- 1
nova/tests/unit/conductor/tasks/test_live_migrate.py View File

@@ -210,7 +210,7 @@ class LiveMigrationTaskTestCase(test.NoDBTestCase):
210 210
     def test_check_instance_has_no_numa_fails(self, mock_get):
211 211
         self.flags(enable_numa_live_migration=False, group='workarounds')
212 212
         mock_get.return_value = objects.ComputeNode(
213
-            uuid=uuids.cn1, hypervisor_type='kvm')
213
+            uuid=uuids.cn1, hypervisor_type='QEMU')
214 214
         self.task.instance.numa_topology = objects.InstanceNUMATopology(
215 215
             cells=[objects.InstanceNUMACell(id=0, cpuset=set([0]),
216 216
                                             memory=1024)])

Loading…
Cancel
Save