# Packstack pci passthrough for allinone-answers.cfg

I'm trying to install an OpenStack (Queens) Controller and two Compute nodes configured for PCI Passthrough. The OS is CentOS 7.6. Based on the documentation I've found, the two "allinone-answers.cfg" commands I should be using are:

(I obtained the values by using "lspci -nn | grep 'Network Connection'" on the Compute nodes. They are for an Intel i350 4-port GbE card.)

Regardless of the variation used (with or without spaces, quotes, curved brackets, etc.) they still generate a similar version of this error: “Evaluation Error: Error while evaluating a Function Call, Syntax error: {"vendor_id:8086", "product_id:1521", "device_type:type-PCI", "name:GbE_eno2"} is not an Array or JSON encoded String at /var/tmp/packstack/182ec9b79e4e44378e8bc7ebfde8c208/modules/nova/manifests/compute/pci.pp:24:25 on node cmpt-1.netscout.com”

Is there an additional command(s) I should be using? Is there a nuance about the two commands that I'm missing?

edit retag close merge delete

I don't know the syntax, but if packstack wants an array, try

[･･･]


{･･･}


Plus, you may have to quote the whole thing.

( 2019-08-02 18:42:55 -0500 )edit

Bernd,

Thanks for the comment. I gave it a shot, but I got the same results.

Is it possible that the Packstack answer file commands aren't supposed to be interpreted as "an Array or JSON encoded"?

( 2019-08-03 13:35:23 -0500 )edit

The JSON Formatter and Validator URL (https://jsonformatter.curiousconcept.com/ (https://jsonformatter.curiousconcept....)) seems to be indicating that the error is with "CONFIG_NOVA_PCI_ALIAS" ("Expecting object or array, not string"), not with "{"vendor_id":"8086", "product_id":"1521", "device_type":"type-PCI", "name":"GbE_eno2"}".

( 2019-08-03 13:46:16 -0500 )edit

According to https://opendev.org/x/packstack/src/b..., it should not be a set, nor a list, but a list of sets. E.g.

[{"vendor_id":"1234", "product_id":"5678", "name":"default"}, {...}]


If you wonder how I found it: http://codesearch.openstack.org.

( 2019-08-03 17:44:25 -0500 )edit

Sort by » oldest newest most voted

The problem was a mis-match between two components of the configuration. According to "https://docs.openstack.org/nova/queens/admin/pci-passthrough.html" there are several steps to configuring PCI-Passthrough. (1) One of those steps is to "Configure a flavor" on the Controller node. The website's example is '# openstack flavor set m1.large --property "pci_passthrough:alias"="a1:2"' where the ":2" means two PCI devices. In other words, ONLY those Compute nodes that have two matching PCI devices will be able to use this flavor. (2) The other of those two mis-matched steps is to "Configure PCI devices" on the Compute node, or more precisely, to configure each Compute node's whitelist. The number of entries in each whitelist MUST match the number of PCI devices specified in its corresponding flavor defined in the "Configure a flavor" step. The website's example for a PCI device's address is 'passthrough_whitelist = { "address": "0000:41:00.0" }'. Notice that the flavor example specifies two PCI devices, but the whitelist example only specifies one address. That was the problem. The syntax to specify two whitelisted addresses (to match the flavor's requested number of PCI devices) is 'passthrough_whitelist = { "address": "0000:41:00.0" }, { "address": "0000:41:00.1"}]'. To specify only one, use the format of the whitelist example and change the flavor command from ":2" to ":1".

more

# Get to know Ask OpenStack

Resources for moderators