Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Neutron: Use the pids subsystem to look up container id
Browse files Browse the repository at this point in the history
Currently we rely on cgroup name to detect id of sidecar containers but
the name is not managed by podman and it is not guaranteed that it is
consistent with container id.
This changes switches the base record to the pid subsystem which is
actively managed by podman and more likely to be consistent with
container ids.

Closes-Bug: #1933918
Change-Id: Id57f86e62409e257f5619dc8b360cee3f922c805
(cherry picked from commit b1e992a)
(cherry picked from commit 8c2862d)
(cherry picked from commit 46ad1e6)
  • Loading branch information
kajinamit committed Jul 8, 2021
1 parent 8e412bd commit 6a3ebac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deployment/neutron/kill-script
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ signal_container() {
{% raw -%}
if [ -f /proc/$PID/cgroup ]; then
# Get container ID based on process cgroups
CT_ID=$(awk 'BEGIN {FS="[-.]"} /name=/{print $3}' /proc/$PID/cgroup)
CT_ID=$(awk 'BEGIN {FS="[-.]"} /:pids:/{print $3}' /proc/$PID/cgroup)
CT_NAME=$($CLI inspect -f '{{.Name}}' $CT_ID)

case $SIG in
Expand Down

0 comments on commit 6a3ebac

Please sign in to comment.