unboundlocalerror during sync_routers_task

Bug #1336566 reported by Armando Migliaccio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Armando Migliaccio

Bug Description

I observed this stacktrace:

http://paste.openstack.org/show/85277/

It looks like there may be circumstances where routers do not get initialized. It's better to be more defensive in this regard.

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This happens in master:

https://github.com/openstack/neutron/blob/master/neutron/agent/l3_agent.py#L857

If the sync process fails, routers won't be initialized.

Changed in neutron:
assignee: nobody → Armando Migliaccio (armando-migliaccio)
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/104006

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

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

commit fc01ddaaa5f1170b746f47837104352bfe36eaa5
Author: armando-migliaccio <email address hidden>
Date: Tue Jul 1 15:08:11 2014 -0700

    Fix UnboundLocalError raised during L3 router sync task

    This can be fixed in a number of ways: a) consolidating the
    two except clauses into one; b) adding a 'return' after the
    last except clause c) by calling the cleanup method only on
    success; d) initializing 'routers' before usage.

    Approach c) has the benefit of stating the developer's intent
    more explicitly and minimize chances of regression.

    Closes-bug: #1336566

    Change-Id: Ib91ac5bb07869cbec6825b60d7c4c5b23c4c4d3a

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-2 → 2014.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.