[openstack-dev] pci_alias

yongli he yongli.he at intel.com
Tue Mar 1 01:19:28 UTC 2016


Hi, Beliveau, Ludovic

currently the alias define as a multiple string option item. this make 
the code look this configure option is a array, but user define it 
multiple times instead of a array.
pci_alias_opt = cfg.MultiStrOpt

Yongli He


在 2015年10月27日 23:44, Beliveau, Ludovic 写道:
> Hi,
>
> I'm configuring multiple pci_alias like so:
>
>     pci_alias=[{"vendor_id":"8086", "product_id":"0443", "name":"a1"}, 
> {"vendor_id":"8086", "product_id":"0443", "name":"a2"}]
>
> But I'm getting the following error when booting an instance:
> ERROR (BadRequest): Invalid PCI alias definition: [{u'vendor_id': 
> u'8086', u'product_id': u'0443', u'name': u'a1'}, {u'vendor_id': 
> u'8086', u'product_id': u'0443', u'name': u'a2'}] is not of type 
> 'object' Failed validating 'type' in schema: {'additionalProperties': 
> False, 'properties': {'capability_type': {'enum': ['pci'], 'type': 
> 'string'}, 'device_type': {'enum': ['NIC', 'ACCEL', 'GPU'], 'type': 
> 'string'}, 'name': {'maxLength': 256, 'minLength': 1, 'type': 
> 'string'}, 'product_id': {'pattern': '^([\\da-fA-F]{4})$', 'type': 
> 'string'}, 'vendor_id': {'pattern': '^([\\da-fA-F]{4})$', 'type': 
> 'string'}}, 'required': ['name'], 'type': 'object'} On instance: 
> [{u'name': u'a1', u'product_id': u'0443', u'vendor_id': u'8086'}, 
> {u'name': u'a2', u'product_id': u'0443', u'vendor_id': u'8086'}] (HTTP 
> 400) (Request-ID: req-3fe994bc-6a99-4c0c-be98-1a22703c58ee)
>
> Based on the code, the default value for the pci_alias is an array.  
> So I'm expecting that defining multiple pci_alias withing an array 
> would be supported.  Or am I missing something ?
>
> The workaround to this issue would be to declare each pci_alias in a 
> separate line in nova.conf:
>
>     pci_alias={"vendor_id":"8086", "product_id":"0443", "name":"a1"}
>     pci_alias={"vendor_id":"8086", "product_id":"0443", "name":"a2"}
>
> This format is valid for a pci_passthrough_whitelist, I think for 
> clarity and consistency they should align.
>
> Furthermore, the nova puppet module 
> (puppet/modules/nova/manifests/api.pp) is also expecting the pci_alias 
> to be defined as a list.
>
> Thanks,
> /ludovic
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160301/eb37b1eb/attachment.html>


More information about the OpenStack-dev mailing list