<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
I'm configuring multiple pci_alias like so:<br>
<br>
pci_alias=[{"vendor_id":"8086", "product_id":"0443", "name":"a1"}, {"vendor_id":"8086", "product_id":"0443", "name":"a2"}]<br>
<br>
But I'm getting the following error when booting an instance:<br>
<pre wrap=""><big>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)
</big></pre>
<br>
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 ?<br>
<br>
The workaround to this issue would be to declare each pci_alias in a separate line in nova.conf:<br>
<br>
pci_alias={"vendor_id":"8086", "product_id":"0443", "name":"a1"} <br>
pci_alias={"vendor_id":"8086", "product_id":"0443", "name":"a2"}<br>
<br>
This format is valid for a pci_passthrough_whitelist, I think for clarity and consistency they should align.<br>
<br>
Furthermore, the nova puppet module (puppet/modules/nova/manifests/api.pp) is also expecting the pci_alias to be defined as a list.<br>
<br>
Thanks,<br>
/ludovic<br>
</body>
</html>