Commit Graph

5 Commits

Author SHA1 Message Date
Takashi Kajinami 6a5859fc07 Fix python shebang
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
2023-10-17 16:02:25 +00:00
Brian Haley 2b57f08576 Fix flake8 H404 errors
Fix H404 error and start enforcing it.

Trivialfix

Change-Id: Iaa6fb4f1f07dee32a944259ab65204360d9db7ea
2018-10-05 21:48:41 +00:00
Sławek Kapłoński 69b8588a19 Remove translation of help messages from tests
There is no need to translate help message for config option
which is added and used only in tests.

Change-Id: I8b8bdd4131e6183245bcd2556b2107d769fd6427
2017-09-25 09:49:38 +00:00
Daniel Alvarez 55a25bdfaf Fix a bug in process_spawn binding on ports
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
2016-12-22 19:34:24 +00:00
Daniel Alvarez 1d38f30555 Kill processes when cleaning up namespaces
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
2016-12-20 10:52:41 +00:00