Cleanup snat redirect rules when agent restarts after stale snat namespace is cleaned.

Bug #1599287 reported by Swaminathan Vasudevan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Swaminathan Vasudevan

Bug Description

When the L3 agent is dead, if the gateway is removed, the snat namespace and its rules are not properly cleaned when agent restarts.

Even though the patch https://review.openstack.org/#/c/326729/ addresses the cleanup of the snat namespace, it does not remove the redirect rules and the gateway device from the router namespace when gateway is disabled.

When agent restarts the agent does not get the gateway data from the server, and so it is not possible for the agent to clean it properly.

In order to clean the snat redirect rules, the gateway data should be cached to the local file system and reused later when necessary.

tags: added: l3-dvr-backlog
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/337855

Changed in neutron:
assignee: nobody → Swaminathan Vasudevan (swaminathan-vasudevan)
status: New → In Progress
Changed in neutron:
assignee: Swaminathan Vasudevan (swaminathan-vasudevan) → Brian Haley (brian-haley)
Changed in neutron:
assignee: Brian Haley (brian-haley) → Swaminathan Vasudevan (swaminathan-vasudevan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 34e51cad42960bdb08a92d1a60a33594bdf057ba
Author: Swaminathan Vasudevan <email address hidden>
Date: Tue Jul 5 13:22:04 2016 -0700

    DVR: Cleanup the stale snat redirect rules in router namespace

    After the stale snat namespace is deleted the snat redirect rules
    in router namespace should be cleaned.

    Here we are basically reading the ip rule from the router namespace
    and just cleaning up all the snat redirect rules leaving the default
    ones untouched.

    Change-Id: Ic505a46e56d9e950bd36a1596d3f1adfb5ef5577
    Closes-Bug: #1599287

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/362495

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/363218

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 9.0.0.0b3

This issue was fixed in the openstack/neutron 9.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/mitaka)

Reviewed: https://review.openstack.org/362495
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e5fb8e9a7a4446b145b8f36661774a616c858063
Submitter: Jenkins
Branch: stable/mitaka

commit e5fb8e9a7a4446b145b8f36661774a616c858063
Author: Swaminathan Vasudevan <email address hidden>
Date: Tue Jul 5 13:22:04 2016 -0700

    DVR: Cleanup the stale snat redirect rules in router namespace

    After the stale snat namespace is deleted the snat redirect rules
    in router namespace should be cleaned.

    Here we are basically reading the ip rule from the router namespace
    and just cleaning up all the snat redirect rules leaving the default
    ones untouched.

    Conflicts:
            neutron/agent/l3/dvr_local_router.py
            neutron/agent/l3/router_info.py

    Change-Id: Ic505a46e56d9e950bd36a1596d3f1adfb5ef5577
    Closes-Bug: #1599287
    (cherry picked from commit 34e51cad42960bdb08a92d1a60a33594bdf057ba)

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/liberty)

Reviewed: https://review.openstack.org/363218
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=bce58c6410dd1f464746e81c71e045f4548bd437
Submitter: Jenkins
Branch: stable/liberty

commit bce58c6410dd1f464746e81c71e045f4548bd437
Author: Swaminathan Vasudevan <email address hidden>
Date: Tue Jul 5 13:22:04 2016 -0700

    DVR: Cleanup the stale snat redirect rules in router namespace

    After the stale snat namespace is deleted the snat redirect rules
    in router namespace should be cleaned.

    Here we are basically reading the ip rule from the router namespace
    and just cleaning up all the snat redirect rules leaving the default
    ones untouched.

    Closes-Bug: #1599287
    (cherry picked from commit 34e51cad42960bdb08a92d1a60a33594bdf057ba)

    Conflicts:
     neutron/tests/functional/agent/l3/test_dvr_router.py

    Change-Id: Ic505a46e56d9e950bd36a1596d3f1adfb5ef5577

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 7.2.0

This issue was fixed in the openstack/neutron 7.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 8.3.0

This issue was fixed in the openstack/neutron 8.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 7.2.0

This issue was fixed in the openstack/neutron 7.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 8.3.0

This issue was fixed in the openstack/neutron 8.3.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.