The logic introduced in PR #85 that is meant to restart a running kubelet if containerd's cgroup driver gets updated to make kubelet pick up that change as well is using systemctl is-active kubelet.service to determine if kubelet is running or not. If the kubelets systemd unit is either active or reloading, systemctl will return with 0 and thus, kubelet gets restarted. However, there is another status that may require a kubelet restart: activating. Unfortunately this status produces return code 3 and leads to the kubelet not getting restarted even though that would be absolutely necessary. This situation can lead to a race which leads to the problems described in issue #98.
Which issue(s) this PR fixes:
Fixes #98
Release note:
A condition that may lead to containerd and kubelet use different cgroup drivers in rare cases was fixed.
How to categorize this PR?
/area os /kind bug /os garden-linux
What this PR does / why we need it:
The logic introduced in PR #85 that is meant to restart a running kubelet if containerd's cgroup driver gets updated to make kubelet pick up that change as well is using
systemctl is-active kubelet.service
to determine if kubelet is running or not. If the kubelets systemd unit is eitheractive
orreloading
,systemctl
will return with0
and thus, kubelet gets restarted. However, there is another status that may require a kubelet restart:activating
. Unfortunately this status produces return code3
and leads to the kubelet not getting restarted even though that would be absolutely necessary. This situation can lead to a race which leads to the problems described in issue #98.Which issue(s) this PR fixes: Fixes #98
Release note: