All CPU features not exposed

Bug #1217630 reported by Don Dugger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Donald Dugger

Bug Description

The compute node calls the libvirt API `getCapabilities' to get the CPU features for the compute node. Unfortunately, this API doesn't return all of the CPU features, it returns a CPU model name and any extra features that are not part of that model. This makes it extremely difficult for anything that wants to check for specific CPU featurs (like a ComputeCapabilities scheduler filter) to know what's available on that compute node.

libvirt has been enhanced to add a new flag, VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, to the `baselineCPU' API that will cause that API to return all CPU features, explicitly listing the ones that are part of the CPU model. Need to fix the `nova/virt/libvirt/driver.py' code to call this API to get all the CPU features.

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/43984

Changed in nova:
assignee: nobody → Donald Dugger (n0ano-ddd)
status: New → In Progress
Sean Dague (sdague)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/43984
Committed: http://github.com/openstack/nova/commit/3b8c26321bce07b8ad588099c1fdcef858e748a8
Submitter: Jenkins
Branch: master

commit 3b8c26321bce07b8ad588099c1fdcef858e748a8
Author: Don Dugger <email address hidden>
Date: Tue Aug 27 18:32:50 2013 -0600

    Call baselineCPU for full feature list

    Since the libvirt API getCapabilities doesn't return a full list of CPU features we need
    to call the libvirt API baselineCPU with the new flag VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES
    to get all features.

    Since the flag is new this code checks for its existence before calling baselineCPU.

    Also, due to some rather stringent input checking on libvirt's part, just calling
    baselineCPU with the output from getCapabilities doesn't work, you have to extract
    just the <cpu> stanza from the XML returned by getCapabilities.

    Add unit test to make sure that the current verion of libvirt works (although
    it will hide some features) and the new version of libvirt will correctly
    return all features.

    Fixes bug 1217630

    Change-Id: I266bacb7e0c79d9c5b13ff163f01d14cad9ab57b

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
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.