UnboundLocalError: local variable 'mac' referenced before assignment

Bug #1816031 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-ovn
Fix Released
Medium
Unassigned

Bug Description

This programming error is coming from set_port_status_down() call, needs to be fixed

2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event [req-b9172e0c-1fa0-4ade-8705-a13c11b8f568 - - - - -] Unexpected exception in notify_loop: UnboundLocalError: local variable 'mac' referenced before assignment 2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event Traceback (most recent call last): 2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event File "/usr/lib/python2.7/site-packages/ovsdbapp/event.py", line 137, in notify_loop 2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event match.run(event, row, updates) 2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event File "/usr/lib/python2.7/site-packages/networking_ovn/ovsdb/ovsdb_monitor.py", line 235, in run 2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event self.driver.set_port_status_down(row.name) 2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event File "/usr/lib/python2.7/site-packages/networking_ovn/ml2/mech_driver.py", line 801, in set_port_status_down 2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event self._update_dnat_entry_if_needed(port_id, False) 2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event File "/usr/lib/python2.7/site-packages/networking_ovn/ml2/mech_driver.py", line 746, in _update_dnat_entry_if_needed 2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event LOG.debug("Clearing up external_mac of port %s", port_id, mac) 2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event UnboundLocalError: local variable 'mac' referenced before assignment 2019-02-14 19:06:01.991 32 ERROR ovsdbapp.event

Changed in networking-ovn:
importance: Undecided → Medium
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (master)

Reviewed: https://review.openstack.org/637172
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=a61907e6e2851b2e5c33793a727838b5ca00d330
Submitter: Zuul
Branch: master

commit a61907e6e2851b2e5c33793a727838b5ca00d330
Author: Daniel Alvarez <email address hidden>
Date: Fri Feb 15 12:52:06 2019 +0100

    Fix unbound "mac" variable

    There's a DEBUG trace which is using a non existent variable in
    that scope and that caused a failure when DEBUG level was enabled.

    Closes-Bug: #1816031
    Change-Id: I6c77623bd199bcbb3f4ad46a7fee3b2fac325790
    Signed-off-by: Daniel Alvarez <email address hidden>
    Co-Authored-By: Lucas Alvares Gomes <email address hidden>

Changed in networking-ovn:
status: Confirmed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/638153

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/638155

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/rocky)

Reviewed: https://review.openstack.org/638153
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=f1cbf8a4624c48e1a494feb266e335b12db47d04
Submitter: Zuul
Branch: stable/rocky

commit f1cbf8a4624c48e1a494feb266e335b12db47d04
Author: Daniel Alvarez <email address hidden>
Date: Fri Feb 15 12:52:06 2019 +0100

    Fix unbound "mac" variable

    There's a DEBUG trace which is using a non existent variable in
    that scope and that caused a failure when DEBUG level was enabled.

    Closes-Bug: #1816031
    Change-Id: I6c77623bd199bcbb3f4ad46a7fee3b2fac325790
    Signed-off-by: Daniel Alvarez <email address hidden>
    Co-Authored-By: Lucas Alvares Gomes <email address hidden>
    (cherry picked from commit a61907e6e2851b2e5c33793a727838b5ca00d330)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/queens)

Reviewed: https://review.openstack.org/638155
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=551c131f0c7b8d9e64ac70c577affebc0cfb2bda
Submitter: Zuul
Branch: stable/queens

commit 551c131f0c7b8d9e64ac70c577affebc0cfb2bda
Author: Daniel Alvarez <email address hidden>
Date: Fri Feb 15 12:52:06 2019 +0100

    Fix unbound "mac" variable

    There's a DEBUG trace which is using a non existent variable in
    that scope and that caused a failure when DEBUG level was enabled.

    Conflicts:
     networking_ovn/tests/unit/fakes.py
     networking_ovn/tests/unit/ml2/test_mech_driver.py

    Closes-Bug: #1816031
    Change-Id: I6c77623bd199bcbb3f4ad46a7fee3b2fac325790
    Signed-off-by: Daniel Alvarez <email address hidden>
    Co-Authored-By: Lucas Alvares Gomes <email address hidden>
    (cherry picked from commit a61907e6e2851b2e5c33793a727838b5ca00d330)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 6.0.0.0b1

This issue was fixed in the openstack/networking-ovn 6.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 4.0.4

This issue was fixed in the openstack/networking-ovn 4.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 5.1.0

This issue was fixed in the openstack/networking-ovn 5.1.0 release.

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.