<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 16 October 2017 at 17:55, Eric Fried <span dir="ltr"><<a href="mailto:openstack@fried.cc" target="_blank">openstack@fried.cc</a>></span> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">* Adding references to the specs: ironic side [1]; nova side [2] (which<br>
just merged).<br>
<br>
* Since Jay is on vacation, I'll tentatively note his vote by proxy [3]<br>
that ironic should be the source of truth - i.e. option (a).  I think<br>
the upshot is that it's easier for Ironic to track and resolve conflicts<br>
than for the virt driver to do so.<span><br></span></blockquote><div><br></div><div>As I see it, all of these options have Ironic as the source of truth for Nova.</div><div><br></div><div>Driver here is about the Ironic drivers, not Nova virt driver.</div><div><br></div><div> > The downside is obvious - with a lot of deploy templates</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
> available it can be a lot of manual work.<br>
<br>
</span>* How does option (b) help with this?<br></blockquote><div><br></div><div>The operator defines the configuration templates. The driver could then report traits for any configuration templates that it knows it a given node can support.</div><div><br></div><div>But I suspect a node would have to boot up an image to check if a given set of RAID or BIOS parameters are valid. Is that correct? I am sure there are way to cache things that could help somewhat.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">* I suggested a way to maintain the "source" of a trait (operator,<br>
inspector, etc.) [4] which would help with resolving conflicts.<br>
However, I agree it would be better to avoid this extra complexity if<br>
possible.<br></blockquote><div><br></div><div>That is basically (b.2).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
* This is slightly off topic, but it's related and will eventually need<br>
to be considered: How are you going to know whether a<br>
UEFI-capable-but-not-enabled node should have its UEFI mode turned on?<br>
Are you going to parse the traits specified in the flavor?  (This might<br>
work for Ironic, but will be tough in the general case.)<br>
<br>
[1] <a href="https://review.openstack.org/504531" rel="noreferrer" target="_blank">https://review.openstack.org/5<wbr>04531</a></blockquote><div> </div><div>Also the other ironic spec: <a href="https://review.openstack.org/#/c/504952">https://review.openstack.org/#/c/504952</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[2] <a href="https://review.openstack.org/507052" rel="noreferrer" target="_blank">https://review.openstack.org/5<wbr>07052</a><br>
[3]<br>
<a href="https://review.openstack.org/#/c/507052/4/specs/queens/approved/ironic-traits.rst@88" rel="noreferrer" target="_blank">https://review.openstack.org/#<wbr>/c/507052/4/specs/queens/appro<wbr>ved/ironic-traits.rst@88</a><br>
[4]<br>
<a href="https://review.openstack.org/#/c/504531/4/specs/approved/node-traits.rst@196" rel="noreferrer" target="_blank">https://review.openstack.org/#<wbr>/c/504531/4/specs/approved/nod<wbr>e-traits.rst@196</a><br>
<div class="gmail-m_-1379420386307457351HOEnZb"><div class="gmail-m_-1379420386307457351h5"><br>
On 10/16/2017 11:24 AM, Dmitry Tantsur wrote:<br>
> Hi all,<br>
><br>
> I promised John to dump my thoughts on traits to the ML, so here we go :)<br>
><br>
> I see two roles of traits (or kinds of traits) for bare metal:<br>
> 1. traits that say what the node can do already (e.g. "the node is<br>
> doing UEFI boot")<br>
> 2. traits that say what the node can be *configured* to do (e.g. "the node can<br>
> boot in UEFI mode")<br>
><br>
> This seems confusing, but it's actually very useful. Say, I have a flavor that<br>
> requests UEFI boot via a trait. It will match both the nodes that are already in<br>
> UEFI mode, as well as nodes that can be put in UEFI mode.<br>
><br>
> This idea goes further with deploy templates (new concept we've been thinking<br>
> about). A flavor can request something like CUSTOM_RAID_5, and it will match the<br>
> nodes that already have RAID 5, or, more interestingly, the nodes on which we<br>
> can build RAID 5 before deployment. The UEFI example above can be treated in a<br>
> similar way.<br>
><br>
> This ends up with two sources of knowledge about traits in ironic:<br>
> 1. Operators setting something they know about hardware ("this node is in UEFI<br>
> mode"),<br>
> 2. Ironic drivers reporting something they<br>
>   2.1. know about hardware ("this node is in UEFI mode" - again)<br>
>   2.2. can do about hardware ("I can put this node in UEFI mode")<br>
><br>
> For case #1 we are planning on a new CRUD API to set/unset traits for a node.<br>
> Case #2 is more interesting. We have two options, I think:<br>
><br>
> a) Operators still set traits on nodes, drivers are simply validating them. E.g.<br>
> an operators sets CUSTOM_RAID_5, and the node's RAID interface checks if it is<br>
> possible to do. The downside is obvious - with a lot of deploy templates<br>
> available it can be a lot of manual work.<br>
><br>
> b) Drivers report the traits, and they get somehow added to the traits provided<br>
> by an operator. Technically, there are sub-cases again:<br>
>   b.1) The new traits API returns a union of operator-provided and<br>
> driver-provided traits<br>
>   b.2) The new traits API returns only operator-provided traits; driver-provided<br>
> traits are returned e.g. via a new field (node.driver_traits). Then nova will<br>
> have to merge the lists itself.<br></div></div></blockquote><div><br></div><div>As an alternative, we could enable a configuration template by Resource Class.</div><div>That way its explicit, but you don't have to set it on every node?<br></div><div><br></div><div>I think we would then need a version of (b.1) to report that extra trait up to Nova, based on the given Resource Class.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-m_-1379420386307457351HOEnZb"><div class="gmail-m_-1379420386307457351h5">
> My personal favorite is the last option: I'd like a clear distinction between<br>
> different "sources" of traits, but I'd also like to reduce manual work for<br>
> operators.<br></div></div></blockquote><div><br></div><div>I am all for making an operators lives easier, but personally I lean towards explicitly enabling things, hence my current preference for (a).</div><div><br></div><div>I would be tempted to add (b.2) as a second step, after we get (a) working and tested.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-m_-1379420386307457351HOEnZb"><div class="gmail-m_-1379420386307457351h5">> A valid counter-argument is: what if an operator wants to override a<br>
> driver-provided trait? E.g. a node can do RAID 5, but I don't want this<br>
> particular node to do it for any reason. I'm not sure if it's a valid case, and<br>
> what to do about it.<br></div></div></blockquote><div><br></div><div>I could claim some horrid performance bug in a RAID controller might mean you want that, but I am just making that up.<br></div><div><br></div><div>I was imagining for given set of nodes, you want to QA only a certain set of RAID configs, and those are the ones you offer and that is a different set to some other set of nodes, even if they could support the configs supplied for the other nodes. Right now those restrictions will just map to Nova flavors you create, but longer term that might cause problems. Maybe it is to have six disks configured the same was as five disks, just with one disk unused, maybe you don't want that?</div><div><br></div><div>I am curious, can we validate if the params are valid for RAID and BIOS config without trying it out on a given host? How would we do that for all nodes once a new configuration template is added?</div><div><br></div><div>Thanks,</div><div>John</div></div></div></div>