Guest CPU selection with hypervisor consideration

Registered by Kashyap Chamarthy

The current guest CPU configuration libvirt APIs that Nova uses, compareCPU() and baselineCPU(), are "not very useful", because they ignore the capabilities of the host hypervisor (QEMU and KVM). To solves this, upstream libvirt (since 4.0.0, which requires QEMU 2.9 or above, for x86_64) has introduced two new CPU configuration APIs: baselineHypervisorCPU() and compareHypervisorCPU(). As their names indicate, these APIs are designed to take into account the capabilities of the host hypervisor. Rework Nova's CPU selection logic to incorporate these "hypervisor-literate" CPU configuration APIs. This will allow more accurate, and reliable guest CPU configuration.

Blueprint information

Status:
Complete
Approver:
Sylvain Bauza
Priority:
Low
Drafter:
Kashyap Chamarthy
Direction:
Approved
Assignee:
Kashyap Chamarthy
Definition:
Approved
Series goal:
Accepted for yoga
Implementation:
Implemented
Milestone target:
None
Started by
Sylvain Bauza
Completed by
Sylvain Bauza

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/cpu-selection-with-hypervisor-consideration,n,z

Addressed by: https://review.openstack.org/645814
    Add "CPU selection with hypervisor consideration" spec

Gerrit topic: https://review.opendev.org/#/q/topic:bp/cpu-selection-with-hypervisor-consideration

Addressed by: https://review.opendev.org/645814
    Add "CPU selection with hypervisor consideration" spec

Approved for Train. -- mriedem 20190425

Deferring this from Train since we're 2 weeks from feature freeze and there is no code up for this yet. -- mriedem 20190829

[2021.07.06 gibi]: spec has been merged so the bp is approved for Xena

impl: https://review.opendev.org/c/openstack/nova/+/762330

[2021-09-07 gibi]: We hit feature freeze so it is now deferred from Xena.

[20220113 bauzas] Spec was reproposed and approved https://review.opendev.org/c/openstack/nova-specs/+/824053

[20220225 bauzas] Implementation hit by FeatureFreeze, please repropose the blueprint/spec for the Zed release.

note this was finally fixed in antelope via https://github.com/openstack/nova/commit/468b03e0ee4a917ae26106f6e57081bcd9e7a65b as a followup for a bugfix
https://bugs.launchpad.net/nova/+bug/1913716
https://github.com/openstack/nova/commit/267a40663cd8d0b94bbc5ebda4ece55a45753b64

[20220225 bauzas] Implementation eventually was done by https://github.com/openstack/nova/commit/468b03e0ee4a917ae26106f6e57081bcd9e7a65b

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.