PCI-Passthrough fails when we have Flavor configured and provide a port with vnic_type=direct-physical

Bug #1768919 reported by Swaminathan Vasudevan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

PCI-Passthrough of a NIC device to the VM fails, when we have both the Flavor configured with Alias and also provide a network port with 'vnic_type=direct-physical'.

The comment shown in the source code shown below,

https://github.com/openstack/nova/blob/644ac5ec37903b0a08891cc403c8b3b63fc2a91c/nova/compute/api.py#L812
        # PCI requests come from two sources: instance flavor and
        # requested_networks. The first call in below returns an
        # InstancePCIRequests object which is a list of InstancePCIRequest
        # objects. The second call in below creates an InstancePCIRequest
        # object for each SR-IOV port, and append it to the list in the
        # InstancePCIRequests object

In this case there would be two PCI-requests for the same device and _test_pci fails when the compute tries to check for the Claims.

088d81f6653242318245b137b1ef91c7] _test_pci /opt/stack/venv/nova-20180424T164716Z/lib/python2.7/site-packages/nova/compute/claims.py:201
2018-04-30 22:17:06.058 13396 DEBUG nova.compute.claims [req-c7689c16-227a-462e-aad5-4c462036051c df7bd0a08ee64da981574d7a7d76970a 088d81f6653242318245b137b1ef91c7] pci requests: [InstancePCIRequest(alias_name='intel10fb',count=1,is_new=False,request_id=None,spec=[{dev_type='type-PF',product_id='10fb',vendor_id='8086'}]), InstancePCIRequest(alias_name=None,count=1,is_new=False,request_id=13befe5f-478f-4f4c-aa72-78cce84d942d,spec=[{dev_type='type-PF',physical_network='physnet2'}])] _test_pci /opt/stack/venv/nova-20180424T164716Z/lib/python2.7/site-packages/nova/compute/claims.py:202
2018-04-30 22:17:06.059 13396 DEBUG nova.compute.claims [req-c7689c16-227a-462e-aad5-4c462036051c df7bd0a08ee64da981574d7a7d76970a 088d81f6653242318245b137b1ef91c7] PCI request stats failed _test_pci /opt/stack/venv/nova-20180424T164716Z/lib/python2.7/site-packages/nova/compute/claims.py:206
2018-04-30 22:17:06.059 13396 DEBUG oslo_concurrency.lockutils [req-c7689c16-227a-462e-aad5-4c462036051c df7bd0a08ee64da981574d7a7d76970a 088d81f6653242318245b137b1ef91c7] Lock "compute_resources" released by "nova.compute.resource_tracker.instance_claim" :: held 0.059s inner /opt/stack/venv/nova-20180424T164716Z/lib/python2.7/site-packages/oslo_concurrency/lockutils.py:282
2018-04-30 22:17:06.060 13396 DEBUG nova.compute.manager [req-c7689c16-227a-462e-aad5-4c462036051c df7bd0a08ee64da981574d7a7d76970a 088d81f6653242318245b137b1ef91c7] [instance: 39ad3a47-66dc-4114-9653-fee5ee0c87dc] Insufficient compute resources: Claim pci failed..

Not sure why the Claim pci failed for the same device entry twice.

Probably if the device id is the same on both Flavor and network, then it should only compose one entry since they both are identical.

Tags: pci
Revision history for this message
sean mooney (sean-k-mooney) wrote :

i have closed this as a duplicate as i explain in the other bug that you miss understood how to use this feature.

based on teh in fomation you provdied on the ohter bug i am assumin you have only one nic avaiable on the host and you are requesting it twice 1 via the alais and again via the neutron port.

that is inccorect.

you need 1 device for each request.

to use neutron PF pasthough (vnic_type=direct-physical) you should not also specify a flavor alais unless you are using that to request a different device.

noav will convert a port with vnic_type=direct-phyical into a pci request internally.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.