[tripleo] Provide a tag to the container that will be used to kill it
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Wishlist
|
Rodolfo Alonso | ||
tripleo |
New
|
Undecided
|
Unassigned |
Bug Description
TripleO uses containers to spawn the different processes. Some of these processes (some Neutron agents) also spawn long live child processes that run in parallel to the main one. This is the list of them:
* dibbler
* dnsmasq
* haproxy
* keepalived
* neutron-
* radvd
TripleO uses a set of scripts that replaces those processes. When Neutron call a script, it actually starts a sidecar container running the needed process. When the agent needs to stop the process, there is a kill script [1] that replaces the "kill" CLI call. This kill script uses the PID of the process to find the container ID and then to send the needed signal (hup, term, kill).
To find the container ID, the script reads "/proc/$PID/cgroup" and parses the output. This is a weak method that depends on the output of this file.
This bug proposes to spawn the containers with a label:
$ podman run --label neutron_
This container UUID could be the "ProcessManager
$ podman ps --filter "label=
[1]https:/
Changed in neutron: | |
assignee: | nobody → Rodolfo Alonso (rodolfo-alonso-hernandez) |
Changed in neutron: | |
importance: | Undecided → Low |
importance: | Low → Wishlist |
Small note: in order to pass the container_UUID to the script running the actual container service[1], we can use environment variables; doing so, we won't break standard service startup, and the wrapper scripts may get the data directly.
This would also allow to *name* the container using the UUID[2] - using the UUID instead of the NETNS may be easier, and may allow to remove some intelligence from the script[3]
[1] https:/ /opendev. org/openstack/ puppet- tripleo/ src/branch/ master/ templates/ neutron /opendev. org/openstack/ puppet- tripleo/ src/branch/ master/ templates/ neutron/ haproxy. epp#L17 /opendev. org/openstack/ puppet- tripleo/ src/branch/ master/ templates/ neutron/ haproxy. epp#L41
[2] for instance: https:/
[3] https:/