kubelet.service is managed by pmond and requires the property
Restart=no so there is no interferrence with systemd.
The Restart property was being configured in 3 places (i.e.,
the service definition file, and two DropIns), resulting in
the property being set to Restart=always. Based on system load
and timing, this can lead to a perpetual process restart due to
both systemd and pmon conflicting over process recovery. This
causes autonomous host reboot loop.
This update removes Restart=always from kubeadm.conf so that
only kube-stx-override.conf overrides this property.
The following locations contained the conflicting property:
/lib/systemd/system/kubelet.service
Restart=on-failure
/etc/systemd/system/kubelet.service.d/kube-stx-override.conf
Restart=no
/etc/systemd/system/kubelet.service.d/kubeadm.conf
Restart=always
Partial-Bug: 2104921
TEST-PLAN:
PASS: Fresh install on AIO-SX, AIO-DX, Standard.
PASS: Verify kubelet.service has Restart=no
systemctl show -p Restart kubelet.service
PASS: Issue 'system kube-config-kubelet' and verify
kubelet.service restarts via pmon.
PASS: Manually kill kubelet process and verify
kubelet.service restarts via pmon.
sudo pkill -9 -f /usr/bin/kubelet
PASS: Manually restart kubelet.service via pmon and verify
kubelet.service restarts via pmon.
sudo /usr/local/sbin/pmon-restart kubelet
PASS: Manually restart kubelet.service via system and verify
kubelet.service restarts via pmon. kubelet.service likely
restarts twice, first by systemd, then by pmon.
sudo systemctl restart kubelet.service
PASS: Kubernetes upgrade from 1.29 to 1.30
Change-Id: I453ea26ab3db7127a44735cc8cd626be2113557b
Signed-off-by: Jim Gauld <James.Gauld@windriver.com>