Comment 7 for bug 1557909

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

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

commit b9103329855481b1415a07e6b31206ba35dabc7d
Author: Swaminathan Vasudevan <email address hidden>
Date: Thu Apr 14 12:49:08 2016 -0700

    DVR: Clear SNAT namespace when agent restarts after router move

    When we manually move a router from one dvr_snat node to
    another dvr_snat node the snat_namespace should be removed in
    the originating node by the agent and will be re-created in the
    destination node by the destination agent.

    But when the agent dies, the router_update message reaches the
    agent after the agent restarts. At this time the agent should
    remove the snat_namespace since it is no more hosted by the
    current agent.

    Even though we do have logic in agent to take care of cleaning
    up the snat namespaces if the gw_port_host does not match with the
    existing agent host, in this particular use case the self.snat_namespace
    is always set to 'None' in the dvr_edge_router init call when agent
    restarts.

    This patch fixes the above issue by initializing the snat namespace
    object during the router_init. Since we do have a valid snat
    namespace object and if the gw_port_host mismatches, the agent
    should clean up the namespace.

    Change-Id: I30524dc77b743429ef70941479c9b6cccb21c23c
    Closes-Bug: #1557909
    (cherry picked from commit 9dc70ed77e055677a4bd3257a0e9e24239ed4cce)