Reviewed: https://review.openstack.org/363884 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d38d5767d15b24df455b1844dfe53ada2ebf9751 Submitter: Jenkins Branch: master
commit d38d5767d15b24df455b1844dfe53ada2ebf9751 Author: Ludovic Beliveau <[email protected]> Date: Wed Aug 31 14:27:43 2016 -0400 PCI: Fix PCI with fully qualified address Specifying a PF passthrough device in the pci_passthrough_whitelist using its fully qualified PCI address (no wildcard) causes the device to not be properly loaded. The PCI device is then not available to be assigned to any guest. In this case, the hypervisor reports the PF device without a 'parent_addr'. But in the PciAddress, match() is using it when doing the comparison to its own address. This commit changes the logic of the address matching method in PciDevSpec to only try to match the address with a physical function device when a 'parent_addr' is reported by the hypervisor. Change-Id: I5255240871d8ad5c216500f39520339efe46e84b Closes-Bug: #1613434 ** Changed in: nova Status: In Progress => Fix Released -- 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): Fix Released 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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

