nova/nova/compute
Matt Riedemann 980013d700 Properly track local root disk usage during moves
Change I0839470c4bcfb16590a0d87b306d683b059bf8a9 fixed
root disk usage tracking for volume-backed instances
when performing an instance_claim which happens during
the initial server create and unshelve. However, root
disk reporting is still wrong for volume-backed instances
during move claims (resize and evacuate) because a move
claim calls _update_usage_from_migration which passes a
Flavor object to ResourceTracker._get_usage_dict() and
that method didn't have "is_bfv" logic in that scenario.

This fixes the bug by always passing the instance object
to the _get_usage_dict() method so we can determine if
it's volume-backed and if so report the root_gb usage as 0.

The related functional regression test is updated
appropriately to show the bug is fixed for volume-backed
instances.

Change-Id: Ia19264ae7c88bb03ed3118795d4011ceb62ef92c
Closes-Bug: #1796737
(cherry picked from commit a99722bb85)
2018-10-31 12:45:49 -04: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 Use nova-consoleauth only if workaround enabled 2018-10-15 17:38:39 +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 Ensure attachment cleanup on failure in driver.pre_live_migration 2018-10-23 10:16:46 -04: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 Properly track local root disk usage during moves 2018-10-31 12:45:49 -04:00
rpcapi.py Fix up compute rpcapi version for pike release 2018-10-24 04:11:51 +00: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