mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-10 03:37:31 +00:00
Add a node e2e to verify that if a static pod is terminated while the container runtime or CRI returns an error, the pod is eventually terminated successfully. This test serves as a regression test for k8s.io/issue/113145 which fixes an issue where force deleted pods may not be terminated if the container runtime fails during a `syncTerminatingPod`. To test this behavior, start a static pod, stop the container runtime, and later start the container runtime. The static pod is expected to eventually terminate successfully. To start and stop the container runtime, we need to find the container runtime systemd unit name. Introduce a util function `findContainerRuntimeServiceName` which finds the unit name by getting the pid of the container runtime from the existing `ContainerRuntimeProcessName` flag passed into node e2e and using systemd dbus `GetUnitNameByPID` function to convert the pid of the container runtime to a unit name. Using the unit name, introduce helper functions to start and stop the container runtime. Signed-off-by: David Porter <david@porter.me>
22 KiB
22 KiB