DescriptionSid Ahmed Sadouni
2017-05-17 09:45:39 UTC
Created attachment 1279612[details]
pci_alias_log_error
Hi,
We are facing an issue when we want to configure pci_alias through Director.
The template examples says :
https://github.com/openstack/puppet-nova/blob/master/manifests/api.pp#L77-L81
#[*pci_alias*]
# (optional) Pci passthrough for controller:
# Defaults to undef
# Example
# "[ {'vendor_id':'1234', 'product_id':'5678', 'name':'default'}, {...} ]"
In my env. file for parameters we set according to this :
ControllerExtraConfig:
nova::api::pci_alias: '"[{ \"vendor_id\": \"1137\", \"product_id\": \"0043\", \"name\": \"nic_pf\"}]"'
This end on the node with this line in nova.conf :
pci_alias=[{ "vendor_id": "1137", "product_id": "0043", "name": "nic_pf"}]
Which seem correct according to the example above on the code.
BUT if we run a pci_passthrough instance using this config we get the following error message (find attached the complete log) :
777:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions Failed validating 'type' in schema:
778:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions {'additionalProperties': False,
779:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'properties': {'capability_type': {'enum': ['pci'],
780:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'type': 'string'},
781:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'device_type': {'enum': ['type-PCI',
782:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'type-PF',
783:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'type-VF'],
784:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'type': 'string'},
785:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'name': {'maxLength': 256,
786:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'minLength': 1,
787:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'type': 'string'},
788:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'product_id': {'pattern': '^([\\da-fA-F]{4})$',
789:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'type': 'string'},
790:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'vendor_id': {'pattern': '^([\\da-fA-F]{4})$',
791:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'type': 'string'}},
792:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'required': ['name'],
793:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions 'type': 'object'}
794:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions
795:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions On instance:
796:2017-05-16 13:32:24.685 7607 ERROR nova.api.openstack.extensions [{u'name': u'nic_pf', u'product_id': u'0043', u'vendor_id': u'1137'}]
798:2017-05-16 13:32:24.736 7607 INFO nova.api.openstack.wsgi [req-46fe1440-740f-4297-8dca-3057f1bfab50 ac6792dca2e3403ab6ce39ccbaf53c4d c6d5152354584c069a4798cc813f07aa - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
If we change the pci_alias syntax in nova.conf as below and following openstack documentation :
pci_alias: { "vendor_id": "1137", "product_id": "0043", "name": "nic_pf"}
We don't have this error anymore and the pci_passthrough instance boot successfully.
Ref : openstack documentation : https://docs.openstack.org/admin-guide/compute-pci-passthrough.html
the code here https://github.com/openstack/puppet-nova/blob/master/manifests/api.pp#L535-L539 is done to manage multiple pci_alias.
That's why if we remove the [ ] in the parameters env file, we can't deploy ... and we also may need to configure multiple pci_alias with Director.
I have verified that giving this to the director overcloud deployment:
parameter_defaults:
ControllerExtraConfig:
nova::api::pci_alias:
- name: nic_pf
product_id: '0043'
vendor_id: '1137'
has generated this in the nova.conf on the controller:
[heat-admin@controller-0 ~]$ sudo grep -i pci /etc/nova/nova.conf
pci_alias={"product_id":"0043","name":"nic_pf","vendor_id":"1137"}
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2017:2825