sriov agent causes incorrect port state if sriov driver doesn't support 'ip link vf state' setting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Low
|
Roman Bogorodskiy |
Bug Description
Some devices doesn't seem to support link state setting:
ubuntu@devstack1:~$ ip l sh p2p1
189: p2p1: <BROADCAST,
link/ether 0c:c4:7a:1e:ac:0e brd ff:ff:ff:ff:ff:ff
vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
ubuntu@devstack1:~$
ubuntu@devstack1:~$ sudo ip l set dev p2p1 vf 6 state disable
RTNETLINK answers: Operation not supported
ubuntu@devstack1:~$
ubuntu@devstack1:~$ ls -all /sys/class/
lrwxrwxrwx 1 root root 0 Jun 24 14:30 /sys/class/
ubuntu@devstack1:~$
As you can see, this happens with the 'ixgbe' driver.
This confuses sriov agent:
In neutron/
Changed in neutron: | |
assignee: | nobody → Roman Bogorodskiy (novel) |
status: | New → In Progress |
Changed in neutron: | |
assignee: | Roman Bogorodskiy (novel) → Sean Dague (sdague) |
Changed in neutron: | |
assignee: | Sean Dague (sdague) → Roman Bogorodskiy (novel) |
Changed in neutron: | |
assignee: | Roman Bogorodskiy (novel) → Armando Migliaccio (armando-migliaccio) |
Changed in neutron: | |
assignee: | Armando Migliaccio (armando-migliaccio) → Roman Bogorodskiy (novel) |
importance: | Undecided → Low |
milestone: | none → liberty-rc1 |
Changed in neutron: | |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | liberty-rc1 → 7.0.0 |
Reviewed: https:/ /review. openstack. org/195060 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=9c466f4d0ef fa4686ca6744d7b 9d015857830cb7
Committed: https:/
Submitter: Jenkins
Branch: master
commit 9c466f4d0effa46 86ca6744d7b9d01 5857830cb7
Author: Roman Bogorodskiy <email address hidden>
Date: Wed Jun 24 14:40:35 2015 +0200
sriov: update port state even if ip link fails
Some SRIOV drivers/devices don't support link state setting,
meaning that 'ip link' fails like this when trying to set state:
# ip l set dev p2p1 vf 6 state disable
RTNETLINK answers: Operation not supported
The sriov-nic-agent tries to do that in tchAgent. treat_device( ) and fails because of non-zero
SriovNicSwi
exit status from 'ip link' and, therefore, doesn't reach the code
that updates the actual port status, so port could hang in a BUILD
state even if binding was successful.
This patch fixes problem of nova not being able to successfully bind
or cleanup such a port. It does not fix a case when user manually
updates admin_state_up for a port via API, it's subject to a separate
fix.
Also, replace LOG.exception with LOG.warning for set_device_state() per.set_ vf_state( )
as the exception would be logged by PciDeviceIPWrap
anyway.
Closes-bug: #1468332 60b5986aa0ed925 27868f7efab
Change-Id: Ifa7c128d369ced