Failed to specify a PF PCI passthrouhg device using full PCI address format

Bug #1618984 reported by Ludovic Beliveau on 2016-08-31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Ludovic Beliveau

Bug Description

Description
===========

Booting a guest with a PF passthrough device that is specified in the pci_passthrough_whitelist using it's full PCI address (such as "0000:05:00.1") is failing to schedule. This used to work in kilo.

It appears that the PCI device is not recognized because it doesn't match any of the device spec following the pci_passthrough_whitelist.

$ mysql -u root -p
MariaDB [(none)]> use nova
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [nova]> select * from pci_devices;
Empty set (0.00 sec)

However, configuring the same PF passthrough device using a wildcarded PCI address works:

pci_passthrough_whitelist = {"address":"*:05:00.1","physical_network":"default"}

$ mysql -u root -p -e 'select * from pci_devices;' nova
Enter password:
+---------------------+------------+------------+---------+----+-----------------+--------------+------------+-----------+----------+------------------+-----------------+-----------+------------+---------------+------------+-----------+-------------+
| created_at | updated_at | deleted_at | deleted | id | compute_node_id | address | product_id | vendor_id | dev_type | dev_id | label | status | extra_info | instance_uuid | request_id | numa_node | parent_addr |
+---------------------+------------+------------+---------+----+-----------------+--------------+------------+-----------+----------+------------------+-----------------+-----------+------------+---------------+------------+-----------+-------------+
| 2016-08-30 16:57:32 | NULL | NULL | 0 | 1 | 1 | 0000:05:00.1 | 10fb | 8086 | type-PF | pci_0000_05_00_1 | label_8086_10fb | available | {} | NULL | NULL | 0 | NULL |
+---------------------+------------+------------+---------+----+-----------------+--------------+------------+-----------+----------+------------------+-----------------+-----------+------------+---------------+------------+-----------+-------------+

Steps to reproduce
==================

1) Configure a PF passthrough device in /etc/nova/nova.conf:

pci_passthrough_whitelist = {"address":"0000:05:00.1","physical_network":"default"}

2) Create a neutron port of type direct-physical:

PORTID=`neutron port-create $NETID --name sriov_port --binding:vnic_type direct | grep "\ id\ " | awk '{ print $4 }'`

2) Restart nova-api and nova-compute

3) Boot a guest with the direct-physical port:

nova boot guest --image=cirros-0.3.4-x86_64-uec --nic port-id=$PORTID --flavor=m1.small

Expected result
===============

Successfully boot the guest.

Actual result
=============

Nova fails to schedule the guest.

Environment
===========

commit dd44096a04a85319481943c1b2bb2471e752b0b3
Merge: 5bdf06e 5fb6f8f
Author: Jenkins <email address hidden>
Date: Wed Aug 31 15:39:15 2016 +0000

    Merge "rt: ensure resource provider records exist from RT"

Tags: pci Edit Tag help
Matt Riedemann (mriedem) on 2016-09-02
tags: added: pci
Changed in nova:
assignee: nobody → Stephen Finucane (stephenfinucane)
Changed in nova:
assignee: Stephen Finucane (stephenfinucane) → Ludovic Beliveau (ludovic-beliveau)

Stephen, sorry launchpad/gerrit didn't picked up my patch automatically.

Changed in nova:
status: New → In Progress
Brent Eagles (beagles) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers