Select cpu model from a list of cpu models

Registered by Jack Ding

Currently we uses cpu_model in nova.conf (when cpu_mode is set to ‘custom’) to specify the CPU model the instance should use on this host. This could have implications on availability of compute nodes for live migration if you ended up with an "advanced" CPU model when all you really cared about was an older feature flag.

To mitigate the problem , we use cpu_models to replace cpu_model, where cpu_models is an ordered list of CPU models the host supports. The list is ordered so that the more common and less advanced CPU models are listed earlier. End users specify CPU models they required through traits,
libvirt driver then select the first one in the list that can provide the required feature traits. This would make it more likely that you could live-migrate later on.

Blueprint information

Status:
Complete
Approver:
Eric Fried
Priority:
Low
Drafter:
Jack Ding
Direction:
Approved
Assignee:
ya.wang
Definition:
Approved
Series goal:
Accepted for train
Implementation:
Implemented
Milestone target:
milestone icon train-3
Started by
Matt Riedemann
Completed by
Matt Riedemann

Related branches

Sprints

Whiteboard

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

Addressed by: https://review.openstack.org/620959
    Select cpu model from a list of cpu models

Approved for Stein. -- mriedem 20181220

Addressed by: https://review.openstack.org/637834
    Add configuration item cpu_models to libvirt

Relate to: https://blueprints.launchpad.net/nova/+spec/cpu-selection-with-hypervisor-consideration

Addressed by: https://review.openstack.org/640866
    cpu-model-selection: s/cpu_models/cpu_model_list/

Addressed by: https://review.openstack.org/642030
    Re-propose the spec to allow specifying a list of CPU models

This did not complete in the Stein release so I am deferring to the Train release. Remember to re-propose the spec for Train as necessary: https://specs.openstack.org/openstack/nova-specs/readme.html#previously-approved-specifications -- mriedem 20190311

efried 20190510 Spec abandoned by kashyap, setting to obsolete.

Gerrit topic: https://review.opendev.org/#/q/topic:bp/cpu-model-selection

Addressed by: https://review.opendev.org/660271
    Re-propose the spec to allow specifying a list of CPU models

Addressed by: https://review.opendev.org/642030
    Re-propose the spec to allow specifying a list of CPU models

Addressed by: https://review.opendev.org/670297
    Add method 'get_all_required_traits' to scheduler utils

Addressed by: https://review.opendev.org/670298
    vCPU mdoels selection

Addressed by: https://review.opendev.org/670299
    Add compatibility checks for CPU mode and CPU models and extra flags

Addressed by: https://review.opendev.org/670300
    Support report multi CPU model traits

Addressed by: https://review.opendev.org/670441
    Add release note

Addressed by: https://review.opendev.org/681932
    libvirt: Correctly handle non-CPU flag traits

Addressed by: https://review.opendev.org/682267
    Fix typor of cpu model when check CPU compatibility

Addressed by: https://review.opendev.org/687808
    libvirt: Change _compare_cpu to raise InternalError

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.