unable to change port state when using sriov agent

Bug #1479694 reported by Moshe Levi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Moshe Levi

Bug Description

openstack version
openstack-neutron-sriov-nic-agent-2015.1.0-1.el7.noarch
python-neutron-2015.1.0-1.el7.noarch
openstack-neutron-2015.1.0-1.el7.noarch
openstack-neutron-common-2015.1.0-1.el7.noarch

when changing port state this error appear in the log

#neutron port-update --admin_state_up=False/True <port_name>
VF state should be change to disable/enable - " vf 1 MAC fa:16:3e:9b:59:2e, vlan 3, spoof checking off, link-state enable/disable "
From sriov-nic-agent.log :
Stderr: RTNETLINK answers: Operation not permitted
2015-07-29 17:54:33.714 2082 ERROR neutron.plugins.sriovnicagent.pci_lib [req-c232ddc4-c065-4459-8552-6c7af2d3ad10 ] Failed executing ip command
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib Traceback (most recent call last):
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib File "/usr/lib/python2.7/site-packages/neutron/plugins/sriovnicagent/pci_lib.py", line 102, in set_vf_state
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib str(vf_index), "state", status_str))
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 78, in _execute
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib log_fail_as_error=log_fail_as_error)
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib File "/usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py", line 137, in execute
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib raise RuntimeError(m)
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib RuntimeError:
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib Command: ['ip', 'link', 'set', 'p2p1', 'vf', '2', 'state', 'disable']
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib Exit code: 2
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib Stdin:
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib Stdout:
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib Stderr: RTNETLINK answers: Operation not permitted
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib
2015-07-29 17:54:33.714 2082 TRACE neutron.plugins.sriovnicagent.pci_lib
2015-07-29 17:54:33.715 2082 ERROR neutron.plugins.sriovnicagent.sriov_nic_agent [req-c232ddc4-c065-4459-8552-6c! 7af2d3ad 10 ] Failed to set device fa:16:3e:29:d8:78 state
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent Traceback (most recent call last):
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent File "/usr/lib/python2.7/site-packages/neutron/plugins/sriovnicagent/sriov_nic_agent.py", line 175, in treat_device
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent admin_state_up)
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent File "/usr/lib/python2.7/site-packages/neutron/plugins/sriovnicagent/eswitch_manager.py", line 251, in set_device_state
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent admin_state_up)
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent File "/usr/lib/python2.7/site-packages/neutron/plugins/sriovnicagent/eswitch_manager.py", line 163, in set_device_state
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent return self.pci_dev_wrapper.set_vf_state(vf_index, state)
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent File "/usr/lib/python2.7/site-packages/neutron/plugins/sriovnicagent/pci_lib.py", line 106, in set_vf_state
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent reason=e)
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent IpCommandError: ip command failed on device p2p1:
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent Command: ['ip', 'link', 'set', 'p2p1', 'vf', '2', 'state', 'disable']
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent Exit code: 2
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent Stdin:
2015-07-29 17:54:33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent Stdout:
2015-07-2! 9 17:54: 33.715 2082 TRACE neutron.plugins.sriovnicagent.sriov_nic_agent Stderr: RTNETLINK answers: Operation not permitted

Revision history for this message
Moshe Levi (moshele) wrote :

the commit https://github.com/openstack/neutron/commit/b2f996346f738e5843a1206d331d866c3d2d22c2
remove the root help but didn't update the agent code to run the command as root

Changed in neutron:
assignee: nobody → Moshe Levi (moshele)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/207358

Changed in neutron:
status: New → In Progress
Changed in neutron:
assignee: Moshe Levi (moshele) → Ihar Hrachyshka (ihar-hrachyshka)
Moshe Levi (moshele)
Changed in neutron:
assignee: Ihar Hrachyshka (ihar-hrachyshka) → Moshe Levi (moshele)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/207358
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=991ea00e6c115343eabecc62e86072175823f81f
Submitter: Jenkins
Branch: master

commit 991ea00e6c115343eabecc62e86072175823f81f
Author: Moshe Levi <email address hidden>
Date: Thu Jul 30 12:04:15 2015 +0300

    SR-IOV: Fix SR-IOV agent to run ip link commands as root

    Commit https://review.openstack.org/#/c/155523/
    remove the remaining root_helper args, but didn't
    update the SR-IOV agent to execute them as root.

    This patch updates the agent to execute ip link commands
    as root and pass options argument as a list in the
    self._as_root method.

    Closes-Bug: #1479694
    Change-Id: I53cafd61845a69fae3a759fb7526950d655ffa20

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (feature/pecan)

Fix proposed to branch: feature/pecan
Review: https://review.openstack.org/207903

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/208003

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (feature/pecan)
Download full text (70.7 KiB)

Reviewed: https://review.openstack.org/207903
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9badcd249dab2d3330f0cd608496b59c9f44499a
Submitter: Jenkins
Branch: feature/pecan

commit 991ea00e6c115343eabecc62e86072175823f81f
Author: Moshe Levi <email address hidden>
Date: Thu Jul 30 12:04:15 2015 +0300

    SR-IOV: Fix SR-IOV agent to run ip link commands as root

    Commit https://review.openstack.org/#/c/155523/
    remove the remaining root_helper args, but didn't
    update the SR-IOV agent to execute them as root.

    This patch updates the agent to execute ip link commands
    as root and pass options argument as a list in the
    self._as_root method.

    Closes-Bug: #1479694
    Change-Id: I53cafd61845a69fae3a759fb7526950d655ffa20

commit 5b3bacedf6c014815bef03c2e821b5eb8ef92dcb
Author: Saksham Varma <email address hidden>
Date: Thu Jul 23 22:46:23 2015 -0700

    Moved out cisco n1kv mech driver and db models

    Moving out Cisco N1Kv database models and the mech driver
    to the openstack/networking-cisco repo as part of the second
    phase vendor-core decomposition

    Partial-Bug: #1479123
    Partial-implements: blueprint core-vendor-decomposition

    Change-Id: I65a704b238d8cbe2951a6912fa4f1e8518c6f412

commit 65ac8cd0a80548e115b8ec1d4cfd47a94422fddf
Author: OpenStack Proposal Bot <email address hidden>
Date: Wed Jul 29 20:44:01 2015 +0000

    Updated from global requirements

    Change-Id: I3a884a73d51df0f93b5cc88b3e3250d81bb1f455

commit f0e8356d04d04600c072a1c0f0bdf274ff19ab8c
Author: sridhargaddam <email address hidden>
Date: Mon Jul 27 03:46:48 2015 +0000

    Update dhcp agent cache for network:dhcp ports

    When a network with a dhcp_enabled subnet is scheduled on a dhcp
    agent, dhcp driver creates the network:dhcp port for the subnet.
    However, the port info is not updated in dhcp agents internal cache.
    Subsequently if the user deletes the network:dhcp port, the port is
    properly deleted on the server side (i.e., in the database) and when
    the port_delete_end notification is sent to the dhcp agent, it simply
    ignores it as the port entry would be missing in the cache. This patch
    fixes this issue by updating the dhcp agents cache when dhcp driver
    creates the network:dhcp port for the subnets.

    Closes-Bug: #1478426
    Change-Id: I69f5834dd964a4320c606c4e0aa2cdba70416943

commit cb60d0bb4e0cc0cba68f59fdf5f4e89d6ec52950
Author: changzhi <email address hidden>
Date: Thu Jul 16 10:14:16 2015 +0800

    Keep dns nameserver order consistency

    Currently, there is no dns servers prioritization for subnets
    for Neutron.

    Generally speaking, it is useful to keep the order of dns
    nameservers consistent. Add a new column named 'order' in table
    'dnsnameservers' and add nameserver into DB one by one.

    Closes-Bug: #1218629
    Implements: blueprint keep-dns-nameserver-orderconsistency
    Change-Id: Id937aea411397d39370368a4eb45be26c4eefa9e

commit b39e1469e824bc8bc79e1ecafa98825a94811c0b
Author: Salvatore Orlando <email address hidden>
Date: Tue Jun 23 04:54:2...

tags: added: in-feature-pecan
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/kilo)

Reviewed: https://review.openstack.org/208003
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=770a10593b613424e8aa34e1197dd95d8926be84
Submitter: Jenkins
Branch: stable/kilo

commit 770a10593b613424e8aa34e1197dd95d8926be84
Author: Moshe Levi <email address hidden>
Date: Thu Jul 30 12:04:15 2015 +0300

    SR-IOV: Fix SR-IOV agent to run ip link commands as root

    Commit https://review.openstack.org/#/c/155523/
    remove the remaining root_helper args, but didn't
    update the SR-IOV agent to execute them as root.

    This patch updates the agent to execute ip link commands
    as root and pass options argument as a list in the
    self._as_root method.

    (cherry picked from commit 991ea00e6c115343eabecc62e86072175823f81f)
    Closes-Bug: #1479694
    Change-Id: I53cafd61845a69fae3a759fb7526950d655ffa20

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-3 → 7.0.0
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.