++ echo 'Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/e2e-tests/logs/recover-no-primary.log' Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/e2e-tests/logs/recover-no-primary.log ++ '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/e2e-tests/conf/cloud-secret.yml ']' ++ SKIP_BACKUPS_TO_AWS_GCP_AZURE= ++ oc get projects ++ kubectl get nodes ++ grep '^minikube' +++ kubectl version -o json +++ jq -r .serverVersion.gitVersion +++ grep '\-eks\-' WARNING: version difference between client (1.33) and server (1.30) exceeds the supported minor version skew of +/-1 ++ '[' ']' ++ EKS=0 +++ kubectl version -o json +++ jq -r .serverVersion.gitVersion +++ grep gke WARNING: version difference between client (1.33) and server (1.30) exceeds the supported minor version skew of +/-1 ++ '[' v1.30.12-gke.1390000 ']' ++ GKE=1 +++ jq -r '.serverVersion.major + "." + .serverVersion.minor' +++ /usr/bin/sed -r 's/[^0-9.]+//g' +++ kubectl version -o json WARNING: version difference between client (1.33) and server (1.30) exceeds the supported minor version skew of +/-1 ++ KUBE_VERSION=1.30 + create_infra recover-no-primary-10982 + local ns=recover-no-primary-10982 + [[ 1 == 1 ]] + 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-1987/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.9rFf3ZqAvH ++ mktemp + local LAST_ERR=/tmp/tmp.I30K2wlQnm + 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-1987/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.9rFf3ZqAvH 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.I30K2wlQnm + rm /tmp/tmp.9rFf3ZqAvH /tmp/tmp.I30K2wlQnm + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/deploy/crd.yaml ++ grep -v '\-\-\-' + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + grep -v NAMESPACE + kubectl get perconaservermongodbbackups.psmdb.percona.com --all-namespaces -o wide + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' 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.7Q9dDgbMEz ++ mktemp + local LAST_ERR=/tmp/tmp.La7puGgLRa + 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.7Q9dDgbMEz + cat /tmp/tmp.La7puGgLRa + rm /tmp/tmp.7Q9dDgbMEz /tmp/tmp.La7puGgLRa + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + grep -v NAMESPACE + 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\":[]}}"' 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.pCd7l8yDkt ++ mktemp + local LAST_ERR=/tmp/tmp.EIFktbHSRu + 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.pCd7l8yDkt + cat /tmp/tmp.EIFktbHSRu + rm /tmp/tmp.pCd7l8yDkt /tmp/tmp.EIFktbHSRu + 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.08HSEPJSbX ++ mktemp + local LAST_ERR=/tmp/tmp.TwKK31UnG0 + 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.08HSEPJSbX + cat /tmp/tmp.TwKK31UnG0 + rm /tmp/tmp.08HSEPJSbX /tmp/tmp.TwKK31UnG0 + 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-1987/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.Llvg3B2hYk ++ mktemp + local LAST_ERR=/tmp/tmp.WPeNt3iWZX + 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-1987/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Llvg3B2hYk 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.WPeNt3iWZX + rm /tmp/tmp.Llvg3B2hYk /tmp/tmp.WPeNt3iWZX + return 0 + check_crd_for_deletion PR-1987-82b5284c + local git_tag=PR-1987-82b5284c ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-1987-82b5284c/deploy/crd.yaml ++ yq eval .metadata.name ++ /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.GlUA26OyrB +++ mktemp ++ local LAST_ERR=/tmp/tmp.OWiDaLai9R ++ 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.GlUA26OyrB ++ cat /tmp/tmp.OWiDaLai9R 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.GlUA26OyrB ++ cat /tmp/tmp.OWiDaLai9R 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.GlUA26OyrB ++ cat /tmp/tmp.OWiDaLai9R Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 8 ++ cat /tmp/tmp.GlUA26OyrB ++ cat /tmp/tmp.OWiDaLai9R Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.GlUA26OyrB /tmp/tmp.OWiDaLai9R ++ 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 ++ sed s/NAMESPACE// ++ tail -n1 ++ awk '-F ' '{print $2}' + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ awk '{print $1}' ++ grep chaos-mesh + 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 + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' ++ 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 + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ 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 ----------------------------------------------------------------------------------- + egrep -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + awk '{print$1}' + '[' -n '' ']' + desc 'cleaned up old namespaces psmdb-operator' + xargs kubectl delete ns + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces psmdb-operator ----------------------------------------------------------------------------------- + kubectl_bin delete namespace psmdb-operator --ignore-not-found + kubectl_bin get ns ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.D6GmJGIDih ++ mktemp + local LAST_OUT=/tmp/tmp.9aKyrUkxWb ++ mktemp + local LAST_ERR=/tmp/tmp.K2g6Uk8FAY + local exit_status=0 + local timeout=4 ++ seq 0 2 + local LAST_ERR=/tmp/tmp.5nEgxHsSfX + local exit_status=0 + local timeout=4 + for i in '$(seq 0 2)' + set +e ++ seq 0 2 + kubectl get ns + for i in '$(seq 0 2)' + set +e + kubectl delete namespace psmdb-operator --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.D6GmJGIDih + cat /tmp/tmp.K2g6Uk8FAY + rm /tmp/tmp.D6GmJGIDih /tmp/tmp.K2g6Uk8FAY + return 0 namespace "recover-no-primary-22792" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.9aKyrUkxWb namespace "psmdb-operator" deleted + cat /tmp/tmp.5nEgxHsSfX + rm /tmp/tmp.9aKyrUkxWb /tmp/tmp.5nEgxHsSfX + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.tdDK2ERTud ++ mktemp + local LAST_ERR=/tmp/tmp.SvavVbh4QH + 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.tdDK2ERTud + cat /tmp/tmp.SvavVbh4QH + rm /tmp/tmp.tdDK2ERTud /tmp/tmp.SvavVbh4QH + 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.S3MTQ1L9pM ++ mktemp + local LAST_ERR=/tmp/tmp.cSt0WnpOIF + 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.S3MTQ1L9pM namespace/psmdb-operator created + cat /tmp/tmp.cSt0WnpOIF + rm /tmp/tmp.S3MTQ1L9pM /tmp/tmp.cSt0WnpOIF + return 0 + set_kube_ctx psmdb-operator + local namespace=psmdb-operator ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.dHYZlf5ssk +++ mktemp ++ local LAST_ERR=/tmp/tmp.EaknRa2Umh ++ 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.dHYZlf5ssk ++ cat /tmp/tmp.EaknRa2Umh ++ rm /tmp/tmp.dHYZlf5ssk /tmp/tmp.EaknRa2Umh ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1987-82b5284c-4-cluster4 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.2s4u75mXoi ++ mktemp + local LAST_ERR=/tmp/tmp.bFNMBLOkrF + 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-1987-82b5284c-4-cluster4 --namespace=psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.2s4u75mXoi Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1987-82b5284c-4-cluster4" modified. + cat /tmp/tmp.bFNMBLOkrF + rm /tmp/tmp.2s4u75mXoi /tmp/tmp.bFNMBLOkrF + 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-1987/e2e-tests/recover-no-primary/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.wNbOd26qOO ++ mktemp + local LAST_ERR=/tmp/tmp.5iK4umh2TA + 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-1987/deploy/crd.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.wNbOd26qOO 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.5iK4umh2TA + rm /tmp/tmp.wNbOd26qOO /tmp/tmp.5iK4umh2TA + return 0 + '[' -n psmdb-operator ']' + apply_rbac cw-rbac + local operator_namespace=psmdb-operator + local rbac=cw-rbac + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/deploy/cw-rbac.yaml + kubectl_bin apply -n psmdb-operator -f - + sed -e 's^namespace: .*^namespace: psmdb-operator^' ++ mktemp + local LAST_OUT=/tmp/tmp.RxrTwNnXpD ++ mktemp + local LAST_ERR=/tmp/tmp.6WopUSg5q5 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -n psmdb-operator -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.RxrTwNnXpD 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.6WopUSg5q5 + rm /tmp/tmp.RxrTwNnXpD /tmp/tmp.6WopUSg5q5 + return 0 + kubectl_bin apply -f - + yq eval ' (.spec.template.spec.containers[].image = "perconalab/percona-server-mongodb-operator:PR-1987-82b5284c") | ((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") | ((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/deploy/cw-operator.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.wTnoLMq0wv ++ mktemp + local LAST_ERR=/tmp/tmp.wfSHWbCdZT + 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.wTnoLMq0wv deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.wfSHWbCdZT + rm /tmp/tmp.wTnoLMq0wv /tmp/tmp.wfSHWbCdZT + 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.M3QROGamTd +++ mktemp ++ local LAST_ERR=/tmp/tmp.70U7ojNw3m ++ 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.M3QROGamTd ++ cat /tmp/tmp.70U7ojNw3m ++ rm /tmp/tmp.M3QROGamTd /tmp/tmp.70U7ojNw3m ++ return 0 + wait_pod percona-server-mongodb-operator-59499dbc95-jfdqs + local pod=percona-server-mongodb-operator-59499dbc95-jfdqs + set +o xtrace waiting for pod/percona-server-mongodb-operator-59499dbc95-jfdqs to be ready.OK + echo 'Print operator info from log' Print operator info from log + grep 'Manager starting up' ++ 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.Rlv0atQ08D +++ mktemp ++ local LAST_ERR=/tmp/tmp.H2yqS0NgkM ++ 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.Rlv0atQ08D ++ cat /tmp/tmp.H2yqS0NgkM ++ rm /tmp/tmp.Rlv0atQ08D /tmp/tmp.H2yqS0NgkM ++ return 0 + kubectl_bin logs percona-server-mongodb-operator-59499dbc95-jfdqs ++ mktemp + local LAST_OUT=/tmp/tmp.JVPjCXAYne ++ mktemp + local LAST_ERR=/tmp/tmp.kdhZK37Pvw + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl logs percona-server-mongodb-operator-59499dbc95-jfdqs + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.JVPjCXAYne + cat /tmp/tmp.kdhZK37Pvw + rm /tmp/tmp.JVPjCXAYne /tmp/tmp.kdhZK37Pvw + return 0 2025-07-28T13:27:35.600Z INFO setup Manager starting up {"gitCommit": "82b5284c11a3deb29758d79b74c21073da463260", "gitBranch": "PR-1987-82b5284c", "buildTime": "", "goVersion": "go1.24.5", "os": "linux", "arch": "amd64"} + create_namespace recover-no-primary-10982 + local namespace=recover-no-primary-10982 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ sed s/NAMESPACE// ++ awk '-F ' '{print $2}' ++ tail -n1 ++ helm list --all-namespaces --filter chaos-mesh + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ awk '{print $1}' ++ grep chaos-mesh + 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 ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' ++ 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 + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ 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 + '[' -n '' ']' + desc 'cleaned up old namespaces recover-no-primary-10982' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces recover-no-primary-10982 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace recover-no-primary-10982 --ignore-not-found ++ mktemp ++ mktemp + xargs kubectl delete ns + local LAST_OUT=/tmp/tmp.eoL0HA6Tdk ++ mktemp + local LAST_OUT=/tmp/tmp.bvBhEtnTpO ++ mktemp + local LAST_ERR=/tmp/tmp.vnfClYSHxm + local exit_status=0 + local timeout=4 ++ seq 0 2 + local LAST_ERR=/tmp/tmp.oSovfsTNqt + local exit_status=0 + local timeout=4 + egrep -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + for i in '$(seq 0 2)' + set +e + kubectl delete namespace recover-no-primary-10982 --ignore-not-found ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl get ns + awk '{print$1}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.bvBhEtnTpO + cat /tmp/tmp.oSovfsTNqt + rm /tmp/tmp.bvBhEtnTpO /tmp/tmp.oSovfsTNqt + return 0 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.eoL0HA6Tdk + cat /tmp/tmp.vnfClYSHxm + rm /tmp/tmp.eoL0HA6Tdk /tmp/tmp.vnfClYSHxm + return 0 + kubectl_bin wait --for=delete namespace recover-no-primary-10982 ++ mktemp + local LAST_OUT=/tmp/tmp.hN3j6lDEnq ++ mktemp + local LAST_ERR=/tmp/tmp.5pLy2PYOIr + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete namespace recover-no-primary-10982 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.hN3j6lDEnq + cat /tmp/tmp.5pLy2PYOIr + rm /tmp/tmp.hN3j6lDEnq /tmp/tmp.5pLy2PYOIr + return 0 + desc 'create namespace recover-no-primary-10982' + set +o xtrace ----------------------------------------------------------------------------------- create namespace recover-no-primary-10982 ----------------------------------------------------------------------------------- + kubectl_bin create namespace recover-no-primary-10982 ++ mktemp + local LAST_OUT=/tmp/tmp.7OJP2o2tC0 ++ mktemp + local LAST_ERR=/tmp/tmp.LeNjZDg3Pi + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace recover-no-primary-10982 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.7OJP2o2tC0 namespace/recover-no-primary-10982 created + cat /tmp/tmp.LeNjZDg3Pi + rm /tmp/tmp.7OJP2o2tC0 /tmp/tmp.LeNjZDg3Pi + return 0 + set_kube_ctx recover-no-primary-10982 + local namespace=recover-no-primary-10982 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.BmfwJ0lSc8 +++ mktemp ++ local LAST_ERR=/tmp/tmp.mRuZbsppVB ++ 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.BmfwJ0lSc8 ++ cat /tmp/tmp.mRuZbsppVB ++ rm /tmp/tmp.BmfwJ0lSc8 /tmp/tmp.mRuZbsppVB ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1987-82b5284c-4-cluster4 --namespace=recover-no-primary-10982 ++ mktemp + local LAST_OUT=/tmp/tmp.f5H6NrYfL3 ++ mktemp + local LAST_ERR=/tmp/tmp.SIg7gjVCyJ + 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-1987-82b5284c-4-cluster4 --namespace=recover-no-primary-10982 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.f5H6NrYfL3 Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1987-82b5284c-4-cluster4" modified. + cat /tmp/tmp.SIg7gjVCyJ + rm /tmp/tmp.f5H6NrYfL3 /tmp/tmp.SIg7gjVCyJ + return 0 + cluster=some-name + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/e2e-tests/conf/secrets_with_tls.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/e2e-tests/conf/client.yml ++ mktemp + local LAST_OUT=/tmp/tmp.ERcrtUAkuA ++ mktemp + local LAST_ERR=/tmp/tmp.83ubPwwFJz + 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-1987/e2e-tests/conf/secrets_with_tls.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/e2e-tests/conf/client.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ERcrtUAkuA secret/some-users created secret/some-name-ssl created secret/some-name-ssl-internal created deployment.apps/psmdb-client created + cat /tmp/tmp.83ubPwwFJz + rm /tmp/tmp.ERcrtUAkuA /tmp/tmp.83ubPwwFJz + return 0 + desc 'testing unexposed single replset cluster' + set +o xtrace ----------------------------------------------------------------------------------- testing unexposed single replset cluster ----------------------------------------------------------------------------------- + test_single_replset + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/e2e-tests/recover-no-primary/conf/some-name.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/e2e-tests/recover-no-primary/conf/some-name.yml + kubectl_bin apply -f - ++ mktemp + yq eval '(.spec | select(has("initImage"))).initImage = "perconalab/percona-server-mongodb-operator:PR-1987-82b5284c"' + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1987/e2e-tests/recover-no-primary/conf/some-name.yml + local LAST_OUT=/tmp/tmp.JqefkfYu0C ++ mktemp + yq eval '(.spec | select(has("backup"))).backup.image = "perconalab/percona-server-mongodb-operator:main-backup"' + yq eval '.spec.upgradeOptions.apply="Never"' + local LAST_ERR=/tmp/tmp.q1KtsIy9o8 + local exit_status=0 + local timeout=4 + yq eval '(.spec | select(has("pmm"))).pmm.image = "perconalab/pmm-client:dev-latest"' + yq eval '(.spec | select(.image == null)).image = "perconalab/percona-server-mongodb-operator:main-mongod7.0"' ++ 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.JqefkfYu0C perconaservermongodb.psmdb.percona.com/some-name created + cat /tmp/tmp.q1KtsIy9o8 + rm /tmp/tmp.JqefkfYu0C /tmp/tmp.q1KtsIy9o8 + return 0 + 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.9FvgB820HK +++ mktemp ++ local LAST_ERR=/tmp/tmp.q80hYti4P8 ++ 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.9FvgB820HK ++ cat /tmp/tmp.q80hYti4P8 ++ rm /tmp/tmp.9FvgB820HK /tmp/tmp.q80hYti4P8 ++ 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.1NWfUc4lnt +++ mktemp ++ local LAST_ERR=/tmp/tmp.reEdLHCEsk ++ 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.1NWfUc4lnt ++ cat /tmp/tmp.reEdLHCEsk ++ rm /tmp/tmp.1NWfUc4lnt /tmp/tmp.reEdLHCEsk ++ return 0 + [[ '' == \t\r\u\e ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.ZkEVEOAKvn +++ mktemp ++ local LAST_ERR=/tmp/tmp.Z5FiWN8eNw ++ 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")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.ZkEVEOAKvn ++ cat /tmp/tmp.Z5FiWN8eNw ++ rm /tmp/tmp.ZkEVEOAKvn /tmp/tmp.Z5FiWN8eNw ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness + wait_cluster_consistency some-name + local cluster_name=some-name + local wait_time=32 + retry=0 + sleep 7 + echo -n 'waiting for cluster readyness' waiting for cluster readyness++ kubectl_bin get psmdb some-name -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.dV9Ozo8aUA +++ mktemp ++ local LAST_ERR=/tmp/tmp.YM4oI48EsO ++ 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={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.dV9Ozo8aUA ++ cat /tmp/tmp.YM4oI48EsO ++ rm /tmp/tmp.dV9Ozo8aUA /tmp/tmp.YM4oI48EsO ++ return 0 + [[ ready == \r\e\a\d\y ]] + echo + desc 'kill pods abruptly and wait for recovery' + set +o xtrace ----------------------------------------------------------------------------------- kill pods abruptly and wait for recovery ----------------------------------------------------------------------------------- ++ seq 0 2 + for i in '$(seq 0 2)' + kubectl_bin exec some-name-rs0-0 -c mongod -- kill 1 ++ mktemp + local LAST_OUT=/tmp/tmp.Q9NM1P2Cxw ++ mktemp + local LAST_ERR=/tmp/tmp.e96M66qvWq + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec some-name-rs0-0 -c mongod -- kill 1 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Q9NM1P2Cxw + cat /tmp/tmp.e96M66qvWq + rm /tmp/tmp.Q9NM1P2Cxw /tmp/tmp.e96M66qvWq + return 0 + for i in '$(seq 0 2)' + kubectl_bin exec some-name-rs0-1 -c mongod -- kill 1 ++ mktemp + local LAST_OUT=/tmp/tmp.DkxFffxc20 ++ mktemp + local LAST_ERR=/tmp/tmp.MWfx6Y3aEi + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec some-name-rs0-1 -c mongod -- kill 1 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.DkxFffxc20 + cat /tmp/tmp.MWfx6Y3aEi + rm /tmp/tmp.DkxFffxc20 /tmp/tmp.MWfx6Y3aEi + return 0 + for i in '$(seq 0 2)' + kubectl_bin exec some-name-rs0-2 -c mongod -- kill 1 ++ mktemp + local LAST_OUT=/tmp/tmp.eUrkCTQHHY ++ mktemp + local LAST_ERR=/tmp/tmp.Tfkdc4vT8B + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec some-name-rs0-2 -c mongod -- kill 1 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.eUrkCTQHHY + cat /tmp/tmp.Tfkdc4vT8B + rm /tmp/tmp.eUrkCTQHHY /tmp/tmp.Tfkdc4vT8B + return 0 + sleep 10