← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1513513] [NEW] Support configuration of multiple pci_alias with an array

 

Public bug reported:

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 <jenkins@xxxxxxxxxxxxxxxxxxxx>
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.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1513513

Title:
  Support configuration of multiple pci_alias with an array

Status in OpenStack Compute (nova):
  New

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 <jenkins@xxxxxxxxxxxxxxxxxxxx>
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1513513/+subscriptions


Follow ups