commit 980013d7008aff3f83d9de646417f387b29dc1df
Author: Matt Riedemann <email address hidden>
Date: Mon Oct 8 17:33:49 2018 -0400
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 a99722bb854d2ba99c3abc2d2738ba281148fde4)
Reviewed: https:/ /review. openstack. org/614588 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=980013d7008 aff3f83d9de6464 17f387b29dc1df
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 980013d7008aff3 f83d9de646417f3 87b29dc1df
Author: Matt Riedemann <email address hidden>
Date: Mon Oct 8 17:33:49 2018 -0400
Properly track local root disk usage during moves
Change I0839470c4bcfb1 6590a0d87b306d6 83b059bf8a9 fixed usage_from_ migration which passes a ._get_usage_ dict() and
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_
Flavor object to ResourceTracker
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: Ia19264ae7c88bb 03ed3118795d401 1ceb62ef92c 99c3abc2d2738ba 281148fde4)
Closes-Bug: #1796737
(cherry picked from commit a99722bb854d2ba