Comment 22 for bug 1680183

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/train)

Reviewed: https://review.opendev.org/717804
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=478e20a61f7356739b7e01efb955c83bc512f428
Submitter: Zuul
Branch: stable/train

commit 478e20a61f7356739b7e01efb955c83bc512f428
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed May 22 14:07:20 2019 +0000

    Replace "ip monitor" command with Pyroute2 implementation

    Use the "ip monitor" tool implemented with Pyroute2 library in
    the neutron-keepalived-state-change monitor.

    Conflicts:
        neutron/agent/l3/ha_router.py
        neutron/agent/l3/keepalived_state_change.py
        neutron/tests/functional/agent/l3/test_keepalived_state_change.py

    This patch also includes https://review.opendev.org/#/c/718754/,
    adding to the ProcessManager call the namespace of the router. This
    will enforce the new process to be execute on the namespace context.

    This patch also modifies the main thread of "keepalived_state_change".
    To lock the main thread execution, allowing the other two threads
    (IP monitor and queue reader) to continue their work, a thread.join()
    was used. In Python 3, when the SIGTERM signal is received and both
    threads are finished, the main thread ends the wait and exits. No
    process was left behind when the monitor was stopped.

    But in Python 2.7, the queue reader thread was never finished. When
    the monitor was stopped, the thread was still being executed. As
    detected in the CI, that causes a memory exhaustion. Instead of
    trying to join the thread, a trivial loop is used insted.

    Change-Id: I932b62a8e0fa1a2f51bbde44134272f0b31b5c76
    Related-Bug: #1680183
    (cherry picked from commit 3437572906e38ec05caf141e634025941d887c50)