ansible-playbooks/playbookconfig/src/playbooks/roles/common/bringup-kubemaster/templates/k8s-v1.24.4
Fabiano Correa Mercer dd51ac2844 Restrict the SRIOV device plugin mount path
The kube-sriov-device-plugin pod will mount HostPath:'/var/lib/kubelet'
If a pod mounting with rbd PVC is already running when
kube-sriov-device-plugin pod starts up, the kube-sriov-device-plugin
pod will refer to the rbd mountpoint which is under HostPath:
'/var/lib/kubelet'.
Even if the rbd is unmounted from the mountpoint on the host, the pod
will keep referring to it in its namespace.
So kubelet can't unmap the rbd and will fail to mount the volume when
pod with rbd PVC is recreated.
The kube-sriov-device-plugin doesn't need to use '/var/lib/kubelet' as
mountpath because its internal device socket is actually at
/var/lib/kubelet/device-plugins/.
Changing the kube-sriov-device-plugin mountpath to a less broad path
will preserve the rbd PVC mount point under /var/lib/kubelet/.


Test plan
PASS Installed AIO-SX
     create SRIOV interfaces
     create stateful pod with rbd PVC
     delete kube-sriov-device-plugin
     delete stateful pod
     A new stateful pod will automatically be created
     check if stateful pod was not stuck
     confirm if stateful pod could mount the volume
PASS Create a SRIOV NetworkAttachmentDefinition
     Launch a POD using the SRIOV interface
     check if POD is running and if POD has connectivity.
PASS Upgrades testing (partial) - verified controller-1 is upgraded and device plugin/pod working with new location.

Closes-Bug: #2007596

Signed-off-by: Fabiano Mercer <fabiano.correamercer@windriver.com>
Change-Id: I7ef43a1c0ac4f7f0af1a366c298b4c1029d3e915
2023-03-01 13:59:26 +00:00
..
calico-cni.yaml.j2 Uprev CNI images for k8s 1.24.4 2022-11-14 21:33:43 +00:00
multus-cni.yaml.j2 Stop multus pod from requesting CPU resources 2023-01-09 22:29:34 +00:00
sriov-cni.yaml.j2 Uprev CNI images for k8s 1.24.4 2022-11-14 21:33:43 +00:00
sriov-plugin.yaml.j2 Restrict the SRIOV device plugin mount path 2023-03-01 13:59:26 +00:00