[openstack-helm] How to specify nova override for multiple pci alias

Eric Fried openstack at fried.cc
Wed Feb 6 15:45:23 UTC 2019


Folks-

On 2/6/19 4:13 AM, Jean-Philippe Evrard wrote:
> On Wed, 2019-01-30 at 15:40 +0000, Gauld, James wrote:
>> How can I specify a helm override to configure nova PCI alias when
>> there are multiple aliases?
>> I haven't been able to come up with a YAML compliant specification
>> for this.
>>
>> Are there other alternatives to be able to specify this as an
>> override? I assume that a nova Chart change would be required to
>> support this custom one-alias-entry-per-line formatting.
>>
>> Any insights on how to achieve this in helm are welcomed.

<snip>

>> The following nova configuration format is desired, but not as yet
>> supported by nova:
>> [pci]
>> alias = [{dict 1}, {dict 2}]
>>
>> The following snippet of YAML works for PCI passthrough_whitelist,
>> where the value encoded is a JSON string:
>>
>> conf:
>>   nova:
>>   overrides:
>>     nova_compute:
>>       hosts:
>>       - conf:
>>           nova:
>>             pci:
>>               passthrough_whitelist: '[{"class_id": "030000",
>> "address": "0000:00:02.0"}]'

<snip>

I played around with the code as it stands, and I agree there doesn't
seem to be a way around having to specify the alias key multiple times
to get multiple aliases. Lacking some fancy way to make YAML understand
a dict with repeated keys ((how) do you handle HTTP headers?), I've
hacked up a solution on the nova side [1] which should allow you to do
what you've described above. Do you have a way to pull it down and try it?

(Caveat: I put this up as a proof of concept, but it (or anything that
messes with the existing pci passthrough mechanisms) may not be a
mergeable solution.)

-efried

[1] https://review.openstack.org/#/c/635191/



More information about the openstack-discuss mailing list