Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1342578 - SR-IOV VF passthrough does not properly update status of parent PF upon freeing VF
SR-IOV VF passthrough does not properly update status of parent PF upon freei...
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova (Show other bugs)
9.0 (Mitaka)
All All
unspecified Severity high
: ga
: 9.0 (Mitaka)
Assigned To: Sahid Ferdjaoui
Prasanth Anbalagan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-03 10:53 EDT by Sahid Ferdjaoui
Modified: 2016-09-12 01:44 EDT (History)
12 users (show)

See Also:
Fixed In Version: openstack-nova-13.1.0-3.el7ost
Doc Type: Bug Fix
Doc Text:
When assigning an SR-IOV Virtual Function (VF) device to an instance, its corresponding Physical Function (PF) device is correctly masked as unavailable in the database. However, in past releases, deleting the instance did not update the PF as available. As a result, PCI devices were never released from the database after instances which used them were deleted. With this update, nova now maintains an in-memory tree of PCI devices, then periodically flushes it into the database. This helps update the database on information about available devices.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-11 08:23:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1567549 None None None 2016-06-03 10:53 EDT
Red Hat Product Errata RHEA-2016:1597 normal SHIPPED_LIVE Red Hat OpenStack Platform 9 Release Candidate Advisory 2016-08-11 12:06:52 EDT

  None (edit)
Description Sahid Ferdjaoui 2016-06-03 10:53:15 EDT
Assigning an SR-IOV VF device to an instance when PFs are whitelisted too correctly marks the PF as unavailable if one of it's VFs got assigned. However when we delete the instance, the PF is not makred as available.

Steps to reproduce:

1) Whitelist PFs and VFs in nova.conf (as explained in the docs) for example

    pci_passthrough_whitelist = [{"product_id":"1520", "vendor_id":"8086", "physical_network":"phynet"}, {"product_id":"1521", "vendor_id":"8086", "physical_network":"phynet"}] # Both pfs and vfs are whitelisted

2) Add an alias to assign a VF pci_alias = {"name": "vf", "device_type": "type-VF"}
3) Set up a flavor with an alias extra_spec

    $ nova flavor-key 2 set "pci_passthrough:alias"="vf:1"

4) Boot an instance with the said flavor and observe a VF being set to 'allocated' and a PF being set to 'unavailable'

    select * from pci_devices where deleted=0;

5) Delete the instance from step 4 and observe that the VF has been made available but the PF is still 'unavailable'. Both should be back to available if this was the only VF used.
Comment 6 Sahid Ferdjaoui 2016-07-13 05:07:34 EDT
Ok I finally found the problem. When we compare PCIdevice objects with a NULL value the code is raising an exception whereas returning False. I have addressed a patch upstream which also needs to be backported [1].

  https://review.openstack.org/#/c/318159/
Comment 10 errata-xmlrpc 2016-08-11 08:23:57 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-1597.html

Note You need to log in before you can comment on or make changes to this bug.