commit 69eca4c60d762b673fafb13dd12f285d7f1f1239
Author: Paul Murray <email address hidden>
Date: Mon Nov 23 14:50:14 2015 +0000
Fix resource tracker VCPU counting
The resource track is double counting the number of
vcpus used because it counts the virt driver's view
and the resource tracker's view. It should reset
the count to 0 before counting the resourcet racker's
view. this is done for other resources (memory, disk)
in _update_usage_from_instances().
This was not caught in unit tests because they always
provide a virt driver view with no resource used for
tests that assume instances are already running.
This patch adds the reset to 0 and modifies the
tests to provide correct counts of used resources
from the virt driver.
Reviewed: https:/ /review. openstack. org/248742 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=69eca4c60d7 62b673fafb13dd1 2f285d7f1f1239
Committed: https:/
Submitter: Jenkins
Branch: master
commit 69eca4c60d762b6 73fafb13dd12f28 5d7f1f1239
Author: Paul Murray <email address hidden>
Date: Mon Nov 23 14:50:14 2015 +0000
Fix resource tracker VCPU counting
The resource track is double counting the number of usage_from_ instances( ).
vcpus used because it counts the virt driver's view
and the resource tracker's view. It should reset
the count to 0 before counting the resourcet racker's
view. this is done for other resources (memory, disk)
in _update_
This was not caught in unit tests because they always
provide a virt driver view with no resource used for
tests that assume instances are already running.
This patch adds the reset to 0 and modifies the
tests to provide correct counts of used resources
from the virt driver.
Change-Id: I21acfd7d5b5ed4 42cd1e9049c986a 06bd2b59b81
Closes-Bug: #1519001