iptables metering removes wrong labels on update

Bug #1362466 reported by Angus Lees
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Angus Lees

Bug Description

If a router is removed from the list passed to update_routers(), the iptables_driver removes the labels for the last(?) router passed, not the one removed.

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

Changed in neutron:
assignee: nobody → Angus Lees (gus)
status: New → In Progress
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 4e80524a61a655fe9732ff42dc8f035810214670
Author: Angus Lees <email address hidden>
Date: Thu Aug 28 17:26:01 2014 +1000

    Remove chain for correct router during update_routers()

    The existing code incorrectly used the stale value from a previous list
    comprehension - and deleted the chains for the wrong router :(
    (Found via pylint)

    Also: change to using a set() rather than a list(), since it is used for
    repeated membership tests.

    Also: refactor test cases to remove test case duplication.

    Closes-Bug: #1362466
    Change-Id: I4df400d57bab5427362db47a715576faa6340173

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-3 → 2014.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

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

commit 4f1129190bfaa9a43e61c70728cddfb5ab83c21f
Author: Angus Lees <email address hidden>
Date: Wed Aug 13 15:42:10 2014 +1000

    Enable undefined-loop-variable pylint check

    This required a trivial refactor of two existing cases in the codebase.

    These two cases were perfectly correct, but the check uncovered a 3rd
    case which was a real bug (fixed separately). The new versions also
    make it clear that if the loop fails to break early then the 'result' is
    None (and thus an error) and not simply the last element. On balance,
    it's probably worth enforcing this small inconvenience to coding style.

    Change-Id: I780a95241f1454c6886d91f980eb9ada7678a119
    Related-Bug: #1362466

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.