[openstack-dev] [nova] pci pass through turing complete config options?

Doug Hellmann doug at doughellmann.com
Thu Nov 6 08:38:26 UTC 2014


On Nov 4, 2014, at 2:38 PM, melanie witt <melwittt at gmail.com> wrote:

> On Nov 4, 2014, at 0:32, Doug Hellmann <doug at doughellmann.com> wrote:
> 
>>>> I think this is reasonable, though do we actually support setting
>>>> the same key twice ?
>> 
>> Yes, if it is registered in different groups.
> 
> I have found that for a MultiStrOpt, the same key can be set multiple times even in the same group, and the result is a list of values for that option [0].

Yes, that’s the purpose of MultiStrOpt. However, it is meant to hold a list of related items, not a list of instances of values that are essentially attributes of unrelated objects. If you have more than one property for a PCI passthrough device, you will need a separate MultiStrOpt for each one. The user will then have to ensure that they specify their options and values in order within their configuration file so that the separate arrays are populated consistently so the values in position 0 are all related and the values in position 1 are all related, etc. That is much more error prone then defining new groups and taking advantage of the syntax of the configuration file to help the user understand that a block of options is all related.

Now, all of that said, I still think you should just use a YAML file for this data.

Doug

> 
> [0] https://github.com/openstack/oslo.config/blob/11ecf18/oslo/config/cfg.py#L1011
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




More information about the OpenStack-dev mailing list