integ/kubernetes
Cole Walker 8e84309624 Add check to avoid restarting running device plugin pod
This script was set to always restart the local sriov device plugin pod
which could result in sriov pods not starting properly.

Originally, this sequence of commands would not work properly if the
device plugin was running

kubectl delete pods -n kube-system --selector=app=sriovdp
--field-selector=spec.nodeName=${HOST} --wait=false

kubectl wait pods -n kube-system --selector=app=sriovdp
--field-selector=spec.nodeName=${HOST} --for=condition=Ready
--timeout=360s

Result when device plugin is running:
pod "kube-sriov-device-plugin-amd64-rbjpw" deleted
pod/kube-sriov-device-plugin-amd64-rbjpw condition met

The wait command succeeds against the deleted pod and the script
continues. It then deletes labeled pods without having confirmed that
the device plugin is running and can result in sriov pods not starting
properly.

Ensuring that we are only restarting a not-running device plugin pod
prevents the wait condition from immediately passing.

Closes-Bug: 1928965

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I1cc576b26a4bba4eba4a088d33f918bb07ef3b0d
2021-06-09 17:24:48 -04:00
..
armada/centos Update postgres liveness check to support IPv6 addresses 2021-05-15 16:30:18 -04:00
armada-helm-toolkit Add auto-version for remaining stx/integ packages 2020-12-17 13:26:44 -05:00
chartmuseum/centos Add auto-version for remaining stx/integ packages 2020-12-17 13:26:44 -05:00
cni/sriov-cni/centos Uprev SR-IOV CNI image 2021-02-17 13:47:23 -05:00
containerd/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
docker-distribution/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
etcd/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
helm/centos helmv2-cli armada pod running and ready check 2020-09-25 09:24:34 -04:00
k8s-pod-recovery/centos Add check to avoid restarting running device plugin pod 2021-06-09 17:24:48 -04:00
kubernetes/centos enable support for kubernetes to ignore isolcpus 2021-04-01 11:09:43 -06:00
n3000/centos Create Docker image for running Intel N3000 FPGA tools 2020-02-20 19:09:13 -05:00
plugins Pin clearlinux/golang to v1.15.10 in Dockerfiles 2021-05-05 10:42:56 -04:00