Linux bridge agent explodes at startup

Bug #1044403 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Salvatore Orlando

Bug Description

It seems https://review.openstack.org/#/c/11858/ introduced a regression.
The agent crashes at startup if there are interfaces with no ip address assigned. At least in my usage scenarios, this is very common.
If I'm not alone, many users of the linuxbridge plugin might be affected

Traceback:
Traceback (most recent call last):
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 800, in <module>
    main()
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 795, in main
    plugin.daemon_loop()
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 749, in daemon_loop
    sync = self.process_network_devices(device_info)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 679, in process_network_devices
    resync_a = self.treat_devices_added(device_info['added'])
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 704, in treat_devices_added
    details['vlan_id'])
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 644, in process_port_binding
    interface_id)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 331, in add_interface
    tap_device_name)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 301, in add_tap_interface
    self.ensure_vlan_bridge(network_id, physical_interface, vlan_id)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 177, in ensure_vlan_bridge
    self.ensure_bridge(bridge_name, interface)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 261, in ensure_bridge
    self.update_interface_ip_details(bridge_name, interface, ips, gateway)
  File "/opt/stack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 219, in update_interface_ip_details
    for ip in ips:
TypeError: 'NoneType' object is not iterable

The fix is straightforward - checking whether there are ips, but I'm not sure that it will be the best solution

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

Changed in quantum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/12259
Committed: http://github.com/openstack/quantum/commit/d1dce679f1dcd5bed44efa1576e446b02b2a4371
Submitter: Jenkins
Branch: master

commit d1dce679f1dcd5bed44efa1576e446b02b2a4371
Author: Salvatore Orlando <email address hidden>
Date: Fri Aug 31 07:30:54 2012 -0700

    Do not transfer ips if there isn't any

    Fixes bug 1044403

    Check if the interface being attached to the bridge has ips
    before iterating over them

    Change-Id: I54315831f240c6810707e7247e7a76c1bfa8742e

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

Thanks for dealing with this

Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-rc1 → 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.