Linux bridge agent terminates with existing bridge entry

Bug #1019730 reported by Gary Kotton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Gary Kotton

Bug Description

DEBUG:__main__:Tap device: tapd01b802b-a8 does not exist on this host, skipped
DEBUG:__main__:Port-bindings: {'network_id': u'c4c6721e-cdf5-4c9f-a11f-1fef950c9b79', 'state': u'ACTIVE', 'interface_id': u'gw-c4c6721e-cd', 'uuid': u'5ecb38b7-c21c-4987-bbd6-2fadac6cc6e9', 'op_status': u'DOWN'} {'network_id': u'c4c6721e-cdf5-4c9f-a11f-1fef950c9b79', 'state': u'ACTIVE', 'interface_id': u'd01b802b-a8b6-49ae-9601-4e5cb3b619e6', 'uuid': u'd3eecd83-4c3d-4267-873b-154df8fe68b0', 'op_status': u'DOWN'}
DEBUG:__main__:plugged tap device names [u'tapd01b802b-a8']
DEBUG:__main__:Adding device tapd01b802b-a8 to bridge brqc4c6721e-cd
Traceback (most recent call last):
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 500, in <module>
    main()
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 495, in main
    plugin.daemon_loop(db_connection_url)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 456, in daemon_loop
    old_port_bindings)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 417, in manage_networks_on_host
    vlan_id):
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 321, in process_port_binding
    return self.linux_br.add_interface(network_id, vlan_id, interface_id)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 254, in add_interface
    return self.add_tap_interface(network_id, vlan_id, tap_device_name)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 235, in add_tap_interface
    self.ensure_vlan_bridge(network_id, vlan_id)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 166, in ensure_vlan_bridge
    self.ensure_bridge(bridge_name, interface)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 209, in ensure_bridge
    root_helper=self.root_helper)
  File "/opt/stack/quantum/quantum/agent/linux/utils.py", line 50, in execute
    raise RuntimeError(m)
RuntimeError:
Command: ['sudo', 'brctl', 'addif', 'brqc4c6721e-cd', 'eth0.1000']
Exit code: 1
Stdout: ''
Stderr: "device eth0.1000 is already a member of a bridge; can't enslave it to bridge brqc4c6721e-cd.\n"
openstack@openstack:/opt/stack/quantum$

Gary Kotton (garyk)
Changed in quantum:
assignee: nobody → Gary Kotton (garyk)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

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

Changed in quantum:
status: New → In Progress
Revision history for this message
Gary Kotton (garyk) wrote :

Prior to https://bugs.launchpad.net/quantum/+bug/1000406 the agent did not check the return code of the shell command. When the agent detects a new attachment the following code causes an exception:
        utils.execute(['brctl', 'addif', bridge_name, interface],
                             root_helper=self.root_helper)
The reason for this is that the interface is already connected to the bridge due to the fact that the gateway has already been added.

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

Reviewed: https://review.openstack.org/9203
Committed: http://github.com/openstack/quantum/commit/4742e34a8979d4a9ddb8ea58c0f2c5448723a6fb
Submitter: Jenkins
Branch: master

commit 4742e34a8979d4a9ddb8ea58c0f2c5448723a6fb
Author: Gary Kotton <email address hidden>
Date: Sun Jul 1 03:06:07 2012 -0400

    Check if interface exists in bridge prior to adding.

    This fixes bug 1019730. The fix for bug 1000406 ensures that return
    values of shell commands are checked. The command
        utils.execute(['brctl', 'addif', bridge_name, interface],
                       root_helper=self.root_helper)
    would cause an exception if there was more than one attachment
    on the network. The reason for this was the interface already existed
    on the bridge.

    Change-Id: I8a1f6cc7be930c04ce302d7f87814b9bd5bed129

Changed in quantum:
status: In Progress → Fix Committed
Gary Kotton (garyk)
Changed in quantum:
milestone: none → folsom-2
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-2 → 2012.2
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.