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)
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.
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-