"service_kill" should stop the process when the namespace does not exist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Rodolfo Alonso |
Bug Description
"service_kill" script should kill the running container even if the namespace where the container was executed was deleted. If during the execution of a container, executed inside a namespace (e.g.: Neutron dnsmasq sidecar container), the namespace is deleted, the container will continue running.
However, when the process is stopped [1], the script is called and will fail in [2] because the namespace returned is empty (root namespace). In this case, the script should avoid the namespace and change the signal to "SIGKILL", to terminate this unreferenced process.
If the script exits with 1, Neutron will retry to resync the DHCP agent and will fail, in an endless loop, while executing always the same script: http://
The kill scripts log reports the error:
"""
Tue Mar 3 13:59:29 UTC 2020 Deleting container neutron-
6a2ac5c799fb717
Tue Mar 3 13:59:30 UTC 2020 No network namespace detected, exiting
Tue Mar 3 13:59:30 UTC 2020 No network namespace detected, exiting
Tue Mar 3 13:59:31 UTC 2020 No network namespace detected, exiting
"""
Related bug: https:/
This bug can be reproduced by creating a namespace, running a container inside it and the deleting the namespace:
$ ip netns add ns01
$ nsenter --net=/
$ ps aux | grep 20000
root 3855 0.0 0.1 1256440 30960 pts/2 Sl+ 17:45 0:00 podman run --name fistro -v /var/run/
root 3967 0.0 0.0 2340 760 pts/0 Ss+ 17:45 0:00 sleep 20000
root 4299 0.0 0.0 15780 1244 pts/3 S+ 18:03 0:00 ag 20000
$ ip netns identify 3855
ns01
$ ip netns delete ns01
$ ip netns identify 3855
<empty string>
[1] https:/
[2] https:/
Changed in tripleo: | |
assignee: | nobody → Rodolfo Alonso (rodolfo-alonso-hernandez) |
Changed in tripleo: | |
importance: | Undecided → High |
milestone: | none → ussuri-3 |
tags: | added: train-backport-potential |
Fix proposed to branch: master /review. opendev. org/714517
Review: https:/