<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi, Beliveau, Ludovic <br>
<br>
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.<br>
pci_alias_opt = cfg.MultiStrOpt<br>
<br>
Yongli He<br>
<br>
<br>
在 2015年10月27日 23:44, Beliveau, Ludovic 写道:<br>
</div>
<blockquote
cite="mid:0ABA934FAB0ECA4C8903465033D3FFC73BF01262@ALA-MBB.corp.ad.wrs.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>