nova/nova/compute
Balazs Gibizer 32c1044d86 [rt] Apply migration context for incoming migrations
There is a race condition between an incoming resize and an
update_available_resource periodic in the resource tracker. The race
window starts when the resize_instance RPC finishes  and ends when the
finish_resize compute RPC finally applies the migration context on the
instance.

In the race window, if the update_available_resource periodic is run on
the destination node, then it will see the instance as being tracked on
this host as the instance.node is already pointing to the dest. But the
instance.numa_topology still points to the source host topology as the
migration context is not applied yet. This leads to CPU pinning error if
the source topology does not fit to the dest topology. Also it stops the
periodic task and leaves the tracker in an inconsistent state. The
inconsistent state only cleanup up after the periodic is run outside of
the race window.

This patch applies the migration context temporarily to the specific
instances during the periodic to keep resource accounting correct.

Change-Id: Icaad155e22c9e2d86e464a0deb741c73f0dfb28a
Closes-Bug: #1953359
Closes-Bug: #1952915
2021-12-07 13:32:26 +01:00
..
monitors Remove six.add_metaclass 2020-08-15 07:45:39 +00:00
__init__.py Remove nova.compute.*API() shims 2019-06-12 16:09:46 +01:00
api.py Merge "Avoid unbound instance_uuid var during delete" 2021-11-03 19:51:32 +00:00
build_results.py Compute Add build_instance hook in compute manager 2014-12-04 10:12:00 -05:00
claims.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
flavors.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
instance_actions.py nova-manage: Introduce volume show, refresh, get_connector commands 2021-08-25 10:26:07 +01:00
instance_list.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
manager.py Merge "Log instance event wait times" 2021-11-22 17:35:48 +00:00
migration_list.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
multi_cell_list.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
power_state.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
provider_config.py Provider Config File: Coding style and test cases improvement 2020-09-01 01:05:34 +00:00
provider_tree.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
resource_tracker.py [rt] Apply migration context for incoming migrations 2021-12-07 13:32:26 +01:00
rpcapi.py Update compute rpc version alias for xena 2021-09-02 13:09:08 +00:00
stats.py Change consecutive build failure limit to a weigher 2018-06-06 15:18:50 -07:00
task_states.py Fix resource tracker updates during instance evacuation 2018-09-12 13:05:29 +03:00
utils.py objects: Remove 'bandwidth' fields from notifications 2021-11-03 17:33:43 +00:00
vm_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00