[Yahoo-eng-team] [Bug 2008238] [NEW] SRIOV port binding_profile attributes for OVS hardware offload are stripped on instance deletion or port detachment

2023-02-23 Thread Stig Telfer
Public bug reported:

Description
===

This issue applies for systems using SRIOV with Mellanox ASAP2 SDN
offloads.

An SRIOV port capable for ASAP2 SDN acceleration (OVS hardware offloads)
has 'capabilities=[switchdev]' added to the port binding_profile.

After a VM has been created with SRIOV port attached, the port can no
longer be used for subsequent VM builds.  Attempt to reuse the port
results in an error of the form "Cannot set interface MAC/vlanid to
/ for ifname ens1f0 vf 7: Operation not supported"

The underlying issue appears to be that when an SRIOV port is detached
from a VM, or the VM is destroyed, the capabilities=[switchdev] property
is removed from the port binding_profile.  This converts the port from
ASAP2 to “Legacy SRIOV” (in Mellanox-speak) and makes it unusable.

If the port binding_profile property is restored then the port can be
successfully reused.

The property is preserved during live migration, instance resizes and
rebuilds.  It only appears to be instance depletion or port detachment
where the binding_profile property is removed.

Steps to reproduce
==

1. Create SRIOV port with ASAP2 capability:

openstack port create --project  --network  --vnic-
type=direct --binding-profile '{"capabilities": ["switchdev"]}' sriov-
port-1

2. Check the port binding_profile property:

openstack port show -c binding_profile sriov-port-1

3. Create an instance using the port:

openstack server create --flavor  --image  --key-name
 --nic port-id=sriov-port-1 sriov-vm-1

4. Delete the instance:

openstack server delete sriov-vm-1

5. Check the port binding_profile property:

openstack port show -c binding_profile sriov-port-1

Expected Result
===

Nova sets properties in the binding_profile while the instance is in
use.  Alongside those properties the capabilities='['switchdev']'
property should be preserved.

Actual Result
=

After the instance is deleted (or port detached), the binding_profile is
empty.

Environment
===

This has been observed with the following configuration:

- OpenStack Yoga
- OVN Neutron driver

Logs


From Nova Compute:

2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest Traceback (most recent 
call last):
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest   File 
"/var/lib/kolla/venv/lib/python3.6/site-packages/nova/virt/libvirt/guest.py", 
line 165, in launch
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest return 
self._domain.createWithFlags(flags)
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest   File 
"/var/lib/kolla/venv/lib/python3.6/site-packages/eventlet/tpool.py", line 190, 
in doit
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest result = 
proxy_call(self._autowrap, f, *args, **kwargs)
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest   File 
"/var/lib/kolla/venv/lib/python3.6/site-packages/eventlet/tpool.py", line 148, 
in proxy_call
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest rv = execute(f, 
*args, **kwargs)
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest   File 
"/var/lib/kolla/venv/lib/python3.6/site-packages/eventlet/tpool.py", line 129, 
in execute
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest six.reraise(c, e, 
tb)
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest   File 
"/usr/lib/python3.6/site-packages/six.py", line 703, in reraise
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest raise value
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest   File 
"/var/lib/kolla/venv/lib/python3.6/site-packages/eventlet/tpool.py", line 83, 
in tworker
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest rv = meth(*args, 
**kwargs)
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest   File 
"/usr/lib64/python3.6/site-packages/libvirt.py", line 1385, in createWithFlags
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest raise 
libvirtError('virDomainCreateWithFlags() failed')
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest libvirt.libvirtError: 
Cannot set interface MAC/vlanid to fa:16:3e:43:1e:ce/2107 for ifname ens1f0 vf 
7: Operation not supported
2023-01-24 19:55:32.270 7 ERROR nova.virt.libvirt.guest
2023-01-24 19:55:32.273 7 ERROR nova.virt.libvirt.driver 
[req-581cd9e8-11c8-44be-9ed2-a03a5f70d0f4 802a31d98b364da79be43fe6e9566d63 
76f401abee7b4e80b7efd86f2f26e3ca - default default] [instance: 
d2091824-1f7a-4de1-8776-8f781956130a] Failed to start libvirt guest: 
libvirt.libvirtError: Cannot set interface MAC/vlanid to fa:16:3e:43:1e:ce/2107 
for ifname ens1f0 vf 7: Operation not supported

** Affects: nova
 Importance: Undecided
 Status: New

-- 
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/2008238

Title:
  SRIOV port binding_profile attributes for OVS hardware offload are
  stripped on instance deletion or port detachment

Status 

[Yahoo-eng-team] [Bug 1422442] [NEW] Primary targets need version conflict dependencies

2015-02-16 Thread Stig Telfer
Public bug reported:

Packages built using RPM specfile templates include RPM dependencies
generated by transformation of the Python package requirements.
However, they do not include RPM dependency conflicts, which could be
used to express Python '!=' version constraints.

For example, the Cinder requirements.txt includes:

pbr=0.6,!=0.7,1.0

Anvil converts this into RPM dependencies:

python-pbr = 0.6
python-pbr = 1.0.0

But no conflicting versions are specified.

The result is that the requirements are too loosely specified for these
packages.

** Affects: anvil
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to anvil.
https://bugs.launchpad.net/bugs/1422442

Title:
  Primary targets need version conflict dependencies

Status in ANVIL for forging OpenStack.:
  New

Bug description:
  Packages built using RPM specfile templates include RPM dependencies
  generated by transformation of the Python package requirements.
  However, they do not include RPM dependency conflicts, which could be
  used to express Python '!=' version constraints.

  For example, the Cinder requirements.txt includes:

  pbr=0.6,!=0.7,1.0

  Anvil converts this into RPM dependencies:

  python-pbr = 0.6
  python-pbr = 1.0.0

  But no conflicting versions are specified.

  The result is that the requirements are too loosely specified for
  these packages.

To manage notifications about this bug go to:
https://bugs.launchpad.net/anvil/+bug/1422442/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp