← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1620434] [NEW] nova-compute fails to boot when wrong setting value in pci_whitelist

 

Public bug reported:

Description
===========
when I wrong config nova.conf with a space in the head of
product_id in pci_whitelist, it would cause the nova-compute
service boot failed. it shows:

    Trace:
     get_pci_dev_info(self, 'product_id', MAX_PRODUCT_ID, '%04x')
     File "/opt/stack/nova/nova/pci/devspec.py", line 37, in \
       get_pci_dev_info
       v = get_value(a)
     File "/opt/stack/nova/nova/pci/devspec.py", line 30, in \
       get_value
       return ast.literal_eval("0x" + v)
     File "/usr/lib/python2.7/ast.py", line 49, in literal_eval
       node_or_string = parse(node_or_string, mode='eval')
     File "/usr/lib/python2.7/ast.py", line 37, in parse
       return compile(source, filename, mode, PyCF_ONLY_AST)
     File "<unknown>", line 1
       0x 1347
        ^
    SyntaxError: invalid token

Notes that same operation for vendor_id is ok.

Steps to reproduce
==================
1. pci_passthrough_whitelist=[{"vendor_id":"8086","product_id":" 15a3"}]
                                                             ^
2. restart nova-compute service.


Expected result
===============
nova-compute boot success.

Actual result
=============
nova-compute boot failure.

** Affects: nova
     Importance: Undecided
     Assignee: Chen Fan (fan-chen)
         Status: In Progress

-- 
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/1620434

Title:
  nova-compute fails to boot when wrong setting value in pci_whitelist

Status in OpenStack Compute (nova):
  In Progress

Bug description:
  Description
  ===========
  when I wrong config nova.conf with a space in the head of
  product_id in pci_whitelist, it would cause the nova-compute
  service boot failed. it shows:

      Trace:
       get_pci_dev_info(self, 'product_id', MAX_PRODUCT_ID, '%04x')
       File "/opt/stack/nova/nova/pci/devspec.py", line 37, in \
         get_pci_dev_info
         v = get_value(a)
       File "/opt/stack/nova/nova/pci/devspec.py", line 30, in \
         get_value
         return ast.literal_eval("0x" + v)
       File "/usr/lib/python2.7/ast.py", line 49, in literal_eval
         node_or_string = parse(node_or_string, mode='eval')
       File "/usr/lib/python2.7/ast.py", line 37, in parse
         return compile(source, filename, mode, PyCF_ONLY_AST)
       File "<unknown>", line 1
         0x 1347
          ^
      SyntaxError: invalid token

  Notes that same operation for vendor_id is ok.

  Steps to reproduce
  ==================
  1. pci_passthrough_whitelist=[{"vendor_id":"8086","product_id":" 15a3"}]
                                                               ^
  2. restart nova-compute service.

  
  Expected result
  ===============
  nova-compute boot success.

  Actual result
  =============
  nova-compute boot failure.

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


Follow ups