Comment 3 for bug 1519001

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/248742
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=69eca4c60d762b673fafb13dd12f285d7f1f1239
Submitter: Jenkins
Branch: master

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.

    Change-Id: I21acfd7d5b5ed442cd1e9049c986a06bd2b59b81
    Closes-Bug: #1519001