Virtual function is being attached to port regardless of the exclude_devices configuration

Bug #2066989 reported by Felipe Figueroa Vergara
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
New
Medium
Unassigned

Bug Description

When configuring SR-IOV and excluding certain VFs in the exclude_devices entry of sriov_agent.ini, I encounter an issue where the excluded devices are still being attached to created ports. When I create a VM from scratch with a port attached to an excluded device, the VM creation eventually fails with the error "nova.exception.VirtualInterfaceCreateException: Virtual Interface creation failed." I suppose this is the expected behavior because the device should be excluded. However, when I create a VM and then try to attach the port with the excluded device, the port attaches without any issues. The core problem seems to be that the port with the excluded device is created regardless of its exclusion.

I use the following config for exclude a device, in the sriov_agent.ini:

[sriov_nic]
exclude_devices = enp65s0f0np0:0000:41:01.0,enp65s0f1np1:0000:41:11.0

I can still create a port on that device, and I can see the pci_slot entry on the port as pci_slot='0000:41:11.0'.

Tags: sriov-pci-pt
Revision history for this message
Brian Haley (brian-haley) wrote :

Can you give some more info on the commands you're running (openstack port create, etc) and the versions? Looking at the code I don't see any fixed in this area, but maybe there's a code path that is failing to check the excluded devices. Thanks.

tags: added: sriov-pci-pt
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
Felipe Figueroa Vergara (felipeafv) wrote :

Here is an example of what I'm doing for VMs created from scratch with the port attached:

1. Create the SR-IOV ports using openstack port create (for each port).
2. Create the server using openstack server create.

With this process, when I create the last VM (which is forced to use the excluded device), it stays in build status for about 6 minutes before failing to create. Checking the Nova compute logs, I see the error "Virtual Interface creation failed."

The other process I use involves creating a single VM and then attaching the SR-IOV ports with the following steps:

1. Create the server using openstack server create.
2. Create the SR-IOV ports using openstack port create (for each port).
3. Attach the ports to the server using openstack server add port.

With this process, I can attach all the SR-IOV virtual functions to the VM, including the one excluded by the exclude_devices directive.

The versions I’m using are:
nova 26.2.3
neutron 21.2.1.dev58

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello Felipe:

While trying locally to reserve a SRIOV environment to test that, let me ask you:
- What is the DEBUG output of the SRIOV agent in the first case? When the VM creation fails with the ``VirtualInterfaceCreateException``.
- What is the DEBUG output of the SRIOV agent in the second case? Is there any exception? Is the port bound in Neutron?

Regards.

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.