<div dir="ltr"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Jay Pipes <<a href="mailto:jaypipes@gmail.com">jaypipes@gmail.com</a>> 于2018年10月5日周五 下午9:25写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Added [ironic] topic.<br>
<br>
On 10/04/2018 06:06 PM, Chris Friesen wrote:<br>
> While discussing the "Add HPET timer support for x86 guests" <br>
> blueprint[1] one of the items that came up was how to represent what are <br>
> essentially flags that impact both scheduling and configuration.  Eric <br>
> Fried posted a spec to start a discussion[2], and a number of nova <br>
> developers met on a hangout to hash it out.  This is the result.<br>
> <br>
> In this specific scenario the goal was to allow the user to specify that <br>
> their image required a virtual HPET.  For efficient scheduling we wanted <br>
> this to map to a placement trait, and the virt driver also needed to <br>
> enable the feature when booting the instance.  (This can be generalized <br>
> to other similar problems, including how to specify scheduling and <br>
> configuration information for Ironic.)<br>
> <br>
> We discussed two primary approaches:<br>
> <br>
> The first approach was to specify an arbitrary "key=val" in flavor <br>
> extra-specs or image properties, which nova would automatically <br>
> translate into the appropriate placement trait before passing it to <br>
> placement.  Once scheduled to a compute node, the virt driver would look <br>
> for "key=val" in the flavor/image to determine how to proceed.<br>
> <br>
> The second approach was to directly specify the placement trait in the <br>
> flavor extra-specs or image properties.  Once scheduled to a compute <br>
> node, the virt driver would look for the placement trait in the <br>
> flavor/image to determine how to proceed.<br>
> <br>
> Ultimately, the decision was made to go with the second approach.  The <br>
> result is that it is officially acceptable for virt drivers to key off <br>
> placement traits specified in the image/flavor in order to turn on/off <br>
> configuration options for the instance.  If we do get down to the virt <br>
> driver and the trait is set, and the driver for whatever reason <br>
> determines it's not capable of flipping the switch, it should fail.<br>
<br>
Ironicers, pay attention to the above! :) It's a green light from Nova <br>
to use the traits list contained in the flavor extra specs and image <br>
metadata when (pre-)configuring an instance.<br>
<br>
> It should be noted that it only makes sense to use placement traits for <br>
> things that affect scheduling.  If it doesn't affect scheduling, then it <br>
> can be stored in the flavor extra-specs or image properties separate <br>
> from the placement traits.  Also, this approach only makes sense for <br>
> simple booleans.  Anything requiring more complex configuration will <br>
> likely need additional extra-spec and/or config and/or unicorn dust.<br>
<br>
Ironicers, also pay close attention to the advice above. Things that are <br>
not "scheduleable" -- in other words, things that don't filter the list <br>
of hosts that a workload can land on -- should not go in traits.<br></blockquote><div><br></div><div>++, see I talk about the same thing before <a href="https://review.openstack.org/#/c/504952/5/specs/approved/config-template-traits.rst@95">https://review.openstack.org/#/c/504952/5/specs/approved/config-template-traits.rst@95</a> :) </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Finally, here's the HPET os-traits patch. Reviews welcome (it's tiny patch):<br>
<br>
<a href="https://review.openstack.org/608258" rel="noreferrer" target="_blank">https://review.openstack.org/608258</a><br>
<br>
Best,<br>
-jay<br>
<br>
> Chris<br>
> <br>
> [1] <a href="https://blueprints.launchpad.net/nova/+spec/support-hpet-on-guest" rel="noreferrer" target="_blank">https://blueprints.launchpad.net/nova/+spec/support-hpet-on-guest</a><br>
> [2] <br>
> <a href="https://review.openstack.org/#/c/607989/1/specs/stein/approved/support-hpet-on-guest.rst" rel="noreferrer" target="_blank">https://review.openstack.org/#/c/607989/1/specs/stein/approved/support-hpet-on-guest.rst</a> <br>
> <br>
> <br>
> __________________________________________________________________________<br>
> OpenStack Development Mailing List (not for usage questions)<br>
> Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div></div></div>