integ/kubernetes/kubernetes-1.22.5/centos
kdhokte c9b781b7c0 sanitize reserved cpus list before kubelet starts
The script will run everytime before the kubelet service is started.

It reads the reserved-cpus list for the kubelet from the service
environment file and sanitizes it on the basis of online CPUs.

If none of the reserved cpus is online, it removes the
--reserved-cpus flag from the environment file which allows
the kubelet to choose CPUs itself.

Sanitizing the reserved-cpus list everytime before the kubelet starts
assures that the kubelet will not fail to start due to unavailability
of one or more CPUs in the list.

By enabling or disabling CPU hyperthreading, available CPUs change.
This change will make sure changing CPU hyperthreading setting will
not lead to kubelet start failure after the system boots up.

Test Plan: (On AIO-SX)

PASS:
Initial Hyperthreading state: enabled
Host-lock->Reboot->Disable CPU hyperthreading and reboot->Host-unlock
Observe kubelet does not fail to start before host-unlock.
All pods states are as expected. Host-unlock succeeds.

PASS:
Initial Hyperthreading state: disabled
Host-lock->Reboot->Enable CPU hyperthreading and reboot->Host-unlock
Observe kubelet does not fail to start before host-unlock.
All pods states are as expected. Host-unlock succeeds.

PASS:
Manually restart the Kubelet service.
Observe that the kubelet does not fail to start.
All pods states are as expected.

PASS:
Host-lock->Host unlock (without any config change).
Observe that the kubelet does not fail to start.
All pods states are as expected.

PASS:
Packages built successfully on both Debian and CentOS.

Closes-Bug: 1955608

Change-Id: I699c5c36a56a50d4c48faa816edad69c17058079
Signed-off-by: Kaustubh Dhokte <kaustubh.dhokte@windriver.com>
2022-02-11 13:56:25 -05:00
..
files sanitize reserved cpus list before kubelet starts 2022-02-11 13:56:25 -05:00
build_srpm.data Add kubernetes 1.22.5 pkg 2022-01-28 11:56:47 +02:00
kubernetes.spec Add kubernetes 1.22.5 pkg 2022-01-28 11:56:47 +02:00
kubernetes.spec.orig Add kubernetes 1.22.5 pkg 2022-01-28 11:56:47 +02:00
Readme.rst Add kubernetes 1.22.5 pkg 2022-01-28 11:56:47 +02:00

The spec file used here was from the kubernetes 1.10.0 src rpm. The orig file is included to help show modifications made to that spec file, to help understand which changes were needed and to assist with future upversioning.