ceph-csi/scripts
Niels de Vos c0fbaf4276 ci: only retry "kubectl create" if objects are missing
There can be spurious failures in the CI when running kubectl create. On
occasion, the command returns with an error, but the api-server did
receive and process the request. This causes a 2nd create action to fail
with messages like:

    cephcluster.ceph.rook.io/my-cluster created
    Error from server: error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": etcdserver: request timed out
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": configmaps "rook-config-override" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": cephclusters.ceph.rook.io "my-cluster" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": configmaps "rook-config-override" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": cephclusters.ceph.rook.io "my-cluster" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": configmaps "rook-config-override" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": cephclusters.ceph.rook.io "my-cluster" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": configmaps "rook-config-override" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": cephclusters.ceph.rook.io "my-cluster" already exists

By handling the create action differently, and checking for the
AlreadyExists word in the stderr output, it is possible to detect
repeated creates that are not needed.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-13 16:28:28 +00:00
..
build_step.inc.sh scripts: add build_step logging functions 2020-04-28 09:13:55 +00:00
build-multi-arch-image.sh build: use BASE_IMAGE from build.env 2020-06-28 17:46:37 +00:00
check-env.sh scripts: add -mod=vendor to go run in check-env.sh 2020-06-17 04:58:32 +00:00
Dockerfile.devel build: use BASE_IMAGE from build.env 2020-06-28 17:46:37 +00:00
Dockerfile.test ci: pass HELM_VERSION when installing Helm in test container 2020-08-05 07:43:10 +00:00
golangci.yml.in ci: disable goerr113 linter 2020-07-21 08:36:24 +00:00
gosec.sh build: Add -tags=nautilus to go test and go build 2020-06-30 07:55:37 +00:00
install-helm.sh ci: include build.env variables when installing Helm 2020-08-05 07:43:10 +00:00
install-snapshot.sh script: Add script to install snapshot-controller 2020-05-15 08:19:32 +00:00
lint-extras.sh ci: add pylint as part of CI 2020-06-30 04:43:45 +00:00
lint-go.sh replace gometalinter with golangci 2019-03-04 19:01:16 +05:30
mdl-style.rb Add static check tools 2019-02-07 12:19:14 +00:00
minikube.sh ci: make number of CPUs for minikube VM configurable 2020-08-04 08:46:17 +00:00
psp.yaml Added PodSecurityPolicy support 2020-01-22 08:19:42 +00:00
rook.sh ci: only retry "kubectl create" if objects are missing 2020-08-13 16:28:28 +00:00
skip-doc-change.sh Enable Travis to run E2E against kube 1.15.0 2019-07-02 11:47:05 +00:00
snapshot-controller-psp.yaml script: Add script to install snapshot-controller 2020-05-15 08:19:32 +00:00
test-go.sh build: Add -tags=nautilus to go test and go build 2020-06-30 07:55:37 +00:00
travis-functest.sh ci: add "make run-e2e" 2020-07-31 16:03:54 +00:00
travis-helmtest.sh ci: add "make run-e2e" 2020-07-31 16:03:54 +00:00