Skip to content

Commit

Permalink
Merge "NUMA LM: Add func test for bug 1845146"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed May 1, 2020
2 parents 730eeb5 + 32713a4 commit d078ecc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions nova/tests/functional/libvirt/test_numa_live_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from oslo_config import cfg
from oslo_log import log as logging

from nova.compute import manager as compute_manager
from nova import context
from nova import objects
from nova.tests.functional import integrated_helpers
Expand Down Expand Up @@ -260,6 +261,24 @@ def test_numa_live_migration(self):
def test_numa_live_migration_dest_pinned(self):
self._test(pin_dest=True)

def test_bug_1843639(self):
orig_live_migration = \
compute_manager.ComputeManager.live_migration

def live_migration(*args, **kwargs):
self._run_periodics()
# During the migration, server_a is consuming CPUs 0,1 on host_a,
# while all 4 of host_b's CPU are consumed by server_b and the
# incoming # migration.
self._assert_host_consumed_cpus('host_a', [0, 1])
self._assert_host_consumed_cpus('host_b', [0, 1, 2, 3])
return orig_live_migration(*args, **kwargs)

self.useFixture(fixtures.MonkeyPatch(
'nova.compute.manager.ComputeManager.live_migration',
live_migration))
self._test()


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

0 comments on commit d078ecc

Please sign in to comment.