Skip to content

Commit d078ecc

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "NUMA LM: Add func test for bug 1845146"
2 parents 730eeb5 + 32713a4 commit d078ecc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

nova/tests/functional/libvirt/test_numa_live_migration.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from oslo_config import cfg
1919
from oslo_log import log as logging
2020

21+
from nova.compute import manager as compute_manager
2122
from nova import context
2223
from nova import objects
2324
from nova.tests.functional import integrated_helpers
@@ -260,6 +261,24 @@ def test_numa_live_migration(self):
260261
def test_numa_live_migration_dest_pinned(self):
261262
self._test(pin_dest=True)
262263

264+
def test_bug_1843639(self):
265+
orig_live_migration = \
266+
compute_manager.ComputeManager.live_migration
267+
268+
def live_migration(*args, **kwargs):
269+
self._run_periodics()
270+
# During the migration, server_a is consuming CPUs 0,1 on host_a,
271+
# while all 4 of host_b's CPU are consumed by server_b and the
272+
# incoming # migration.
273+
self._assert_host_consumed_cpus('host_a', [0, 1])
274+
self._assert_host_consumed_cpus('host_b', [0, 1, 2, 3])
275+
return orig_live_migration(*args, **kwargs)
276+
277+
self.useFixture(fixtures.MonkeyPatch(
278+
'nova.compute.manager.ComputeManager.live_migration',
279+
live_migration))
280+
self._test()
281+
263282

264283
class NUMALiveMigrationRollbackTests(NUMALiveMigrationPositiveBase):
265284
"""Tests that expect the live migration to fail, and exist to test the

0 commit comments

Comments
 (0)