++ echo 'Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/logs/balancer.log' Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/logs/balancer.log ++ '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/conf/cloud-secret.yml ']' ++ SKIP_BACKUPS_TO_AWS_GCP_AZURE= ++ oc get projects ++ kubectl get nodes ++ grep '^minikube' +++ kubectl version -o json +++ grep '\-eks\-' +++ jq -r .serverVersion.gitVersion WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 ++ '[' ']' ++ EKS=0 +++ kubectl version -o json +++ grep gke +++ jq -r .serverVersion.gitVersion WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 ++ '[' v1.26.15-gke.1243000 ']' ++ GKE=1 +++ kubectl version -o json +++ jq -r '.serverVersion.major + "." + .serverVersion.minor' +++ /usr/bin/sed -r 's/[^0-9.]+//g' WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 ++ KUBE_VERSION=1.26 + set_debug + [[ 1 == 1 ]] + set -o xtrace + main + create_infra balancer-17174 + local ns=balancer-17174 + delete_crd + desc 'get and delete old CRDs and RBAC' + set +o xtrace ----------------------------------------------------------------------------------- get and delete old CRDs and RBAC ----------------------------------------------------------------------------------- + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.ymZ5YpUlme ++ mktemp + local LAST_ERR=/tmp/tmp.29upVV1kzv + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ymZ5YpUlme customresourcedefinition.apiextensions.k8s.io "perconaservermongodbbackups.psmdb.percona.com" deleted customresourcedefinition.apiextensions.k8s.io "perconaservermongodbrestores.psmdb.percona.com" deleted customresourcedefinition.apiextensions.k8s.io "perconaservermongodbs.psmdb.percona.com" deleted + cat /tmp/tmp.29upVV1kzv + rm /tmp/tmp.ymZ5YpUlme /tmp/tmp.29upVV1kzv + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/crd.yaml ++ grep -v '\-\-\-' + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + kubectl get perconaservermongodbbackups.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' E0507 17:52:59.490950 17462 memcache.go:287] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:52:59.761471 17462 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:52:59.873824 17462 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:52:59.992131 17462 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:00.130964 17462 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request error: the server doesn't have a resource type "perconaservermongodbbackups" + kubectl patch perconaservermongodbbackups.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' E0507 17:53:01.603750 17671 memcache.go:287] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:01.898051 17671 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:02.078996 17671 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:02.195700 17671 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:02.328097 17671 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request error: the server doesn't have a resource type "perconaservermongodbbackups" + : + kubectl_bin wait --for=delete crd perconaservermongodbbackups.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.hL0RZu4Vma ++ mktemp + local LAST_ERR=/tmp/tmp.GZX1OL0GQy + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete crd perconaservermongodbbackups.psmdb.percona.com + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.hL0RZu4Vma + cat /tmp/tmp.GZX1OL0GQy + rm /tmp/tmp.hL0RZu4Vma /tmp/tmp.GZX1OL0GQy + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbrestores.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' + grep -v NAMESPACE + kubectl get perconaservermongodbrestores.psmdb.percona.com --all-namespaces -o wide E0507 17:53:04.825435 18117 memcache.go:287] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:05.212840 18117 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:05.382934 18117 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:05.594384 18117 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:05.712681 18117 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request error: the server doesn't have a resource type "perconaservermongodbrestores" + kubectl patch perconaservermongodbrestores.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' E0507 17:53:07.161795 18443 memcache.go:287] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:07.387271 18443 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:07.498829 18443 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:07.606867 18443 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:07.714285 18443 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request error: the server doesn't have a resource type "perconaservermongodbrestores" + : + kubectl_bin wait --for=delete crd perconaservermongodbrestores.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.EdtVboeN4b ++ mktemp + local LAST_ERR=/tmp/tmp.B1pIUbV41C + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete crd perconaservermongodbrestores.psmdb.percona.com + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.EdtVboeN4b + cat /tmp/tmp.B1pIUbV41C + rm /tmp/tmp.EdtVboeN4b /tmp/tmp.B1pIUbV41C + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' E0507 17:53:09.533708 18810 memcache.go:287] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:09.850142 18810 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:09.964812 18810 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:10.073104 18810 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:10.186642 18810 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request error: the server doesn't have a resource type "perconaservermongodbs" + kubectl patch perconaservermongodbs.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' E0507 17:53:11.438029 18995 memcache.go:287] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:11.758392 18995 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:11.871765 18995 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:11.981022 18995 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:12.089261 18995 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request error: the server doesn't have a resource type "perconaservermongodbs" + : + kubectl_bin wait --for=delete crd perconaservermongodbs.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.xGN4BVeS8w ++ mktemp + local LAST_ERR=/tmp/tmp.obcnmFBd4s + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete crd perconaservermongodbs.psmdb.percona.com + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.xGN4BVeS8w + cat /tmp/tmp.obcnmFBd4s + rm /tmp/tmp.xGN4BVeS8w /tmp/tmp.obcnmFBd4s + return 0 + local rbac_yaml=rbac.yaml + '[' -n psmdb-operator ']' + rbac_yaml=cw-rbac.yaml + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.F1FYvDRVkV ++ mktemp + local LAST_ERR=/tmp/tmp.f6w9C4UV8M + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.F1FYvDRVkV clusterrole.rbac.authorization.k8s.io "percona-server-mongodb-operator" deleted clusterrolebinding.rbac.authorization.k8s.io "service-account-percona-server-mongodb-operator" deleted + cat /tmp/tmp.f6w9C4UV8M + rm /tmp/tmp.F1FYvDRVkV /tmp/tmp.f6w9C4UV8M + return 0 + check_crd_for_deletion PR-1545-63b8c179 + local git_tag=PR-1545-63b8c179 ++ yq eval .metadata.name ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-1545-63b8c179/deploy/crd.yaml ++ /usr/bin/sed s/---//g ++ /usr/bin/sed ':a;N;$!ba;s/\n/ /g' + for crd_name in '$(curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/${git_tag}/deploy/crd.yaml | yq eval '\''.metadata.name'\'' | $sed '\''s/---//g'\'' | $sed '\'':a;N;$!ba;s/\n/ /g'\'')' ++ kubectl_bin get crd/null -o 'jsonpath={.status.conditions[-1].type}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Bi5NKAWmOv +++ mktemp ++ local LAST_ERR=/tmp/tmp.chargtmrAu ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get crd/null -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=1 ++ set -e ++ '[' 1 '!=' 0 -a -n 1 ']' ++ cat /tmp/tmp.Bi5NKAWmOv ++ cat /tmp/tmp.chargtmrAu Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 0 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get crd/null -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=1 ++ set -e ++ '[' 1 '!=' 0 -a -n 1 ']' ++ cat /tmp/tmp.Bi5NKAWmOv ++ cat /tmp/tmp.chargtmrAu Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 4 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get crd/null -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=1 ++ set -e ++ '[' 1 '!=' 0 -a -n 1 ']' ++ cat /tmp/tmp.Bi5NKAWmOv ++ cat /tmp/tmp.chargtmrAu Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 8 ++ cat /tmp/tmp.Bi5NKAWmOv ++ cat /tmp/tmp.chargtmrAu Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.Bi5NKAWmOv /tmp/tmp.chargtmrAu ++ return 1 + [[ '' == \T\e\r\m\i\n\a\t\i\n\g ]] + '[' -n psmdb-operator ']' + create_namespace psmdb-operator + local namespace=psmdb-operator + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ awk '{print $1}' ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ grep validate-auth ++ awk '{print $1}' ++ kubectl get ValidatingWebhookConfiguration + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ awk '{print $1}' ++ grep chaos-mesh E0507 17:53:36.037754 21915 memcache.go:287] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0507 17:53:36.252460 21915 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ grep chaos-mesh ++ kubectl get clusterrolebinding ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ awk '{print $1}' ++ grep chaos-mesh + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + kubectl_bin get ns + awk '{print$1}' + '[' -n '' ']' + desc 'cleaned up old namespaces psmdb-operator' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces psmdb-operator ----------------------------------------------------------------------------------- + kubectl_bin delete namespace psmdb-operator --ignore-not-found + egrep -v '^kube-|^default|Terminating|psmdb-operator|openshift|gke-mcs|^NAME' ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.sHWAJ2chKt ++ mktemp + local LAST_ERR=/tmp/tmp.wGNdrnKiL0 + local exit_status=0 + local timeout=4 ++ seq 0 2 + local LAST_OUT=/tmp/tmp.yKSHqqEQmp ++ mktemp + for i in '$(seq 0 2)' + set +e + kubectl get ns + local LAST_ERR=/tmp/tmp.JwZ1Lhg4UN + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete namespace psmdb-operator --ignore-not-found + xargs kubectl delete ns + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.sHWAJ2chKt + cat /tmp/tmp.wGNdrnKiL0 + rm /tmp/tmp.sHWAJ2chKt /tmp/tmp.wGNdrnKiL0 + return 0 namespace "balancer-2572" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.yKSHqqEQmp namespace "psmdb-operator" deleted + cat /tmp/tmp.JwZ1Lhg4UN + rm /tmp/tmp.yKSHqqEQmp /tmp/tmp.JwZ1Lhg4UN + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.C5SewmmpKA ++ mktemp + local LAST_ERR=/tmp/tmp.rLsErANn3A + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete namespace psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.C5SewmmpKA + cat /tmp/tmp.rLsErANn3A + rm /tmp/tmp.C5SewmmpKA /tmp/tmp.rLsErANn3A + return 0 + desc 'create namespace psmdb-operator' + set +o xtrace ----------------------------------------------------------------------------------- create namespace psmdb-operator ----------------------------------------------------------------------------------- + kubectl_bin create namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.9biv9LAsLi ++ mktemp + local LAST_ERR=/tmp/tmp.iakYrPHGqE + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.9biv9LAsLi namespace/psmdb-operator created + cat /tmp/tmp.iakYrPHGqE + rm /tmp/tmp.9biv9LAsLi /tmp/tmp.iakYrPHGqE + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.Ou1Kwf7HX3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.djSdjN4fvz ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl config current-context ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.Ou1Kwf7HX3 ++ cat /tmp/tmp.djSdjN4fvz ++ rm /tmp/tmp.Ou1Kwf7HX3 /tmp/tmp.djSdjN4fvz ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1545-63b8c179-7-cluster2 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.YSwNS7RKTe ++ mktemp + local LAST_ERR=/tmp/tmp.qoq6OOsMc5 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1545-63b8c179-7-cluster2 --namespace=psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.YSwNS7RKTe Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1545-63b8c179-7-cluster2" modified. + cat /tmp/tmp.qoq6OOsMc5 + rm /tmp/tmp.YSwNS7RKTe /tmp/tmp.qoq6OOsMc5 + return 0 + deploy_operator + desc 'start PSMDB operator' + set +o xtrace ----------------------------------------------------------------------------------- start PSMDB operator ----------------------------------------------------------------------------------- + local cr_file + '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/balancer/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.bGGA6Rxgks ++ mktemp + local LAST_ERR=/tmp/tmp.twbANi2dtr + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/crd.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.bGGA6Rxgks customresourcedefinition.apiextensions.k8s.io/perconaservermongodbbackups.psmdb.percona.com serverside-applied customresourcedefinition.apiextensions.k8s.io/perconaservermongodbrestores.psmdb.percona.com serverside-applied customresourcedefinition.apiextensions.k8s.io/perconaservermongodbs.psmdb.percona.com serverside-applied + cat /tmp/tmp.twbANi2dtr + rm /tmp/tmp.bGGA6Rxgks /tmp/tmp.twbANi2dtr + return 0 + '[' -n psmdb-operator ']' + apply_rbac cw-rbac + local operator_namespace=psmdb-operator + local rbac=cw-rbac + kubectl_bin apply -n psmdb-operator -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/cw-rbac.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.o979npJ5aZ ++ mktemp + local LAST_ERR=/tmp/tmp.3c5KerR0zV + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -n psmdb-operator -f - + sed -e 's^namespace: .*^namespace: psmdb-operator^' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.o979npJ5aZ clusterrole.rbac.authorization.k8s.io/percona-server-mongodb-operator created serviceaccount/percona-server-mongodb-operator created clusterrolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator created + cat /tmp/tmp.3c5KerR0zV + rm /tmp/tmp.o979npJ5aZ /tmp/tmp.3c5KerR0zV + return 0 + yq eval ' (.spec.template.spec.containers[].image = "perconalab/percona-server-mongodb-operator:PR-1545-63b8c179") | ((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") | ((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/cw-operator.yaml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.kRRy2dIjza ++ mktemp + local LAST_ERR=/tmp/tmp.7d5FnJCPF1 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.kRRy2dIjza deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.7d5FnJCPF1 + rm /tmp/tmp.kRRy2dIjza /tmp/tmp.7d5FnJCPF1 + return 0 + sleep 2 ++ get_operator_pod ++ kubectl_bin get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator +++ mktemp ++ local LAST_OUT=/tmp/tmp.UtNQKOnMVj +++ mktemp ++ local LAST_ERR=/tmp/tmp.Bz3yR0kB7q ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.UtNQKOnMVj ++ cat /tmp/tmp.Bz3yR0kB7q ++ rm /tmp/tmp.UtNQKOnMVj /tmp/tmp.Bz3yR0kB7q ++ return 0 + wait_pod percona-server-mongodb-operator-76d59f67c-phx4c + local pod=percona-server-mongodb-operator-76d59f67c-phx4c + set +o xtrace waiting for pod/percona-server-mongodb-operator-76d59f67c-phx4c to be ready.OK + create_namespace balancer-17174 + local namespace=balancer-17174 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ helm list --all-namespaces --filter chaos-mesh ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ awk '{print $1}' ++ grep chaos-mesh + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ awk '{print $1}' ++ grep validate-auth + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' ++ grep chaos-mesh.org ++ awk '{print $1}' ++ kubectl get crd + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ awk '{print $1}' ++ grep chaos-mesh ++ kubectl get clusterrole + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + kubectl_bin get ns + egrep -v '^kube-|^default|Terminating|psmdb-operator|openshift|gke-mcs|^NAME' + '[' -n '' ']' + desc 'cleaned up old namespaces balancer-17174' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces balancer-17174 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace balancer-17174 --ignore-not-found + awk '{print$1}' ++ mktemp + local LAST_OUT=/tmp/tmp.BBknlvyeuJ ++ mktemp + xargs kubectl delete ns + local LAST_ERR=/tmp/tmp.5ZmGlhNDsM + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete namespace balancer-17174 --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.WjZwNm3QuD ++ mktemp + local LAST_ERR=/tmp/tmp.69TrKftQfV + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl get ns + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.BBknlvyeuJ + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.WjZwNm3QuD + cat /tmp/tmp.5ZmGlhNDsM + cat /tmp/tmp.69TrKftQfV + rm /tmp/tmp.BBknlvyeuJ /tmp/tmp.5ZmGlhNDsM + rm /tmp/tmp.WjZwNm3QuD /tmp/tmp.69TrKftQfV + return 0 + kubectl_bin wait --for=delete namespace balancer-17174 + return 0 ++ mktemp + local LAST_OUT=/tmp/tmp.gb5bTUgGkD ++ mktemp + local LAST_ERR=/tmp/tmp.zNe1PDypJe + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete namespace balancer-17174 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.gb5bTUgGkD + cat /tmp/tmp.zNe1PDypJe + rm /tmp/tmp.gb5bTUgGkD /tmp/tmp.zNe1PDypJe + return 0 + desc 'create namespace balancer-17174' + set +o xtrace ----------------------------------------------------------------------------------- create namespace balancer-17174 ----------------------------------------------------------------------------------- + kubectl_bin create namespace balancer-17174 ++ mktemp + local LAST_OUT=/tmp/tmp.iJUQD2U0kV ++ mktemp + local LAST_ERR=/tmp/tmp.Wu7e2VYzzB + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace balancer-17174 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.iJUQD2U0kV namespace/balancer-17174 created + cat /tmp/tmp.Wu7e2VYzzB + rm /tmp/tmp.iJUQD2U0kV /tmp/tmp.Wu7e2VYzzB + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.IPLhoC0S2F +++ mktemp ++ local LAST_ERR=/tmp/tmp.16wjO33U5j ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl config current-context ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.IPLhoC0S2F ++ cat /tmp/tmp.16wjO33U5j ++ rm /tmp/tmp.IPLhoC0S2F /tmp/tmp.16wjO33U5j ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1545-63b8c179-7-cluster2 --namespace=balancer-17174 ++ mktemp + local LAST_OUT=/tmp/tmp.9664ldAYTB ++ mktemp + local LAST_ERR=/tmp/tmp.Ni0Vpv03KF + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1545-63b8c179-7-cluster2 --namespace=balancer-17174 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.9664ldAYTB Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1545-63b8c179-7-cluster2" modified. + cat /tmp/tmp.Ni0Vpv03KF + rm /tmp/tmp.9664ldAYTB /tmp/tmp.Ni0Vpv03KF + return 0 + desc 'create first PSMDB cluster' + set +o xtrace ----------------------------------------------------------------------------------- create first PSMDB cluster ----------------------------------------------------------------------------------- + cluster=some-name + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/conf/client.yml ++ mktemp + local LAST_OUT=/tmp/tmp.clgyLRb4GD ++ mktemp + local LAST_ERR=/tmp/tmp.hUxR1j6W6w + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/conf/client.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.clgyLRb4GD secret/some-users created deployment.apps/psmdb-client created + cat /tmp/tmp.hUxR1j6W6w + rm /tmp/tmp.clgyLRb4GD /tmp/tmp.hUxR1j6W6w + return 0 + version_gt 1.19 ++ echo '1.26 >= 1.19' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + '[' 0 -ne 1 ']' + /usr/bin/sed s/docker/runc/g /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/conf/container-rc.yaml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.nr3EtmAETL ++ mktemp + local LAST_ERR=/tmp/tmp.fD6QHMO1IJ + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.nr3EtmAETL runtimeclass.node.k8s.io/container-rc unchanged + cat /tmp/tmp.fD6QHMO1IJ + rm /tmp/tmp.nr3EtmAETL /tmp/tmp.fD6QHMO1IJ + return 0 + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/balancer/conf/some-name-rs0.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/balancer/conf/some-name-rs0.yml + kubectl_bin apply -f - + yq eval '.spec.upgradeOptions.apply="Never"' + yq eval '(.spec | select(has("backup"))).backup.image = "perconalab/percona-server-mongodb-operator:main-backup"' + yq eval '(.spec | select(has("initImage"))).initImage = "perconalab/percona-server-mongodb-operator:PR-1545-63b8c179"' + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/e2e-tests/balancer/conf/some-name-rs0.yml ++ mktemp + local LAST_OUT=/tmp/tmp.JEkSCDRtPS + yq eval '(.spec | select(.image == null)).image = "perconalab/percona-server-mongodb-operator:main-mongod7.0"' + yq eval '(.spec | select(has("pmm"))).pmm.image = "perconalab/pmm-client:dev-latest"' ++ mktemp + local LAST_ERR=/tmp/tmp.sFZbjQwYaS + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.JEkSCDRtPS perconaservermongodb.psmdb.percona.com/some-name created + cat /tmp/tmp.sFZbjQwYaS + rm /tmp/tmp.JEkSCDRtPS /tmp/tmp.sFZbjQwYaS + return 0 + desc 'check if all 3 Pods started' + set +o xtrace ----------------------------------------------------------------------------------- check if all 3 Pods started ----------------------------------------------------------------------------------- + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready..................OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready.....................OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.91glmJCPPE +++ mktemp ++ local LAST_ERR=/tmp/tmp.eud8NDep8D ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.91glmJCPPE ++ cat /tmp/tmp.eud8NDep8D ++ rm /tmp/tmp.91glmJCPPE /tmp/tmp.eud8NDep8D ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready............OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.IgWiGnmxHb +++ mktemp ++ local LAST_ERR=/tmp/tmp.6at3wAcepr ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.IgWiGnmxHb ++ cat /tmp/tmp.6at3wAcepr ++ rm /tmp/tmp.IgWiGnmxHb /tmp/tmp.6at3wAcepr ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness.................... + wait_for_running some-name-cfg 3 false + local name=some-name-cfg + let last_pod=2 + local check_cluster_readyness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=some-name ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod some-name-cfg-0 + local pod=some-name-cfg-0 + set +o xtrace waiting for pod/some-name-cfg-0 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod some-name-cfg-1 + local pod=some-name-cfg-1 + set +o xtrace waiting for pod/some-name-cfg-1 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.aNZW8mnj6Q +++ mktemp ++ local LAST_ERR=/tmp/tmp.i2C13NQiX1 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.aNZW8mnj6Q ++ cat /tmp/tmp.i2C13NQiX1 ++ rm /tmp/tmp.aNZW8mnj6Q /tmp/tmp.i2C13NQiX1 ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod some-name-cfg-2 + local pod=some-name-cfg-2 + set +o xtrace waiting for pod/some-name-cfg-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.68sA36rfLQ +++ mktemp ++ local LAST_ERR=/tmp/tmp.CXJ67X70SV ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.68sA36rfLQ ++ cat /tmp/tmp.CXJ67X70SV ++ rm /tmp/tmp.68sA36rfLQ /tmp/tmp.CXJ67X70SV ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ false == \t\r\u\e ]] + wait_for_running some-name-mongos 3 + local name=some-name-mongos + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=mongos + local cluster_name=some-name ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod some-name-mongos-0 + local pod=some-name-mongos-0 + set +o xtrace waiting for pod/some-name-mongos-0 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod some-name-mongos-1 + local pod=some-name-mongos-1 + set +o xtrace waiting for pod/some-name-mongos-1 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.iP1EkRB3rm +++ mktemp ++ local LAST_ERR=/tmp/tmp.F2r9S8pVW3 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.iP1EkRB3rm ++ cat /tmp/tmp.F2r9S8pVW3 ++ rm /tmp/tmp.iP1EkRB3rm /tmp/tmp.F2r9S8pVW3 ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod some-name-mongos-2 + local pod=some-name-mongos-2 + set +o xtrace waiting for pod/some-name-mongos-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.bCeJiGBPzG +++ mktemp ++ local LAST_ERR=/tmp/tmp.rnKxSK08fi ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.bCeJiGBPzG ++ cat /tmp/tmp.rnKxSK08fi ++ rm /tmp/tmp.bCeJiGBPzG /tmp/tmp.rnKxSK08fi ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness + sleep 20 + check_balancer full + local expected=full + local balancer_running ++ grep -E -v 'Percona Server for MongoDB|connecting to:|Implicit session:|versions do not match|Error saving history file:|bye' ++ run_mongos 'db.adminCommand({balancerStatus: 1}).mode' clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174 ++ local 'command=db.adminCommand({balancerStatus: 1}).mode' ++ local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174 ++ local driver=mongodb ++ local suffix=.svc.cluster.local +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.BqYvOBQMKI ++++ mktemp +++ local LAST_ERR=/tmp/tmp.uZ1PQo4ZHo +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.BqYvOBQMKI +++ cat /tmp/tmp.uZ1PQo4ZHo +++ rm /tmp/tmp.BqYvOBQMKI /tmp/tmp.uZ1PQo4ZHo +++ return 0 ++ local client_container=psmdb-client-7469665986-p5ptg ++ local mongo_flag= ++ kubectl_bin exec psmdb-client-7469665986-p5ptg -- bash -c 'printf '\''db.adminCommand({balancerStatus: 1}).mode\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174.svc.cluster.local/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.poSlIaV9TK +++ mktemp ++ local LAST_ERR=/tmp/tmp.40rrgQjNdb ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl exec psmdb-client-7469665986-p5ptg -- bash -c 'printf '\''db.adminCommand({balancerStatus: 1}).mode\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174.svc.cluster.local/admin ' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.poSlIaV9TK ++ cat /tmp/tmp.40rrgQjNdb ++ rm /tmp/tmp.poSlIaV9TK /tmp/tmp.40rrgQjNdb ++ return 0 + balancer_running=full + [[ full != \f\u\l\l ]] + desc 'disabling balancer' + set +o xtrace ----------------------------------------------------------------------------------- disabling balancer ----------------------------------------------------------------------------------- + kubectl patch psmdb some-name --type=merge -p '{"spec":{"sharding":{"balancer":{"enabled":false}}}}' perconaservermongodb.psmdb.percona.com/some-name patched + sleep 20 + check_balancer off + local expected=off + local balancer_running ++ run_mongos 'db.adminCommand({balancerStatus: 1}).mode' clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174 ++ local 'command=db.adminCommand({balancerStatus: 1}).mode' ++ local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174 ++ local driver=mongodb ++ local suffix=.svc.cluster.local +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ grep -E -v 'Percona Server for MongoDB|connecting to:|Implicit session:|versions do not match|Error saving history file:|bye' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.vzVifCJ1iv ++++ mktemp +++ local LAST_ERR=/tmp/tmp.mqM5LGQABk +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.vzVifCJ1iv +++ cat /tmp/tmp.mqM5LGQABk +++ rm /tmp/tmp.vzVifCJ1iv /tmp/tmp.mqM5LGQABk +++ return 0 ++ local client_container=psmdb-client-7469665986-p5ptg ++ local mongo_flag= ++ kubectl_bin exec psmdb-client-7469665986-p5ptg -- bash -c 'printf '\''db.adminCommand({balancerStatus: 1}).mode\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174.svc.cluster.local/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.tz6KZpP8KD +++ mktemp ++ local LAST_ERR=/tmp/tmp.KxvZnB9YHB ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl exec psmdb-client-7469665986-p5ptg -- bash -c 'printf '\''db.adminCommand({balancerStatus: 1}).mode\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174.svc.cluster.local/admin ' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.tz6KZpP8KD ++ cat /tmp/tmp.KxvZnB9YHB ++ rm /tmp/tmp.tz6KZpP8KD /tmp/tmp.KxvZnB9YHB ++ return 0 + balancer_running=off + [[ off != \o\f\f ]] + desc 'enabling balancer' + set +o xtrace ----------------------------------------------------------------------------------- enabling balancer ----------------------------------------------------------------------------------- + kubectl patch psmdb some-name --type=merge -p '{"spec":{"sharding":{"balancer":{"enabled":true}}}}' perconaservermongodb.psmdb.percona.com/some-name patched + sleep 20 + check_balancer full + local expected=full + local balancer_running ++ run_mongos 'db.adminCommand({balancerStatus: 1}).mode' clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174 ++ local 'command=db.adminCommand({balancerStatus: 1}).mode' ++ local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ grep -E -v 'Percona Server for MongoDB|connecting to:|Implicit session:|versions do not match|Error saving history file:|bye' +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.OxbzDybFfY ++++ mktemp +++ local LAST_ERR=/tmp/tmp.556dPFeAoY +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.OxbzDybFfY +++ cat /tmp/tmp.556dPFeAoY +++ rm /tmp/tmp.OxbzDybFfY /tmp/tmp.556dPFeAoY +++ return 0 ++ local client_container=psmdb-client-7469665986-p5ptg ++ local mongo_flag= ++ kubectl_bin exec psmdb-client-7469665986-p5ptg -- bash -c 'printf '\''db.adminCommand({balancerStatus: 1}).mode\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174.svc.cluster.local/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.jxN7jryzUR +++ mktemp ++ local LAST_ERR=/tmp/tmp.nA3FHyM2ck ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl exec psmdb-client-7469665986-p5ptg -- bash -c 'printf '\''db.adminCommand({balancerStatus: 1}).mode\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17174.svc.cluster.local/admin ' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.jxN7jryzUR ++ cat /tmp/tmp.nA3FHyM2ck ++ rm /tmp/tmp.jxN7jryzUR /tmp/tmp.nA3FHyM2ck ++ return 0 + balancer_running=full + [[ full != \f\u\l\l ]] + destroy balancer-17174 + local namespace=balancer-17174 + local ignore_logs=true + desc 'destroy cluster/operator and all other resources' + set +o xtrace ----------------------------------------------------------------------------------- destroy cluster/operator and all other resources ----------------------------------------------------------------------------------- + '[' true == false ']' + delete_crd + desc 'get and delete old CRDs and RBAC' + set +o xtrace ----------------------------------------------------------------------------------- get and delete old CRDs and RBAC ----------------------------------------------------------------------------------- + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.qklVzxFmez ++ mktemp + local LAST_ERR=/tmp/tmp.SAiWzpLUgp + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.qklVzxFmez customresourcedefinition.apiextensions.k8s.io "perconaservermongodbbackups.psmdb.percona.com" deleted customresourcedefinition.apiextensions.k8s.io "perconaservermongodbrestores.psmdb.percona.com" deleted customresourcedefinition.apiextensions.k8s.io "perconaservermongodbs.psmdb.percona.com" deleted + cat /tmp/tmp.SAiWzpLUgp + rm /tmp/tmp.qklVzxFmez /tmp/tmp.SAiWzpLUgp + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/crd.yaml ++ grep -v '\-\-\-' + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' + grep -v NAMESPACE + kubectl get perconaservermongodbbackups.psmdb.percona.com --all-namespaces -o wide error: the server doesn't have a resource type "perconaservermongodbbackups" + kubectl patch perconaservermongodbbackups.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbbackups" + : + kubectl_bin wait --for=delete crd perconaservermongodbbackups.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.Ssg5yvtR3y ++ mktemp + local LAST_ERR=/tmp/tmp.BQfX2ibLzl + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete crd perconaservermongodbbackups.psmdb.percona.com + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Ssg5yvtR3y + cat /tmp/tmp.BQfX2ibLzl + rm /tmp/tmp.Ssg5yvtR3y /tmp/tmp.BQfX2ibLzl + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + kubectl get perconaservermongodbrestores.psmdb.percona.com --all-namespaces -o wide + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbrestores.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' + grep -v NAMESPACE error: the server doesn't have a resource type "perconaservermongodbrestores" + kubectl patch perconaservermongodbrestores.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbrestores" + : + kubectl_bin wait --for=delete crd perconaservermongodbrestores.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.ML1HqwhkGw ++ mktemp + local LAST_ERR=/tmp/tmp.yp3NyNsoPE + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete crd perconaservermongodbrestores.psmdb.percona.com + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ML1HqwhkGw + cat /tmp/tmp.yp3NyNsoPE + rm /tmp/tmp.ML1HqwhkGw /tmp/tmp.yp3NyNsoPE + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbs" + kubectl patch perconaservermongodbs.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbs" + : + kubectl_bin wait --for=delete crd perconaservermongodbs.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.L1mi4bsBQX ++ mktemp + local LAST_ERR=/tmp/tmp.j32hpXqxiv + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete crd perconaservermongodbs.psmdb.percona.com + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.L1mi4bsBQX + cat /tmp/tmp.j32hpXqxiv + rm /tmp/tmp.L1mi4bsBQX /tmp/tmp.j32hpXqxiv + return 0 + local rbac_yaml=rbac.yaml + '[' -n psmdb-operator ']' + rbac_yaml=cw-rbac.yaml + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.qbEB08Mcsn ++ mktemp + local LAST_ERR=/tmp/tmp.0ZgHlynH2Q + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1545/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.qbEB08Mcsn clusterrole.rbac.authorization.k8s.io "percona-server-mongodb-operator" deleted clusterrolebinding.rbac.authorization.k8s.io "service-account-percona-server-mongodb-operator" deleted + cat /tmp/tmp.0ZgHlynH2Q + rm /tmp/tmp.qbEB08Mcsn /tmp/tmp.0ZgHlynH2Q + return 0 + kubectl_bin delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.4/cert-manager.yaml + : + '[' -n '' ']' + '[' -n psmdb-operator ']' + kubectl_bin delete --grace-period=0 --force=true namespace balancer-17174 + rm -rf /tmp/tmp.RXrKNURK1A ++ mktemp + local LAST_OUT=/tmp/tmp.zBBHU4MNTT ++ mktemp + kubectl_bin delete --grace-period=0 --force=true namespace psmdb-operator ++ mktemp + local LAST_ERR=/tmp/tmp.O8LYDnWHn1 + local exit_status=0 + local timeout=4 ++ seq 0 2 + local LAST_OUT=/tmp/tmp.uqR3EcS6b1 + for i in '$(seq 0 2)' + set +e ++ mktemp + kubectl delete --grace-period=0 --force=true namespace balancer-17174 + local LAST_ERR=/tmp/tmp.n9nly1vMLC + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete --grace-period=0 --force=true namespace psmdb-operator