neutron/neutron/tests/functional/agent/l3
Rodolfo Alonso Hernandez 478e20a61f 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 3437572906)
2020-04-16 09:35:25 +00:00
..
bin Replace "ip monitor" command with Pyroute2 implementation 2020-04-16 09:35:25 +00:00
extensions Agent - Conntrack Helper 2019-08-29 10:41:13 +02:00
__init__.py Replace keepalived notifier bash script with Python ip monitor 2015-03-18 18:59:33 -04:00
framework.py Delay HA router transition from "backup" to "master" 2019-08-27 16:47:00 +00:00
test_dvr_router.py Remove get_external_network_id for router 2019-09-20 13:31:32 +00:00
test_ha_router.py Delay HA router transition from "backup" to "master" 2019-08-27 16:47:00 +00:00
test_keepalived_state_change.py Replace "ip monitor" command with Pyroute2 implementation 2020-04-16 09:35:25 +00:00
test_legacy_router.py Remove get_external_network_id for router 2019-09-20 13:31:32 +00:00
test_metadata_proxy.py Remove _migrate_python_ns_metadata_proxy_if_needed method 2018-08-04 09:53:00 +02:00
test_namespace_manager.py Change ip_lib network namespace code to use pyroute2 2017-10-04 21:09:28 +00:00