[openstack-dev] pci_alias
Beliveau, Ludovic
Ludovic.Beliveau at windriver.com
Tue Oct 27 15:44:17 UTC 2015
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151027/c549235a/attachment.html>
More information about the OpenStack-dev
mailing list