Reviewed: https://review.openstack.org/324078 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=b22c7ae42813ca7c9c791b5acd4da24566784e9c Submitter: Jenkins Branch: master
commit b22c7ae42813ca7c9c791b5acd4da24566784e9c Author: Inessa Vasilevskaya <ivasilevsk...@mirantis.com> Date: Wed Jun 1 20:54:43 2016 +0300 OVS: UnboundLocalError on switch timeout fixed In case there is some cached datapath id in OVSAgentBridge and openflow switch does not respond in time for some reason, a call to OVSAgentBridge._dpid() method will result in UnboundLocalError. This patch addresses the issue by calculating dpid_str value from cached dpid instead of referencing unassigned variable. Some minor refactor also took place. Closes-Bug: #1588042 Change-Id: If50183bf95cbe50c3a2393be8c2ab913c9715a10 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1588042 Title: UnboundLocalError with native openflow agent on switch timeout Status in neutron: Fix Released Bug description: In situation when there is some cached datapath_id and openflow switch doesn't respond in time (causing RuntimeError), UnboundLocalError is raised 2016-05-25 14:57:28 ERR ryu.lib.hub [req-6efe2697-b494-4c54-97dc-4d8d1f43cab6 - - - - -] hub: uncaught exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/ryu/lib/hub.py", line 52, in _launch func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ovs_ryuapp.py", line 35, in agent_main_wrapper ovs_agent.main(bridge_classes) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 2118, in main agent.daemon_loop() File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 2041, in daemon_loop self.rpc_loop(polling_manager=pm) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 1910, in rpc_loop ovs_status = self.check_ovs_status() File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 1718, in check_ovs_status status = self.int_br.check_canary_table() File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/br_int.py", line 52, in check_canary_table flows = self.dump_flows(constants.CANARY_TABLE) File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ofswitch.py", line 125, in dump_flows (dp, ofp, ofpp) = self._get_dp() File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ovs_bridge.py", line 61, in _get_dp if new_dpid_str != dpid_str: UnboundLocalError: local variable 'dpid_str' referenced before assignment To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1588042/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp