4 Commits

Author SHA1 Message Date
Kaustubh Dhokte
ee6eadab97 Debian: Correct "sanitize reserved cpus list before kubelet starts"
This change makes a correction in kubeadm.conf for k8s 1.21.8 on
Debian originally committed in
https://review.opendev.org/c/starlingx/integ/+/827384

/etc/sysconfig does not exist on Debian.
Kubelet service environment variables file location is /etc/default/
on StarlingX Debian.

Test Plan:
Package builds successfully

Closes-Bug: 1955608

Signed-off-by: Kaustubh Dhokte <kaustubh.dhokte@windriver.com>
Change-Id: Ic3f7f6a514088a3ccbd7f99c0433a8144e8d0ade
2022-05-03 23:02:58 +00:00
Lucas Cavalcante
44f7057e50 Fix kubelet service Environment File
Kubelet env file in Debain uses path /etc/default instead of
/etc/sysconfig

Test Plan:

PASS: Bootstrap Debian
SKIP: Boostrap Centos (only impacts debian build)

Story: 2009101
Task: 44600
Depends-on: https://review.opendev.org/c/starlingx/ansible-playbooks/+/828547
Change-Id: Ib2889ba9ca2fd4cee047e70271df0e31ac27267d
Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
2022-03-09 12:03:22 -03:00
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
Chris Friesen
df3b902e6b Replace K8s 1.21.3 with 1.21.8
In testing K8s 1.21.8 used less CPU than 1.21.3, so we are moving to
the newer version.

This has been booted in vbox and a basic pod has been started.
A full regression will be performed.

Depends-On: https://review.opendev.org/c/starlingx/compile/+/824802

Partial-Bug: 1957994
Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
Change-Id: I64e4a64c90ef7591aeee52742dfcba9fdd8e5063
2022-01-14 16:57:25 -05:00