Linuxbrige agent downs with tap device deletion timing issue

Bug #1136264 reported by Nachi Ueno
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Alex Xu

Bug Description

Nachi Ueno (nati-ueno)
Changed in quantum:
importance: Undecided → High
Nachi Ueno (nati-ueno)
Changed in quantum:
milestone: none → grizzly-rc1
Revision history for this message
Alex Xu (xuhj) wrote :

reproduce this by added some fake code in LinuxBridgeManager.udev_get_tap_devices as below:

   def udev_get_tap_devices(self):
        devices = set()
        ip = ip_lib.IPWrapper(self.root_helper)
        root_veth, ns_veth = ip.add_veth('tap-test', 'tap-peer-test')
        deleted = False
        for device in self.udev.list_devices(subsystem='net'):
            if not deleted:
                root_veth.link.delete()
                deleted = True
            name = self.udev_get_name(device)
            if self.is_tap_device(name):
                devices.add(name)
        return devices

Then got exception as below:
2013-03-01 17:05:02.559 15417 TRACE quantum File "/home/soulxu/work-code/openstack/quantum/bin/quantum-linuxbridge-agent", line 24, in <module>
2013-03-01 17:05:02.559 15417 TRACE quantum main()
2013-03-01 17:05:02.559 15417 TRACE quantum File "/home/soulxu/work-code/openstack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 654, in main
2013-03-01 17:05:02.559 15417 TRACE quantum plugin.daemon_loop()
2013-03-01 17:05:02.559 15417 TRACE quantum File "/home/soulxu/work-code/openstack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 614, in daemon_loop
2013-03-01 17:05:02.559 15417 TRACE quantum device_info = self.br_mgr.update_devices(devices)
2013-03-01 17:05:02.559 15417 TRACE quantum File "/home/soulxu/work-code/openstack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 371, in update_devices
2013-03-01 17:05:02.559 15417 TRACE quantum devices = self.udev_get_tap_devices()
2013-03-01 17:05:02.559 15417 TRACE quantum File "/home/soulxu/work-code/openstack/quantum/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 385, in udev_get_tap_devices
2013-03-01 17:05:02.559 15417 TRACE quantum for device in self.udev.list_devices(subsystem='net'):
2013-03-01 17:05:02.559 15417 TRACE quantum File "/usr/lib/python2.7/dist-packages/pyudev/core.py", line 404, in __iter__
2013-03-01 17:05:02.559 15417 TRACE quantum yield Device.from_sys_path(self.context, name)
2013-03-01 17:05:02.559 15417 TRACE quantum File "/usr/lib/python2.7/dist-packages/pyudev/device.py", line 224, in from_sys_path
2013-03-01 17:05:02.559 15417 TRACE quantum raise DeviceNotFoundAtPathError(sys_path)
2013-03-01 17:05:02.559 15417 TRACE quantum DeviceNotFoundAtPathError: No device at '/sys/devices/virtual/net/tap-peer-test'

Is this bug same as you said?

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

Changed in quantum:
assignee: nobody → Alex Xu (xuhj)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/23259
Committed: http://github.com/openstack/quantum/commit/4a1a37ce9f8baf2078a1a44380895d144203a876
Submitter: Jenkins
Branch: master

commit 4a1a37ce9f8baf2078a1a44380895d144203a876
Author: He Jie Xu <email address hidden>
Date: Tue Mar 5 09:52:01 2013 +0800

    Fixes linuxbridge agent downs with tap device deletion timing issue

    Fixes bug 1136264

    Add try/except in deamon loop for preventing agent broken down by
    unhandled exception.

    Change-Id: I99a4f2b485f134b240630a895378d0f61d6382d8

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