config-files/containerd-config/files/containerd-stx-override.conf
Jim Gauld e7b7dbad7c Add k8s container cleanup to containerd service
This adds ExecStop=/usr/local/sbin/k8s-container-cleanup
to containerd.service. This will execute the container
cleanup prior to containerd.service is stopped.

Depends-On: https://review.opendev.org/c/starlingx/integ/+/834973
Closes-Bug: 1964111

Signed-off-by: Jim Gauld <james.gauld@windriver.com>
Change-Id: I4cd585b9fae630a278e830057cf71496fdf41007
2022-03-24 13:14:26 -04:00

8 lines
224 B
Plaintext

[Service]
ExecStartPost=/bin/bash -c 'echo $MAINPID > /var/run/containerd.pid;'
ExecStop=-/usr/local/sbin/k8s-container-cleanup
ExecStopPost=/bin/rm -f /var/run/containerd.pid
# pmond monitors containerd service
Restart=no