The current shebang requires /usr/bin/python which is not available in
Ubuntu Jammy by default.
This also fixes some unnecessary/missing shebangs.
Change-Id: Ib25a0a7f39f68f43622609391710dd3b1abc2d00
There is no need to translate help message for config option
which is added and used only in tests.
Change-Id: I8b8bdd4131e6183245bcd2556b2107d769fd6427
process_spawn module is used in netns-cleanup functional tests. This
module forks processes which will listen on random ports/sockets.
Due to the lack of randomness on how get_free_namespace_port() from
net_helpers was used, all forked processes got the same sequence of
ports to bind on. This led to a race condition and some stayed
alive without actually listening on any port/socket.
Also, the ignore_sigterm feature wasn't handled properly and parent
always died after a SIGTERM which caused the test to fail when the
above condition happened since netns-cleanup wasn't able to find its
parent and kill the process which failed to bind.
Change-Id: I2f6e1f99eae595e3ea8c10998a7ad3c861a694f4
Closes-Bug: #1652124
This patch will kill processes that are listening on any port/UNIX
socket within the namespace to be cleaned up. To kill them it will
issue a SIGTERM to them (or to their parents if they were forked) and,
if they don't die after a few seconds, a SIGKILL to them and all their
children.
This is intended for those cases when there's no specific cleanup and
serves as a fallback method.
Change-Id: I4195f633ef4a1788496d1293846f19eef89416aa
Partial-Bug: #1403455