Linux bridge agent fails badly with physical_interface_mappings issue

Bug #1470584 reported by Matt Kassawara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Kevin Benton

Bug Description

If one or more interfaces in physical_interface_mappings does not exist for whatever reason, the Linux bridge agent fails badly rather than providing a useful error message.

2015-07-01 16:51:40.816 22777 CRITICAL neutron [req-2f79bf5b-a0df-40f4-a62a-3eebe17688d2 ] IOError: [Errno 19] No such device
2015-07-01 16:51:40.816 22777 TRACE neutron Traceback (most recent call last):
2015-07-01 16:51:40.816 22777 TRACE neutron File "/usr/bin/neutron-linuxbridge-agent", line 10, in <module>
2015-07-01 16:51:40.816 22777 TRACE neutron sys.exit(main())
2015-07-01 16:51:40.816 22777 TRACE neutron File "/usr/lib/python2.7/dist-packages/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 1016, in main
2015-07-01 16:51:40.816 22777 TRACE neutron polling_interval)
2015-07-01 16:51:40.816 22777 TRACE neutron File "/usr/lib/python2.7/dist-packages/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 769, in __init__
2015-07-01 16:51:40.816 22777 TRACE neutron self.setup_rpc(interface_mappings.values())
2015-07-01 16:51:40.816 22777 TRACE neutron File "/usr/lib/python2.7/dist-packages/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 783, in setup_rpc
2015-07-01 16:51:40.816 22777 TRACE neutron mac = utils.get_interface_mac(physical_interfaces[0])
2015-07-01 16:51:40.816 22777 TRACE neutron File "/usr/lib/python2.7/dist-packages/neutron/agent/linux/utils.py", line 152, in get_interface_mac
2015-07-01 16:51:40.816 22777 TRACE neutron struct.pack('256s', interface[:constants.DEVICE_NAME_MAX_LEN]))
2015-07-01 16:51:40.816 22777 TRACE neutron IOError: [Errno 19] No such device
2015-07-01 16:51:40.816 22777 TRACE neutron

Changed in neutron:
assignee: nobody → Mohammad Banikazemi (mb-s)
Revision history for this message
Mohammad Banikazemi (mb-s) wrote :

With the current ongoing changes in linux bridge agent, this may be dealt with by those efforts.

Changed in neutron:
assignee: Mohammad Banikazemi (mb-s) → nobody
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/207273

Changed in neutron:
assignee: nobody → Kevin Benton (kevinbenton)
status: New → In Progress
Revision history for this message
Kevin Benton (kevinbenton) wrote :

I looked at making the code between the agents common for this, but it is different enough that it's not very feasible (OVS looks up bridges from OVSDB).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/207273
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=58e388261313025d1e713d4c17c99db12404b75f
Submitter: Jenkins
Branch: master

commit 58e388261313025d1e713d4c17c99db12404b75f
Author: Kevin Benton <email address hidden>
Date: Wed Jul 29 17:28:50 2015 -0700

    Validate interface_mappings on Linux bridge init

    Verify that the interfaces actually exist that are defined in
    interface_mappings on Linux bridge startup. If they do not, exit
    immediately similar to how OVS handles incorrect bridge_mappings.

    This prevents an unfriendly exception in the rpc setup routine.

    Change-Id: I050b9b66aa0b27f148e67123eedf29fe332e6f65
    Closes-Bug: #1470584

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

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

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

commit 966203f89dee8fe61fb2dce654e36e510e80380f
Author: Sukhdev Kapur <email address hidden>
Date: Wed Jul 1 16:30:44 2015 -0700

    Neutron-Ironic integration patch

    This patch is in preparation for the integration
    of Ironic and Neutron. A new vnic_type is being
    added so that ML2 drivers can filter for all
    Ironic ports based upon match for 'baremetal'.
    Nova/Ironic will set this vnic_type when issuing
    port-create request to neutron.
    (e.g. binding:vnic_type = 'baremetal' )

    Change-Id: I25dc9472b31db052719db503a10c1fb1a55572ef
    Partial-Implements: blueprint neutron-ironic-integration

commit 236e408272bcb9b8e957524864e571b5afdc4623
Author: Oleg Bondarev <email address hidden>
Date: Tue Jul 7 12:02:58 2015 +0300

    DVR: fix router scheduling

    Fix scheduling of DVR routers to not stop scheduling once
    csnat portion was scheduled. See bug report for failing
    scenario.

    This partially reverts
    commit 3794b4a83e68041e24b715135f0ccf09a5631178
    and fixes bug 1374473 by moving csnat scheduling
    after general dvr router scheduling, so double binding does
    not happen.

    Closes-Bug: #1472163
    Related-Bug: #1374473
    Change-Id: I57c06e2be732e47b6cce7c724f6b255ea2d8fa32

commit e152f93878b9bb6af7cfedc9e045892fcf7d0615
Author: Assaf Muller <email address hidden>
Date: Sat Aug 8 21:15:03 2015 +0300

    TESTING.rst love

    Change-Id: I64b569048f8f87ea2fe63d861302b4020d36493d

commit 633c52cca1b383af2c900e1663c8682114acd177
Author: sridhargaddam <email address hidden>
Date: Wed Aug 5 10:49:33 2015 +0000

    Avoid dhcp_release for ipv6 addresses

    dhcp_release is only supported for IPv4 addresses [1] and not for
    IPv6 addresses [2]. There will be no effect when it is called with
    IPv6 address. This patch adds a corresponding note and avoids calling
    dhcp_release for IPv6 addresses.

    [1] http://manpages.ubuntu.com/manpages/trusty/man1/dhcp_release.1.html
    [2] http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2013q2/007084.html

    Change-Id: I8b8316c9d3d011c2a687a3a1e2a4da5cf1b5d604

commit 2de8fad17402f38bbc30204ee2f4f99cf21cb69d
Author: OpenStack Proposal Bot <email address hidden>
Date: Mon Aug 10 06:11:06 2015 +0000

    Imported Translations from Transifex

    For more information about this automatic import see:
    https://wiki.openstack.org/wiki/Translations/Infrastructure

    Change-Id: I2b423e83a7d0ac8b23239f81fe33dd8382c6fff6

commit fef79dc7b9162e03c8891645494c115b52d4d014
Author: Henry Gessau <email address hidden>
Date: Mon Aug 3 23:30:34 2015 -0400

    Consistent layout and headings for devref

    The lack of convention for heading levels among the independently
    written devref documents was starting to make the Table of Contents
    look rather messy when rendered in HTML.

    This patch does not cover the "Neutron Internals" section since its
    layo...

tags: added: in-feature-pecan
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
Revision history for this message
Matt Kassawara (ionosphere80) wrote :

The patch may not completely address this bug. While the agent provides a useful error message, a traceback follows it.

DEBUG oslo_service.service [-] ******************************************************************************** log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2239
DEBUG neutron.agent.linux.utils [-] Running command: ['ip', '-o', 'link', 'show', 'eth1'] create_process /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:85
EBUG neutron.agent.linux.utils [-]
Command: ['ip', '-o', 'link', 'show', 'eth1']
Exit code: 1
 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:156
ERROR neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent [-] Interface eth1 for physical network public does not exist. Agent terminated!
INFO neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent [-] Stopping linuxbridge agent.
CRITICAL neutron [-] AttributeError: 'LinuxBridgeNeutronAgentRPC' object has no attribute 'plugin_rpc'
ERROR neutron Traceback (most recent call last):
ERROR neutron File "/usr/bin/neutron-linuxbridge-agent", line 10, in <module>
ERROR neutron sys.exit(main())
ERROR neutron File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 1157, in main
ERROR neutron launcher.wait()
ERROR neutron File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 281, in wait
ERROR neutron status, signo = self._wait_for_exit_or_signal(ready_callback)
ERROR neutron File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 268, in _wait_for_exit_or_signal
ERROR neutron self.stop()
ERROR neutron File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 196, in stop
ERROR neutron self.services.stop()
ERROR neutron File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 612, in stop
ERROR neutron service.stop()
ERROR neutron File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 881, in stop
ERROR neutron self.set_rpc_timeout(self.quitting_rpc_timeout)

Revision history for this message
Domen Kožar (ielectric+) wrote :

+1, I got

Nov 26 09:38:19 allinone neutron-linuxbridge-agent[1987]: 2015-11-26 09:38:19.442 1987 ERROR neutron AttributeError: 'LinuxBridgeNeutronAgentRPC' object has no attribute 'plugin_rpc'

on Liberty for specifying a wrong interface. Thanks for this bug report, saved me lots of debugging :)

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.