nova/nova/compute
Maciej Józefczyk c9b74bcfa0 Update resources once in update_available_resource
This change ensures that resources are updated only once per
update_available_resource() call.

Compute resources were previously updated during host
object initialization and at the end of
update_available_resource(). It could cause inconsistencies
in resource tracking between compute host and DB for couple
of second when final _update() at the end of
update_available_resource() is being called.

For example: nova-api shows that host uses 10GB of RAM, but
in fact its 12GB because DB doesn't have resources that belongs
to shutdown instance.

Because of that fact nova-scheduler (CachingScheduler) could
choose (based on imcomplete information) host which is already full.

For more informations please see realted bug: #1729621

Change-Id: I120a98cc4c11772f24099081ef3ac44a50daf71d
Closes-Bug: #1729621
2018-08-06 15:51:02 +00:00
..
monitors Remove translation of log messages 2017-06-09 09:06:16 +00:00
__init__.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
api.py Merge "In Python3.7 async is a keyword [1]" 2018-08-03 00:58:06 +00:00
build_results.py Compute Add build_instance hook in compute manager 2014-12-04 10:12:00 -05:00
cells_api.py Fix missing marker functions 2018-01-25 03:37:48 +00:00
claims.py [Trivial] docstrings, typos, minor refactoring 2017-08-28 08:33:58 -05:00
flavors.py Remove unused flavor_delete_info() method 2018-08-03 12:44:52 -04:00
instance_actions.py Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
instance_list.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
manager.py Hook resource_tracker to remove stale node information 2018-08-01 11:47:45 -07:00
migration_list.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
multi_cell_list.py Make nova list and migration-list ignore down cells 2018-06-25 17:28:57 -04:00
power_state.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
provider_tree.py Add method to get cpu traits 2018-07-24 12:37:46 +00:00
resource_tracker.py Update resources once in update_available_resource 2018-08-06 15:51:02 +00:00
rpcapi.py Make check_can_live_migrate_destination use long_rpc_timeout 2018-06-14 09:45:47 -07:00
stats.py Change consecutive build failure limit to a weigher 2018-06-06 15:18:50 -07:00
task_states.py Have one list of reboot task_states 2017-09-14 20:57:38 +00:00
utils.py Heal RequestSpec.is_bfv for legacy instances during moves 2018-07-23 12:24:10 -04:00
vm_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00