Support configuration of multiple pci_alias with an array

Bug #1513513 reported by Ludovic Beliveau
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Wishlist
Unassigned

Bug Description

Nova code doesn't currently support defining multiple pci_alias using an array.

This is not aligned with packstack. See manifests/api.pp:
# [*pci_alias*]
# (optional) Pci passthrough for controller:
# Defaults to undef
# Example
# "[ {'vendor_id':'1234', 'product_id':'5678', 'name':'default'}, {...} ]"

Version:
commit e52d236a3f1740997890cad9d4726df01d5a7e5d
Merge: 961e330 86fe90f
Author: Jenkins <email address hidden>
Date: Thu Nov 5 01:22:54 2015 +0000

    Merge "cells: add debug logging to bdm_update_or_create_at_top"

Log:

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)

Reproduce steps:

1) Configure pci_alias in nova.conf: pci_alias=[{"vendor_id":"8086", "product_id":"0443", "name":"a1"}, {"vendor_id":"8086", "product_id":"0443", "name":"a2"}]

2) Create a flavor with "pci_passthrough:alias=a1:1".

3) Boot an instance with this flavor.

Expected result:

Instance get successfully booted

Actual result:

Instance fails to start

Workaround:

It's possible to configure multiple pci_alias by having them each separate on their own config line:
    pci_alias={"vendor_id":"8086", "product_id":"0443", "name":"a1"}
    pci_alias={"vendor_id":"8086", "product_id":"0443", "name":"a2"}
But this is still not aligned with packstack.

Revision history for this message
Ludovic Beliveau (ludovic-beliveau) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/242555

Changed in nova:
assignee: nobody → Ludovic Beliveau (ludovic-beliveau)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/242555
Reason: This patch has been idle for a long time, so I am abandoning it to keep the review clean sane. If you're interested in still working on this patch, then please unabandon it and upload a new patchset.

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

Based on the comments in the abandoned review [1] this is a new feature which needs a (trivial) blueprint at least. Feature requests for nova are
done with blueprints [1] and with specs [2]. I'll recommend to read [3]
if not yet done. To focus here on bugs which are a failures/errors/faults
I close this one as "Invalid". The effort to implement the requested
feature is then driven only by the blueprint (and spec).

If there are any questions left, feel free to contact me (markus_z)
in the IRC channel #openstack-nova

[1] https://blueprints.launchpad.net/nova/
[2] https://github.com/openstack/nova-specs
[3] https://wiki.openstack.org/wiki/Blueprints

Changed in nova:
status: In Progress → Opinion
importance: Undecided → Wishlist
assignee: Ludovic Beliveau (ludovic-beliveau) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.