[openstack-dev] [placement] The "intended purpose" of traits

Jay Pipes jaypipes at gmail.com
Sat Sep 29 15:40:44 UTC 2018


On 09/28/2018 04:36 PM, Eric Fried wrote:
> So here it is. Two of the top influencers in placement, one saying we
> shouldn't overload traits, the other saying we shouldn't add a primitive
> that would obviate the need for that. Historically, this kind of
> disagreement seems to result in an impasse: neither thing happens and
> those who would benefit are forced to find a workaround or punt.
> Frankly, I don't particularly care which way we go; I just want to be
> able to do the things.

I don't think that's a fair statement. You absolutely *do* care which 
way we go. You want to encode multiple bits of information into a trait 
string -- such as "PCI_ADDRESS_01_AB_23_CD" -- and leave it up to the 
caller to have to understand that this trait string has multiple bits of 
information encoded in it (the fact that it's a PCI device and that the 
PCI device is at 01_AB_23_CD).

You don't see a problem encoding these variants inside a string. Chris 
doesn't either.

I *do* see a problem with it, based on my experience in Nova where this 
kind of thing leads to ugly, unmaintainable, and incomprehensible code 
as I have pointed to in previous responses.

Furthermore, your point isn't that "you just want to be able to do the 
things". Your point (and the point of others, from Cyborg and Ironic) is 
that you want to be able to use placement to pass various bits of 
information to an instance, and placement wasn't designed for that 
purpose. Nova was.

So, instead of working out a solution with the Nova team for passing 
configuration data about an instance, the proposed solution is instead 
to hack/encode multiple bits of information into a trait string. This 
proposed solution is seen as a way around having to work out a more 
appropriate solution that has Nova pass that configuration data (as is 
appropriate, since nova is the project that manages instances) to the 
virt driver or generic device manager (i.e. Cyborg) before the instance 
spawns.

I'm working on a spec that will describe a way for the user to instruct 
Nova to pass configuration data to the virt driver (or device manager) 
before instance spawn. This will have nothing to do with placement or 
traits, since this configuration data is not modeling scheduling and 
placement decisions.

I hope to have that spec done by Monday so we can discuss on the spec.

Best,
-jay



More information about the OpenStack-dev mailing list