← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1613434] [NEW] Whitelisted PFs aren't being recognized

 

Public bug reported:

Note: This is with libvirt < 1.3.0 so may be specific to earlier
versions. This has also been verified on mitaka only so far. I haven't
had a chance to try on newton/master. It may have something to do with
the fact that PFs don't have parent_addrs'

Either with devname or address/vendor/product ids and also with
specifying the device_type of type-PF, physical functions are not being
included in the PCI stats information. If there are VFs present, they
are included, but not the PF itself.


I checked this by running code similar to this in an interactive python session:

import nova.pci.whitelist
from oslo_serialization import jsonutils

filter = nova.pci.whitelist.Whitelist(['[{"address":"0000:05:00.1",
"product_id":"154d", "vendor_id":"8086", "physical_network":"physnet",
"device_type":"type-PF"}]'])

# the following was extracted from debug logs on compute node where we are seeing the issue
dev_dict = jsonutils.loads('{"dev_id": "pci_0000_05_00_1", "product_id": "154d", "dev_type": "type-PF", "numa_node": 0, "vendor_id": "8086", "label": "label_8086_154d", "address": "0000:05:00.1"}')


print filter.specs[0].address.match(dev_dict['address'], dev_dict.get('parent_addr'))

# returns False
# for laughs
print filter.specs[0].address.match(None, dev_dict.get('address'))
# returns True

** 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/1613434

Title:
  Whitelisted PFs aren't being recognized

Status in OpenStack Compute (nova):
  New

Bug description:
  Note: This is with libvirt < 1.3.0 so may be specific to earlier
  versions. This has also been verified on mitaka only so far. I haven't
  had a chance to try on newton/master. It may have something to do with
  the fact that PFs don't have parent_addrs'

  Either with devname or address/vendor/product ids and also with
  specifying the device_type of type-PF, physical functions are not
  being included in the PCI stats information. If there are VFs present,
  they are included, but not the PF itself.

  
  I checked this by running code similar to this in an interactive python session:

  import nova.pci.whitelist
  from oslo_serialization import jsonutils

  filter = nova.pci.whitelist.Whitelist(['[{"address":"0000:05:00.1",
  "product_id":"154d", "vendor_id":"8086", "physical_network":"physnet",
  "device_type":"type-PF"}]'])

  # the following was extracted from debug logs on compute node where we are seeing the issue
  dev_dict = jsonutils.loads('{"dev_id": "pci_0000_05_00_1", "product_id": "154d", "dev_type": "type-PF", "numa_node": 0, "vendor_id": "8086", "label": "label_8086_154d", "address": "0000:05:00.1"}')

  
  print filter.specs[0].address.match(dev_dict['address'], dev_dict.get('parent_addr'))

  # returns False
  # for laughs
  print filter.specs[0].address.match(None, dev_dict.get('address'))
  # returns True

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


Follow ups