<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="">
<p style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt; margin-top: 0px; margin-bottom: 0px;">
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">Hi All,</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">Currently I am working on implementation of cpu pinning upgrade part as mentioned in the spec [1].</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">While implementing the scheduler pre-filter as mentioned in [1], I have encountered one big issue:</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">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.<span class="Apple-converted-space"> </span></p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">So when user will create a new instance<span class="Apple-converted-space">
</span>or execute instance actions like shelve, unshelve, resize, evacuate and migration<span class="Apple-converted-space">
</span>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:-</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">For example:</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">I have two compute nodes say A and B:</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">On Stein:</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">Compute node A configurations:</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">vcpu_pin_set=0-3 (used as dedicated CPU, This host is added in aggregate which has “pinned” metadata)</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">Compute node B Configuration:</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">vcpu_pin_set=0-3 (used as dedicated CPU, This host is added in aggregate which has “pinned” metadata)</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">On Train, two possible scenarios:</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">Compute node A configurations: (Consider the new cpu pinning implementation is merged into Train)</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">vcpu_pin_set=0-3<span class="Apple-converted-space">
</span>(Keep same settings as in Stein)</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">Compute node B Configuration: (Consider the new cpu pinning implementation is merged into Train)</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">cpu_dedicated_set=0-3 (change to the new config option)</p>
<ol style="list-style-type: decimal;">
<li style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;"><span style="color: rgb(69, 69, 69); font-family: "Helvetica Neue"; font-size: 12px;">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.</span></li><li style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;"><span style="color: rgb(69, 69, 69); font-family: "Helvetica Neue"; font-size: 12px;"><span style="color: rgb(69, 69, 69); font-family: "Helvetica Neue"; font-size: 12px;">Now when
user will perform</span><span class="Apple-converted-space" style="color: rgb(69, 69, 69); font-family: "Helvetica Neue"; font-size: 12px;"> </span><span style="color: rgb(69, 69, 69); font-family: "Helvetica Neue"; font-size: 12px;">instance action say shelve/unshelve
scheduler pre-filter will change the request_spec flavor extra spec from ``hw:cpu_policy`` to </span><span style="color: rgb(69, 69, 69); font-family: "Helvetica Neue"; font-size: 12px; white-space: pre;"></span><span style="color: rgb(69, 69, 69); font-family: "Helvetica Neue"; font-size: 12px; white-space: pre;"></span><span style="color: rgb(69, 69, 69); font-family: "Helvetica Neue"; font-size: 12px;">``resources=PCPU:$<no.
of cpus>`` which ultimately will return only compute node B from placement service. Here, we expect it should have retuned both </span><span style="color: rgb(69, 69, 69); font-family: "Helvetica Neue"; font-size: 12px;">Compute A and Compute B.</span></span></li><li style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">If user creates a new instance using old extra specs (hw:cpu_policy=dedicated, "aggregate_instance_extra_specs:pinned": "true") on Train release<span class="Apple-converted-space"> </span>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.</li></ol>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;"><span style="white-space:pre"></span></p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">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.</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">Propose changes:<span class="Apple-converted-space"> </span></p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">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.</p>
<ol style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt; list-style-type: decimal;">
<li style="margin:0px; font:12px "Helvetica Neue"; color:rgb(69,69,69)">Remove cpu_policy from extra specs</li><li style="margin:0px; font:12px "Helvetica Neue"; color:rgb(69,69,69)">Add “resources:PCPU=<count>” in extra specs</li></ol>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">We can also change the flavor extra specs and image metadata properties of instance and request_spec object using the reshape functionality.</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px;">Please give us your feedback on the proposed solution so that we can update specs accordingly.</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
[1]: <a href="https://review.opendev.org/#/c/555081/28/specs/train/approved/cpu-resources.rst@451" class="OWAAutoLink" id="LPlnk830191" previewremoved="true">https://review.opendev.org/#/c/555081/28/specs/train/approved/cpu-resources.rst@451</a> <span style="text-decoration-line: underline;"><span class="Apple-converted-space"></span></span></p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
[2]: <a href="https://review.opendev.org/#/c/555081/23..28/specs/train/approved/cpu-resources.rst" class="OWAAutoLink" id="LPlnk469968" previewremoved="true">https://review.opendev.org/#/c/555081/23..28/specs/train/approved/cpu-resources.rst</a> </p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
<br>
</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
Thanks and Regards,</p>
<p style="color: rgb(69, 69, 69); font: 12px "Helvetica Neue"; margin: 0px; min-height: 14px;">
-Bhagyashri Shewale-</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
</p>
</div>
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.
</body>
</html>