libvirt: number of CPUs is not updated after hotplugging host CPUs

Bug #1460043 reported by Alexander Schmidt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Alexander Schmidt

Bug Description

When adding or removing CPUs to a compute node running the libvirt driver, the correct new amount of CPUs is not reported to the controller/scheduler.

As a result, the scheduler will not consider added or removed capacity in future scheduling decisions.

To fix this, the number of CPUs on a compute node should not be cached in the libvirt driver. Instead it should be recalculated in the periodic task for updating resource availability.

I'll provide a patch for fixing the bug along with a unit test.

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

Fix proposed to branch: master
Review: https://review.openstack.org/186746

Changed in nova:
assignee: nobody → Alexander Schmidt (alexs-h)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit d6741a03c0b934083afcd2b4345354c86623783f
Author: Alexander Schmidt <email address hidden>
Date: Fri May 29 11:42:02 2015 +0200

    libvirt: Do not cache number of CPUs of the hypervisor

    The number of CPUs on a compute node can vary during the runtime of
    the nova compute service due to CPU hotplug events. For example
    an administrator can add or remove CPUs based on the current
    resource consumption.

    As a result, the number of CPUs should not be cached within
    the nova service, but it needs to be retrieved again when
    updating resource allocation to report it to the controller
    node.

    Change-Id: I2382a22c7aa492071647fa6dca42b54d1baf050d
    Closes-bug: #1460043

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-1 → 12.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.