|
18 | 18 | from oslo_config import cfg
|
19 | 19 | from oslo_log import log as logging
|
20 | 20 |
|
| 21 | +from nova.compute import manager as compute_manager |
21 | 22 | from nova import context
|
22 | 23 | from nova import objects
|
23 | 24 | from nova.tests.functional import integrated_helpers
|
@@ -260,6 +261,24 @@ def test_numa_live_migration(self):
|
260 | 261 | def test_numa_live_migration_dest_pinned(self):
|
261 | 262 | self._test(pin_dest=True)
|
262 | 263 |
|
| 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 | + |
263 | 282 |
|
264 | 283 | class NUMALiveMigrationRollbackTests(NUMALiveMigrationPositiveBase):
|
265 | 284 | """Tests that expect the live migration to fail, and exist to test the
|
|
0 commit comments