Allow specifying cpu model in flavor extra-specs or image metadata

Registered by Chris Friesen on 2015-03-25

An end-user may want to write high-performance software that depends on certain CPU features (SSE4.2, AVX, AVX2, LZCNT, FMA, BMI, etc) being available. Currently we only allow specifying the CPU model as part of the compute node configuration, and there is no easy way to select hosts based on the CPU model.

This feature will allow specifying the desired CPU model as "hw:cpu_model=<model>" in the flavor extra specs, or "hw_cpu_model=<model>" in the image metadata, where model is specified the same way as in the config file . Alternately, the minimum required CPU features could be specified as "hw:cpu_features=<feat_1>[,<feat_?>]..." in the flavor extra specs or "hw_cpu_features=<feat_1>[,<feat_?>]..." in the image metadata.

A new scheduler filter will be written to filter out hosts with CPUs that are lower-grade than the specified model (or that can't provide the specified features), and libvirt will be modified to set the instance CPU model to the specified model.

As far as API changes, I'm not sure if the metadata/extra specs stuff counts as an API change or not since it's basically arbitrary data that happens to have meaning. Also, depending on implementation there could be new exception messages returned as part of the existing error code due to setting incompatible CPU models on both flavor and image.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Chris Friesen
Direction:
Needs approval
Assignee:
Chris Friesen
Definition:
New
Series goal:
Proposed for liberty
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/cpu-model-per-flavor-or-image,n,z

Addressed by: https://review.openstack.org/168982
    Allow specifying cpu model in flavor extra-specs or image metadata

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.