[nova] Spec: Standardize CPU resource tracking
Shewale, Bhagyashri
Bhagyashri.Shewale at nttdata.com
Wed Jun 12 09:10:04 UTC 2019
Hi All,
Currently I am working on implementation of cpu pinning upgrade part as mentioned in the spec [1].
While implementing the scheduler pre-filter as mentioned in [1], I have encountered one big issue:
Proposed change in spec: In scheduler pre-filter we are going to alias request_spec.flavor.extra_spec and request_spec.image.properties form ``hw:cpu_policy`` to ``resources=(V|P)CPU:${flavor.vcpus}`` of existing instances.
So when user will create a new instance or execute instance actions like shelve, unshelve, resize, evacuate and migration post upgrade it will go through scheduler pre-filter which will set alias for `hw:cpu_policy` in request_spec flavor ``extra specs`` and image metadata properties. In below particular case, it won’t work:-
For example:
I have two compute nodes say A and B:
On Stein:
Compute node A configurations:
vcpu_pin_set=0-3 (used as dedicated CPU, This host is added in aggregate which has “pinned” metadata)
Compute node B Configuration:
vcpu_pin_set=0-3 (used as dedicated CPU, This host is added in aggregate which has “pinned” metadata)
On Train, two possible scenarios:
Compute node A configurations: (Consider the new cpu pinning implementation is merged into Train)
vcpu_pin_set=0-3 (Keep same settings as in Stein)
Compute node B Configuration: (Consider the new cpu pinning implementation is merged into Train)
cpu_dedicated_set=0-3 (change to the new config option)
1. Consider that one instance say `test ` is created using flavor having old extra specs (hw:cpu_policy=dedicated, "aggregate_instance_extra_specs:pinned": "true") in Stein release and now upgraded Nova to Train with the above configuration.
2. Now when user will perform instance action say shelve/unshelve scheduler pre-filter will change the request_spec flavor extra spec from ``hw:cpu_policy`` to ``resources=PCPU:$<no. of cpus>`` which ultimately will return only compute node B from placement service. Here, we expect it should have retuned both Compute A and Compute B.
3. If user creates a new instance using old extra specs (hw:cpu_policy=dedicated, "aggregate_instance_extra_specs:pinned": "true") on Train release with the above configuration then it will return only compute node B from placement service where as it should have returned both compute Node A and B.
Problem: As Compute node A is still configured to be used to boot instances with dedicated CPUs same behavior as Stein, it will not be returned by placement service due to the changes in the scheduler pre-filter logic.
Propose changes:
Earlier in the spec [2]: The online data migration was proposed to change flavor extra specs and image metadata properties of request_spec and instance object. Based on the instance host, we can get the NumaTopology of the host which will contain the new configuration options set on the compute host. Based on the NumaTopology of host, we can change instance and request_spec flavor extra specs.
1. Remove cpu_policy from extra specs
2. Add “resources:PCPU=<count>” in extra specs
We can also change the flavor extra specs and image metadata properties of instance and request_spec object using the reshape functionality.
Please give us your feedback on the proposed solution so that we can update specs accordingly.
[1]: https://review.opendev.org/#/c/555081/28/specs/train/approved/cpu-resources.rst@451
[2]: https://review.opendev.org/#/c/555081/23..28/specs/train/approved/cpu-resources.rst
Thanks and Regards,
-Bhagyashri Shewale-
Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190612/584d7463/attachment.html>
More information about the openstack-discuss
mailing list