Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/e2e-tests/logs/data-sharded.log WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 + main + [[ perconalab/percona-server-mongodb-operator:main-mongod7.0 == *\p\e\r\c\o\n\a\-\s\e\r\v\e\r\-\m\o\n\g\o\d\b\-\o\p\e\r\a\t\o\r* ]] ++ echo -n perconalab/percona-server-mongodb-operator:main-mongod7.0 ++ /usr/bin/sed -r 's/.*([0-9].[0-9])$/\1/' + MONGO_VER=7.0 + create_infra data-sharded-1390 + local ns=data-sharded-1390 + 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-1559/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.L2AfEBB9KM ++ mktemp + local LAST_ERR=/tmp/tmp.0vnqcMYQyc + 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-1559/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.L2AfEBB9KM 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.0vnqcMYQyc + rm /tmp/tmp.L2AfEBB9KM /tmp/tmp.0vnqcMYQyc + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/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.B3s5bzk969 ++ mktemp + local LAST_ERR=/tmp/tmp.VMH5gmraUD + 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.B3s5bzk969 + cat /tmp/tmp.VMH5gmraUD + rm /tmp/tmp.B3s5bzk969 /tmp/tmp.VMH5gmraUD + 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.w1kd2DexS4 ++ mktemp + local LAST_ERR=/tmp/tmp.5ED9hZPv7U + 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.w1kd2DexS4 + cat /tmp/tmp.5ED9hZPv7U + rm /tmp/tmp.w1kd2DexS4 /tmp/tmp.5ED9hZPv7U + 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.fSy08nUuxX ++ mktemp + local LAST_ERR=/tmp/tmp.g9TYVBKchd + 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.fSy08nUuxX + cat /tmp/tmp.g9TYVBKchd + rm /tmp/tmp.fSy08nUuxX /tmp/tmp.g9TYVBKchd + 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-1559/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.4ByOnJTwZk ++ mktemp + local LAST_ERR=/tmp/tmp.Fv6Da68cMU + 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-1559/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.4ByOnJTwZk 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.Fv6Da68cMU + rm /tmp/tmp.4ByOnJTwZk /tmp/tmp.Fv6Da68cMU + return 0 + check_crd_for_deletion PR-1559-6384b519 + local git_tag=PR-1559-6384b519 ++ yq eval .metadata.name ++ /usr/bin/sed ':a;N;$!ba;s/\n/ /g' ++ /usr/bin/sed s/---//g ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-1559-6384b519/deploy/crd.yaml + 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.5BtTehSYnB +++ mktemp ++ local LAST_ERR=/tmp/tmp.8VmLicFgeB ++ 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.5BtTehSYnB ++ cat /tmp/tmp.8VmLicFgeB 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.5BtTehSYnB ++ cat /tmp/tmp.8VmLicFgeB 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.5BtTehSYnB ++ cat /tmp/tmp.8VmLicFgeB Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 8 ++ cat /tmp/tmp.5BtTehSYnB ++ cat /tmp/tmp.8VmLicFgeB Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.5BtTehSYnB /tmp/tmp.8VmLicFgeB ++ 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 ++ awk '-F ' '{print $2}' ++ tail -n1 ++ 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}' ++ grep chaos-mesh ++ kubectl get ValidatingWebhookConfiguration + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ awk '{print $1}' ++ kubectl get ValidatingWebhookConfiguration ++ 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 + : ++ kubectl get clusterrole ++ grep chaos-mesh ++ awk '{print $1}' + 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-mcs|^NAME' + '[' -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 ++ mktemp + local LAST_OUT=/tmp/tmp.Cx2t0tHkbK + xargs kubectl delete ns ++ mktemp + local LAST_ERR=/tmp/tmp.pj82wu9C8w + local exit_status=0 + local timeout=4 + kubectl_bin get ns ++ mktemp ++ seq 0 2 + awk '{print$1}' + local LAST_OUT=/tmp/tmp.kEMod0ve4T + for i in '$(seq 0 2)' + set +e + kubectl delete namespace psmdb-operator --ignore-not-found ++ mktemp + local LAST_ERR=/tmp/tmp.GkE26FkoWY + 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.kEMod0ve4T + cat /tmp/tmp.GkE26FkoWY + rm /tmp/tmp.kEMod0ve4T /tmp/tmp.GkE26FkoWY + return 0 namespace "cert-manager" deleted namespace "data-sharded-32726" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Cx2t0tHkbK namespace "psmdb-operator" deleted + cat /tmp/tmp.pj82wu9C8w + rm /tmp/tmp.Cx2t0tHkbK /tmp/tmp.pj82wu9C8w + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.B1SFk4gbTf ++ mktemp + local LAST_ERR=/tmp/tmp.29yVAeBgh7 + 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.B1SFk4gbTf + cat /tmp/tmp.29yVAeBgh7 + rm /tmp/tmp.B1SFk4gbTf /tmp/tmp.29yVAeBgh7 + 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.WtDURJSFBe ++ mktemp + local LAST_ERR=/tmp/tmp.xJJpjexWUw + 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.WtDURJSFBe namespace/psmdb-operator created + cat /tmp/tmp.xJJpjexWUw + rm /tmp/tmp.WtDURJSFBe /tmp/tmp.xJJpjexWUw + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.cwNJ0dJaFj +++ mktemp ++ local LAST_ERR=/tmp/tmp.8OsN9g4Ijt ++ 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.cwNJ0dJaFj ++ cat /tmp/tmp.8OsN9g4Ijt ++ rm /tmp/tmp.cwNJ0dJaFj /tmp/tmp.8OsN9g4Ijt ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1559-6384b519-2-cluster6 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.9zEHj5wzZT ++ mktemp + local LAST_ERR=/tmp/tmp.SIaHEqiPyd + 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-1559-6384b519-2-cluster6 --namespace=psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.9zEHj5wzZT Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1559-6384b519-2-cluster6" modified. + cat /tmp/tmp.SIaHEqiPyd + rm /tmp/tmp.9zEHj5wzZT /tmp/tmp.SIaHEqiPyd + 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-1559/e2e-tests/data-sharded/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.3I6PaKzOWH ++ mktemp + local LAST_ERR=/tmp/tmp.0eTZH1srzR + 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-1559/deploy/crd.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.3I6PaKzOWH 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.0eTZH1srzR + rm /tmp/tmp.3I6PaKzOWH /tmp/tmp.0eTZH1srzR + 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-1559/deploy/cw-rbac.yaml + sed -e 's^namespace: .*^namespace: psmdb-operator^' + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.HxztWmUhTH ++ mktemp + local LAST_ERR=/tmp/tmp.TzyAQ4Garb + 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.HxztWmUhTH 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.TzyAQ4Garb + rm /tmp/tmp.HxztWmUhTH /tmp/tmp.TzyAQ4Garb + return 0 + yq eval ' (.spec.template.spec.containers[].image = "perconalab/percona-server-mongodb-operator:PR-1559-6384b519") | ((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") | ((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/deploy/cw-operator.yaml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.7bJivYFM9Q ++ mktemp + local LAST_ERR=/tmp/tmp.A8lZrCVq6Z + 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.7bJivYFM9Q deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.A8lZrCVq6Z + rm /tmp/tmp.7bJivYFM9Q /tmp/tmp.A8lZrCVq6Z + 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.G8ByEgJwP3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.kFmOVG5y7q ++ 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.G8ByEgJwP3 ++ cat /tmp/tmp.kFmOVG5y7q ++ rm /tmp/tmp.G8ByEgJwP3 /tmp/tmp.kFmOVG5y7q ++ return 0 + wait_pod percona-server-mongodb-operator-54f884cbc-9lgpv + local pod=percona-server-mongodb-operator-54f884cbc-9lgpv + set +o xtrace waiting for pod/percona-server-mongodb-operator-54f884cbc-9lgpv to be ready.OK + create_namespace data-sharded-1390 + local namespace=data-sharded-1390 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ sed s/NAMESPACE// ++ awk '-F ' '{print $2}' + 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 ++ 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}' ++ grep chaos-mesh.org ++ kubectl get crd ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ awk '{print $1}' ++ grep chaos-mesh ++ kubectl get clusterrolebinding + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ grep chaos-mesh ++ awk '{print $1}' + 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-mcs|^NAME' + '[' -n '' ']' + desc 'cleaned up old namespaces data-sharded-1390' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces data-sharded-1390 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace data-sharded-1390 --ignore-not-found ++ mktemp + kubectl_bin get ns ++ mktemp + local LAST_OUT=/tmp/tmp.fuYkmPJjgs ++ mktemp + local LAST_OUT=/tmp/tmp.QUpqvhuPXN + local LAST_ERR=/tmp/tmp.ix3k26uZb9 + local exit_status=0 + local timeout=4 ++ mktemp ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + local LAST_ERR=/tmp/tmp.wqCwVkgJaZ + kubectl get ns + local exit_status=0 + local timeout=4 + xargs kubectl delete ns ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete namespace data-sharded-1390 --ignore-not-found + awk '{print$1}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.fuYkmPJjgs + cat /tmp/tmp.ix3k26uZb9 + rm /tmp/tmp.fuYkmPJjgs /tmp/tmp.ix3k26uZb9 + return 0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.QUpqvhuPXN + cat /tmp/tmp.wqCwVkgJaZ + rm /tmp/tmp.QUpqvhuPXN /tmp/tmp.wqCwVkgJaZ + return 0 + kubectl_bin wait --for=delete namespace data-sharded-1390 ++ mktemp + local LAST_OUT=/tmp/tmp.TkvyCC8RBW ++ mktemp error: resource(s) were provided, but no name was specified + local LAST_ERR=/tmp/tmp.uKJAlR7yqQ + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete namespace data-sharded-1390 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.TkvyCC8RBW + cat /tmp/tmp.uKJAlR7yqQ + rm /tmp/tmp.TkvyCC8RBW /tmp/tmp.uKJAlR7yqQ + return 0 + desc 'create namespace data-sharded-1390' + set +o xtrace ----------------------------------------------------------------------------------- create namespace data-sharded-1390 ----------------------------------------------------------------------------------- + kubectl_bin create namespace data-sharded-1390 ++ mktemp + local LAST_OUT=/tmp/tmp.MfAoDwDxLo ++ mktemp + local LAST_ERR=/tmp/tmp.LUATRjYTns + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace data-sharded-1390 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.MfAoDwDxLo namespace/data-sharded-1390 created + cat /tmp/tmp.LUATRjYTns + rm /tmp/tmp.MfAoDwDxLo /tmp/tmp.LUATRjYTns + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.id7QgFJWJw +++ mktemp ++ local LAST_ERR=/tmp/tmp.cL3nESpCvp ++ 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.id7QgFJWJw ++ cat /tmp/tmp.cL3nESpCvp ++ rm /tmp/tmp.id7QgFJWJw /tmp/tmp.cL3nESpCvp ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1559-6384b519-2-cluster6 --namespace=data-sharded-1390 ++ mktemp + local LAST_OUT=/tmp/tmp.7y1YINLG9A ++ mktemp + local LAST_ERR=/tmp/tmp.GS7YtLsaoq + 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-1559-6384b519-2-cluster6 --namespace=data-sharded-1390 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.7y1YINLG9A Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1559-6384b519-2-cluster6" modified. + cat /tmp/tmp.GS7YtLsaoq + rm /tmp/tmp.7y1YINLG9A /tmp/tmp.GS7YtLsaoq + return 0 + deploy_cert_manager + desc 'deploy cert manager' + set +o xtrace ----------------------------------------------------------------------------------- deploy cert manager ----------------------------------------------------------------------------------- + kubectl_bin create namespace cert-manager ++ mktemp + local LAST_OUT=/tmp/tmp.CLGP8sdrpU ++ mktemp + local LAST_ERR=/tmp/tmp.a0Usvwm1bU + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace cert-manager + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.CLGP8sdrpU namespace/cert-manager created + cat /tmp/tmp.a0Usvwm1bU + rm /tmp/tmp.CLGP8sdrpU /tmp/tmp.a0Usvwm1bU + return 0 + kubectl_bin label namespace cert-manager certmanager.k8s.io/disable-validation=true ++ mktemp + local LAST_OUT=/tmp/tmp.fFOnw49rll ++ mktemp + local LAST_ERR=/tmp/tmp.zyD0U1HOf4 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.fFOnw49rll namespace/cert-manager labeled + cat /tmp/tmp.zyD0U1HOf4 + rm /tmp/tmp.fFOnw49rll /tmp/tmp.zyD0U1HOf4 + return 0 + kubectl_bin apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml --validate=false ++ mktemp + local LAST_OUT=/tmp/tmp.6CueHBDD68 ++ mktemp + local LAST_ERR=/tmp/tmp.o0ZmqpNQCn + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml --validate=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.6CueHBDD68 namespace/cert-manager configured customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io unchanged customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io unchanged customresourcedefinition.apiextensions.k8s.io/challenges.acme.cert-manager.io unchanged customresourcedefinition.apiextensions.k8s.io/clusterissuers.cert-manager.io unchanged customresourcedefinition.apiextensions.k8s.io/issuers.cert-manager.io unchanged customresourcedefinition.apiextensions.k8s.io/orders.acme.cert-manager.io unchanged serviceaccount/cert-manager-cainjector created serviceaccount/cert-manager created serviceaccount/cert-manager-webhook created clusterrole.rbac.authorization.k8s.io/cert-manager-cainjector unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-issuers unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-clusterissuers unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-certificates unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-orders unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-challenges unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-ingress-shim unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-cluster-view unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-view unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-edit unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-approve:cert-manager-io unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-certificatesigningrequests unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-webhook:subjectaccessreviews unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-cainjector unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-issuers unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-clusterissuers unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-certificates unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-orders unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-challenges unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-ingress-shim unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-approve:cert-manager-io unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-certificatesigningrequests unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-webhook:subjectaccessreviews configured role.rbac.authorization.k8s.io/cert-manager-cainjector:leaderelection unchanged role.rbac.authorization.k8s.io/cert-manager:leaderelection unchanged role.rbac.authorization.k8s.io/cert-manager-webhook:dynamic-serving created rolebinding.rbac.authorization.k8s.io/cert-manager-cainjector:leaderelection unchanged rolebinding.rbac.authorization.k8s.io/cert-manager:leaderelection configured rolebinding.rbac.authorization.k8s.io/cert-manager-webhook:dynamic-serving created service/cert-manager created service/cert-manager-webhook created deployment.apps/cert-manager-cainjector created deployment.apps/cert-manager created deployment.apps/cert-manager-webhook created mutatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook configured validatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook configured + cat /tmp/tmp.o0ZmqpNQCn Warning: resource namespaces/cert-manager is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically. + rm /tmp/tmp.6CueHBDD68 /tmp/tmp.o0ZmqpNQCn + return 0 + kubectl_bin -n cert-manager wait pod -l app.kubernetes.io/instance=cert-manager --for=condition=ready ++ mktemp + local LAST_OUT=/tmp/tmp.GcCtR5xWto ++ mktemp + local LAST_ERR=/tmp/tmp.i6UJ1feWNF + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl -n cert-manager wait pod -l app.kubernetes.io/instance=cert-manager --for=condition=ready + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.GcCtR5xWto pod/cert-manager-5658d944df-z4dgm condition met pod/cert-manager-cainjector-cb99ff845-f9sx7 condition met pod/cert-manager-webhook-7fd74b8dc7-jjlvs condition met + cat /tmp/tmp.i6UJ1feWNF + rm /tmp/tmp.GcCtR5xWto /tmp/tmp.i6UJ1feWNF + return 0 + sleep 120 + desc 'create secrets and start client' + set +o xtrace ----------------------------------------------------------------------------------- create secrets and start client ----------------------------------------------------------------------------------- + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/e2e-tests/conf/secrets.yml ++ mktemp + local LAST_OUT=/tmp/tmp.0OfMGlnqrj ++ mktemp + local LAST_ERR=/tmp/tmp.Xkez6LEvKG + 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-1559/e2e-tests/conf/secrets.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.0OfMGlnqrj secret/some-users created + cat /tmp/tmp.Xkez6LEvKG + rm /tmp/tmp.0OfMGlnqrj /tmp/tmp.Xkez6LEvKG + return 0 + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/e2e-tests/conf/client_with_tls.yml ++ mktemp + local LAST_OUT=/tmp/tmp.ZGmk7AJs1B ++ mktemp + local LAST_ERR=/tmp/tmp.ZXwDSOMHUn + 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-1559/e2e-tests/conf/client_with_tls.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ZGmk7AJs1B deployment.apps/psmdb-client created + cat /tmp/tmp.ZXwDSOMHUn + rm /tmp/tmp.ZGmk7AJs1B /tmp/tmp.ZXwDSOMHUn + return 0 + cluster=some-name + desc 'create first PSMDB cluster some-name' + set +o xtrace ----------------------------------------------------------------------------------- create first PSMDB cluster some-name ----------------------------------------------------------------------------------- + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/e2e-tests/data-sharded/conf/some-name.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/e2e-tests/data-sharded/conf/some-name.yml + kubectl_bin apply -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/e2e-tests/data-sharded/conf/some-name.yml + 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"' + yq eval '(.spec | select(has("initImage"))).initImage = "perconalab/percona-server-mongodb-operator:PR-1559-6384b519"' + yq eval '(.spec | select(has("backup"))).backup.image = "perconalab/percona-server-mongodb-operator:main-backup"' ++ mktemp + local LAST_OUT=/tmp/tmp.MRWrCsQS85 ++ mktemp + local LAST_ERR=/tmp/tmp.aU8JShVyoZ + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f - + yq eval '.spec.upgradeOptions.apply="Never"' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.MRWrCsQS85 perconaservermongodb.psmdb.percona.com/some-name created + cat /tmp/tmp.aU8JShVyoZ + rm /tmp/tmp.MRWrCsQS85 /tmp/tmp.aU8JShVyoZ + return 0 + desc 'check if all Pods started' + set +o xtrace ----------------------------------------------------------------------------------- check if all Pods started ----------------------------------------------------------------------------------- + wait_for_running some-name-cfg 3 + local name=some-name-cfg + let last_pod=2 + local check_cluster_readyness=true + 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.sJvRiA0OOj +++ mktemp ++ local LAST_ERR=/tmp/tmp.Q9FuqIZZpK ++ 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.sJvRiA0OOj ++ cat /tmp/tmp.Q9FuqIZZpK ++ rm /tmp/tmp.sJvRiA0OOj /tmp/tmp.Q9FuqIZZpK ++ 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.yG0kdIBv44 +++ mktemp ++ local LAST_ERR=/tmp/tmp.vKNaYTZOQJ ++ 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.yG0kdIBv44 ++ cat /tmp/tmp.vKNaYTZOQJ ++ rm /tmp/tmp.yG0kdIBv44 /tmp/tmp.vKNaYTZOQJ ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness........................................... + 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.Ey1AeqfGuN +++ mktemp ++ local LAST_ERR=/tmp/tmp.rU7zxKJpwV ++ 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.Ey1AeqfGuN ++ cat /tmp/tmp.rU7zxKJpwV ++ rm /tmp/tmp.Ey1AeqfGuN /tmp/tmp.rU7zxKJpwV ++ 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.Tl6ciEktB3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.DpD66p8Ezq ++ 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.Tl6ciEktB3 ++ cat /tmp/tmp.DpD66p8Ezq ++ rm /tmp/tmp.Tl6ciEktB3 /tmp/tmp.DpD66p8Ezq ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness + wait_for_running some-name-rs1 3 + local name=some-name-rs1 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs1 + local cluster_name=some-name ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod some-name-rs1-0 + local pod=some-name-rs1-0 + set +o xtrace waiting for pod/some-name-rs1-0 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod some-name-rs1-1 + local pod=some-name-rs1-1 + set +o xtrace waiting for pod/some-name-rs1-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=="rs1")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.DKAhWaEhS9 +++ mktemp ++ local LAST_ERR=/tmp/tmp.ihSGMGOwqH ++ 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=="rs1")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.DKAhWaEhS9 ++ cat /tmp/tmp.ihSGMGOwqH ++ rm /tmp/tmp.DKAhWaEhS9 /tmp/tmp.ihSGMGOwqH ++ return 0 + [[ true == \t\r\u\e ]] + wait_pod some-name-rs1-arbiter-0 + local pod=some-name-rs1-arbiter-0 + set +o xtrace waiting for pod/some-name-rs1-arbiter-0 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.qfaB7SIQ99 +++ mktemp ++ local LAST_ERR=/tmp/tmp.er0iiGni5F ++ 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=="rs1")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.qfaB7SIQ99 ++ cat /tmp/tmp.er0iiGni5F ++ rm /tmp/tmp.qfaB7SIQ99 /tmp/tmp.er0iiGni5F ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness + wait_for_running some-name-rs2 3 + local name=some-name-rs2 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs2 + local cluster_name=some-name ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod some-name-rs2-0 + local pod=some-name-rs2-0 + set +o xtrace waiting for pod/some-name-rs2-0 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod some-name-rs2-1 + local pod=some-name-rs2-1 + set +o xtrace waiting for pod/some-name-rs2-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=="rs2")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.FFdVyU8CvL +++ mktemp ++ local LAST_ERR=/tmp/tmp.8hOOvWGlOr ++ 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=="rs2")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.FFdVyU8CvL ++ cat /tmp/tmp.8hOOvWGlOr ++ rm /tmp/tmp.FFdVyU8CvL /tmp/tmp.8hOOvWGlOr ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod some-name-rs2-2 + local pod=some-name-rs2-2 + set +o xtrace waiting for pod/some-name-rs2-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs2")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.MsYYjk4nwN +++ mktemp ++ local LAST_ERR=/tmp/tmp.xqt1LzJwdU ++ 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=="rs2")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.MsYYjk4nwN ++ cat /tmp/tmp.xqt1LzJwdU ++ rm /tmp/tmp.MsYYjk4nwN /tmp/tmp.xqt1LzJwdU ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness + 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.V1A1OhDIlu +++ mktemp ++ local LAST_ERR=/tmp/tmp.KnXNXzQIX4 ++ 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.V1A1OhDIlu ++ cat /tmp/tmp.KnXNXzQIX4 ++ rm /tmp/tmp.V1A1OhDIlu /tmp/tmp.KnXNXzQIX4 ++ 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.vtXSA0VLYc +++ mktemp ++ local LAST_ERR=/tmp/tmp.GHy44UCF7v ++ 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.vtXSA0VLYc ++ cat /tmp/tmp.GHy44UCF7v ++ rm /tmp/tmp.vtXSA0VLYc /tmp/tmp.GHy44UCF7v ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness + desc 'create user' + set +o xtrace ----------------------------------------------------------------------------------- create user ----------------------------------------------------------------------------------- + run_mongos 'db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})' userAdmin:userAdmin123456@some-name-mongos.data-sharded-1390 mongodb .svc.cluster.local '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + local 'command=db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})' + local uri=userAdmin:userAdmin123456@some-name-mongos.data-sharded-1390 + 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.ySbWycfnfo +++ mktemp ++ local LAST_ERR=/tmp/tmp.kXBB83aFbG ++ 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.ySbWycfnfo ++ cat /tmp/tmp.kXBB83aFbG ++ rm /tmp/tmp.ySbWycfnfo /tmp/tmp.kXBB83aFbG ++ return 0 + local client_container=psmdb-client-5f578b7f94-7lhbz + local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + kubectl_bin exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ mktemp + local LAST_OUT=/tmp/tmp.ibEnLTVFj2 ++ mktemp + local LAST_ERR=/tmp/tmp.9UsuUjyT1M + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ibEnLTVFj2 Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.data-sharded-1390.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb {"t":{"$date":"2024-06-04T15:02:08.756Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} Implicit session: session { "id" : UUID("81ecd9e1-1114-40e3-b02a-2cf70375dfcc") } Percona Server for MongoDB server version: v7.0.11-6 WARNING: shell and server versions do not match Successfully added user: { "user" : "user", "roles" : [ { "db" : "app", "role" : "readWrite" } ] } bye + cat /tmp/tmp.9UsuUjyT1M + rm /tmp/tmp.ibEnLTVFj2 /tmp/tmp.9UsuUjyT1M + return 0 + sleep 2 + desc 'set chunk size to 32 MB' + set +o xtrace ----------------------------------------------------------------------------------- set chunk size to 32 MB ----------------------------------------------------------------------------------- + run_mongos 'use config\n db.settings.save( { _id:"chunksize", value: 32 } )' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 mongodb .svc.cluster.local '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + local 'command=use config\n db.settings.save( { _id:"chunksize", value: 32 } )' + local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 + 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.MHt8SfDPPT +++ mktemp ++ local LAST_ERR=/tmp/tmp.z1QvFkMgNU ++ 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.MHt8SfDPPT ++ cat /tmp/tmp.z1QvFkMgNU ++ rm /tmp/tmp.MHt8SfDPPT /tmp/tmp.z1QvFkMgNU ++ return 0 + local client_container=psmdb-client-5f578b7f94-7lhbz + local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + kubectl_bin exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use config\n db.settings.save( { _id:"chunksize", value: 32 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ mktemp + local LAST_OUT=/tmp/tmp.ORgooQcKqC ++ mktemp + local LAST_ERR=/tmp/tmp.D8uDNHdztc + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use config\n db.settings.save( { _id:"chunksize", value: 32 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ORgooQcKqC Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.data-sharded-1390.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb {"t":{"$date":"2024-06-04T15:02:14.950Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} Implicit session: session { "id" : UUID("5a5ad21a-03e6-437d-99b3-9b05f1ee12af") } Percona Server for MongoDB server version: v7.0.11-6 WARNING: shell and server versions do not match switched to db config WriteResult({ "nMatched" : 0, "nUpserted" : 1, "nModified" : 0, "_id" : "chunksize" }) bye + cat /tmp/tmp.D8uDNHdztc + rm /tmp/tmp.ORgooQcKqC /tmp/tmp.D8uDNHdztc + return 0 + sleep 2 + desc 'write data' + set +o xtrace ----------------------------------------------------------------------------------- write data ----------------------------------------------------------------------------------- + run_script_mongos /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/e2e-tests/data-sharded/data.js user:pass@some-name-mongos.data-sharded-1390 mongodb .svc.cluster.local '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + local script=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/e2e-tests/data-sharded/data.js + local uri=user:pass@some-name-mongos.data-sharded-1390 + 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.0lfJ60hcBs +++ mktemp ++ local LAST_ERR=/tmp/tmp.GdvXsInSJv ++ 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.0lfJ60hcBs ++ cat /tmp/tmp.GdvXsInSJv ++ rm /tmp/tmp.0lfJ60hcBs /tmp/tmp.GdvXsInSJv ++ return 0 + local client_container=psmdb-client-5f578b7f94-7lhbz + local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ basename /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/e2e-tests/data-sharded/data.js + name=data.js + kubectl_bin cp /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/e2e-tests/data-sharded/data.js data-sharded-1390/psmdb-client-5f578b7f94-7lhbz:/tmp ++ mktemp + local LAST_OUT=/tmp/tmp.mUcBN79ceS ++ mktemp + local LAST_ERR=/tmp/tmp.PcGCKlDA72 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl cp /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/e2e-tests/data-sharded/data.js data-sharded-1390/psmdb-client-5f578b7f94-7lhbz:/tmp + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.mUcBN79ceS + cat /tmp/tmp.PcGCKlDA72 + rm /tmp/tmp.mUcBN79ceS /tmp/tmp.PcGCKlDA72 + return 0 + kubectl_bin exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'mongo mongodb://user:pass@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls /tmp/data.js' ++ mktemp + local LAST_OUT=/tmp/tmp.0oDjbx5CPS ++ mktemp + local LAST_ERR=/tmp/tmp.F42Jy2hVFq + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'mongo mongodb://user:pass@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls /tmp/data.js' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.0oDjbx5CPS Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.data-sharded-1390.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb {"t":{"$date":"2024-06-04T15:02:24.451Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} Implicit session: session { "id" : UUID("32469e89-a5fb-4c31-bed3-923f2260ec63") } Percona Server for MongoDB server version: v7.0.11-6 WARNING: shell and server versions do not match + cat /tmp/tmp.F42Jy2hVFq + rm /tmp/tmp.0oDjbx5CPS /tmp/tmp.F42Jy2hVFq + return 0 + desc 'shard collection' + set +o xtrace ----------------------------------------------------------------------------------- shard collection ----------------------------------------------------------------------------------- + run_mongos 'sh.enableSharding("app")' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 mongodb .svc.cluster.local '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + local 'command=sh.enableSharding("app")' + local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 + 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.2fcOqtjJdM +++ mktemp ++ local LAST_ERR=/tmp/tmp.BOtGXLvKDZ ++ 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.2fcOqtjJdM ++ cat /tmp/tmp.BOtGXLvKDZ ++ rm /tmp/tmp.2fcOqtjJdM /tmp/tmp.BOtGXLvKDZ ++ return 0 + local client_container=psmdb-client-5f578b7f94-7lhbz + local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + kubectl_bin exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''sh.enableSharding("app")\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ mktemp + local LAST_OUT=/tmp/tmp.bFSqueaMu3 ++ mktemp + local LAST_ERR=/tmp/tmp.1aG1xskhv1 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''sh.enableSharding("app")\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.bFSqueaMu3 Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.data-sharded-1390.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb {"t":{"$date":"2024-06-04T15:08:37.538Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} Implicit session: session { "id" : UUID("97d36b55-f951-4f5e-9ab9-8d7d3bd01b2c") } Percona Server for MongoDB server version: v7.0.11-6 WARNING: shell and server versions do not match { "ok" : 1, "$clusterTime" : { "clusterTime" : Timestamp(1717513717, 1), "signature" : { "hash" : BinData(0,"GV5CdPhDeP5rYrHpudBMtuefvMc="), "keyId" : NumberLong("7376662771045236759") } }, "operationTime" : Timestamp(1717513717, 1) } bye + cat /tmp/tmp.1aG1xskhv1 + rm /tmp/tmp.bFSqueaMu3 /tmp/tmp.1aG1xskhv1 + return 0 + sleep 2 + run_mongos 'sh.shardCollection("app.city", { _id: 1 } )' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 mongodb .svc.cluster.local '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + local 'command=sh.shardCollection("app.city", { _id: 1 } )' + local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 + 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.rrcIQlsr7R +++ mktemp ++ local LAST_ERR=/tmp/tmp.X7tlPGoMrj ++ 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.rrcIQlsr7R ++ cat /tmp/tmp.X7tlPGoMrj ++ rm /tmp/tmp.rrcIQlsr7R /tmp/tmp.X7tlPGoMrj ++ return 0 + local client_container=psmdb-client-5f578b7f94-7lhbz + local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + kubectl_bin exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''sh.shardCollection("app.city", { _id: 1 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ mktemp + local LAST_OUT=/tmp/tmp.zKWrRMvTz8 ++ mktemp + local LAST_ERR=/tmp/tmp.vInR6rbY52 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''sh.shardCollection("app.city", { _id: 1 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.zKWrRMvTz8 Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.data-sharded-1390.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb {"t":{"$date":"2024-06-04T15:08:42.729Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} Implicit session: session { "id" : UUID("4a6cd2d7-597f-4ab7-853c-3d561578c5d7") } Percona Server for MongoDB server version: v7.0.11-6 WARNING: shell and server versions do not match { "collectionsharded" : "app.city", "ok" : 1, "$clusterTime" : { "clusterTime" : Timestamp(1717513723, 21), "signature" : { "hash" : BinData(0,"/WtNSV4Tn0KIv7qEkMVbbEgtrSs="), "keyId" : NumberLong("7376662771045236759") } }, "operationTime" : Timestamp(1717513723, 21) } bye + cat /tmp/tmp.vInR6rbY52 + rm /tmp/tmp.zKWrRMvTz8 /tmp/tmp.vInR6rbY52 + return 0 + sleep 120 + desc 'check chunks' + set +o xtrace ----------------------------------------------------------------------------------- check chunks ----------------------------------------------------------------------------------- + chunks_param1=ns + chunks_param2='"app.city"' + [[ 7.0 != \4\.\4 ]] + chunks_param1=uuid ++ run_mongos 'use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid' user:pass@some-name-mongos.data-sharded-1390 '' '' '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ local 'command=use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid' ++ local uri=user:pass@some-name-mongos.data-sharded-1390 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ grep 'switched to db app' -A 1 ++ grep -v 'switched to db app' +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.UkJdi0ftCA ++++ mktemp +++ local LAST_ERR=/tmp/tmp.3TgaRGln3g +++ 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.UkJdi0ftCA +++ cat /tmp/tmp.3TgaRGln3g +++ rm /tmp/tmp.UkJdi0ftCA /tmp/tmp.3TgaRGln3g +++ return 0 ++ local client_container=psmdb-client-5f578b7f94-7lhbz ++ local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ kubectl_bin exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid\n'\'' | mongo mongodb://user:pass@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' +++ mktemp ++ local LAST_OUT=/tmp/tmp.2yKxfjW0rs +++ mktemp ++ local LAST_ERR=/tmp/tmp.9B0x91P7Oh ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid\n'\'' | mongo mongodb://user:pass@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.2yKxfjW0rs ++ cat /tmp/tmp.9B0x91P7Oh ++ rm /tmp/tmp.2yKxfjW0rs /tmp/tmp.9B0x91P7Oh ++ return 0 + chunks_param2='UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b")' + shards=0 + for i in '"rs0"' '"rs1"' '"rs2"' ++ run_mongos 'use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs0"})' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 mongodb .svc.cluster.local '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ local 'command=use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs0"})' ++ local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 ++ 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.OrTOGwPZuX ++++ mktemp ++ grep 'switched to db config' -A 1 +++ local LAST_ERR=/tmp/tmp.Ml4KuGwOI4 +++ local exit_status=0 +++ local timeout=4 ++ grep -v 'switched to db config' ++++ 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.OrTOGwPZuX +++ cat /tmp/tmp.Ml4KuGwOI4 +++ rm /tmp/tmp.OrTOGwPZuX /tmp/tmp.Ml4KuGwOI4 +++ return 0 ++ local client_container=psmdb-client-5f578b7f94-7lhbz ++ local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ kubectl_bin exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs0"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' +++ mktemp ++ local LAST_OUT=/tmp/tmp.nbJFDO3NCS +++ mktemp ++ local LAST_ERR=/tmp/tmp.qzZdo4UJUV ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs0"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.nbJFDO3NCS ++ cat /tmp/tmp.qzZdo4UJUV ++ rm /tmp/tmp.nbJFDO3NCS /tmp/tmp.qzZdo4UJUV ++ return 0 + out=1 + desc 'rs0 has 1 chunks' + set +o xtrace ----------------------------------------------------------------------------------- rs0 has 1 chunks ----------------------------------------------------------------------------------- + [[ 1 -ne 0 ]] + (( shards = shards + 1 )) + for i in '"rs0"' '"rs1"' '"rs2"' ++ run_mongos 'use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs1"})' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 mongodb .svc.cluster.local '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ grep 'switched to db config' -A 1 ++ local 'command=use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs1"})' ++ local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ grep -v 'switched to db config' +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.lC9Lw1d2LZ ++++ mktemp +++ local LAST_ERR=/tmp/tmp.lNegStfExT +++ 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.lC9Lw1d2LZ +++ cat /tmp/tmp.lNegStfExT +++ rm /tmp/tmp.lC9Lw1d2LZ /tmp/tmp.lNegStfExT +++ return 0 ++ local client_container=psmdb-client-5f578b7f94-7lhbz ++ local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ kubectl_bin exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs1"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' +++ mktemp ++ local LAST_OUT=/tmp/tmp.q2LqXFIP3D +++ mktemp ++ local LAST_ERR=/tmp/tmp.Z2UnmhmRJb ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs1"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.q2LqXFIP3D ++ cat /tmp/tmp.Z2UnmhmRJb ++ rm /tmp/tmp.q2LqXFIP3D /tmp/tmp.Z2UnmhmRJb ++ return 0 + out=1 + desc 'rs1 has 1 chunks' + set +o xtrace ----------------------------------------------------------------------------------- rs1 has 1 chunks ----------------------------------------------------------------------------------- + [[ 1 -ne 0 ]] + (( shards = shards + 1 )) + for i in '"rs0"' '"rs1"' '"rs2"' ++ run_mongos 'use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs2"})' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 mongodb .svc.cluster.local '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ local 'command=use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs2"})' ++ local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 ++ 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.gHTFSjAlW2 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.72DF05BHBP +++ 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}' ++ grep 'switched to db config' -A 1 ++ grep -v 'switched to db config' +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.gHTFSjAlW2 +++ cat /tmp/tmp.72DF05BHBP +++ rm /tmp/tmp.gHTFSjAlW2 /tmp/tmp.72DF05BHBP +++ return 0 ++ local client_container=psmdb-client-5f578b7f94-7lhbz ++ local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ kubectl_bin exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs2"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' +++ mktemp ++ local LAST_OUT=/tmp/tmp.93UBxMQfeQ +++ mktemp ++ local LAST_ERR=/tmp/tmp.J7mexQOwVz ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use config\n db.chunks.count({"uuid": UUID("d1e5c2ae-9a97-4b27-bbed-9be686bdcc9b"), "shard": "rs2"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.93UBxMQfeQ ++ cat /tmp/tmp.J7mexQOwVz ++ rm /tmp/tmp.93UBxMQfeQ /tmp/tmp.J7mexQOwVz ++ return 0 + out=1 + desc 'rs2 has 1 chunks' + set +o xtrace ----------------------------------------------------------------------------------- rs2 has 1 chunks ----------------------------------------------------------------------------------- + [[ 1 -ne 0 ]] + (( shards = shards + 1 )) + [[ 3 -lt 3 ]] ++ run_mongos 'use app\n db.dropDatabase()' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 mongodb .svc.cluster.local '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ local 'command=use app\n db.dropDatabase()' ++ local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390 ++ 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.rgP2juzH4t ++++ mktemp +++ local LAST_ERR=/tmp/tmp.jfBN6f2RN8 +++ 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.rgP2juzH4t +++ cat /tmp/tmp.jfBN6f2RN8 +++ rm /tmp/tmp.rgP2juzH4t /tmp/tmp.jfBN6f2RN8 +++ return 0 ++ local client_container=psmdb-client-5f578b7f94-7lhbz ++ local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ kubectl_bin exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use app\n db.dropDatabase()\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' +++ mktemp ++ local LAST_OUT=/tmp/tmp.mWdyNt4Nj9 +++ mktemp ++ local LAST_ERR=/tmp/tmp.T3IzOMa9Kn ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl exec psmdb-client-5f578b7f94-7lhbz -- bash -c 'printf '\''use app\n db.dropDatabase()\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-1390.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.mWdyNt4Nj9 ++ cat /tmp/tmp.T3IzOMa9Kn ++ rm /tmp/tmp.mWdyNt4Nj9 /tmp/tmp.T3IzOMa9Kn ++ return 0 + res='Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.data-sharded-1390.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb {"t":{"$date":"2024-06-04T15:10:58.935Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} Implicit session: session { "id" : UUID("b50df44b-1e9c-4a12-a3db-ca76e209b66a") } Percona Server for MongoDB server version: v7.0.11-6 WARNING: shell and server versions do not match switched to db app { "ok" : 1, "$clusterTime" : { "clusterTime" : Timestamp(1717513859, 60), "signature" : { "hash" : BinData(0,"JPZX86BFPsQI4cfa4rBVciE4BPA="), "keyId" : NumberLong("7376662771045236759") } }, "operationTime" : Timestamp(1717513859, 60) } bye' + echo Percona Server for MongoDB shell version v4.4.29-28 connecting to: 'mongodb://some-name-mongos.data-sharded-1390.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb' '{"t":{"$date":"2024-06-04T15:10:58.935Z"},"s":"I",' '"c":"NETWORK",' '"id":5490002,' '"ctx":"thread1","msg":"Started' a new thread for the timer 'service"}' Implicit session: session '{' '"id"' : 'UUID("b50df44b-1e9c-4a12-a3db-ca76e209b66a")' '}' Percona Server for MongoDB server version: v7.0.11-6 WARNING: shell and server versions do not match switched to db app '{' '"ok"' : 1, '"$clusterTime"' : '{' '"clusterTime"' : 'Timestamp(1717513859,' '60),' '"signature"' : '{' '"hash"' : 'BinData(0,"JPZX86BFPsQI4cfa4rBVciE4BPA="),' '"keyId"' : 'NumberLong("7376662771045236759")' '}' '},' '"operationTime"' : 'Timestamp(1717513859,' '60)' '}' bye + grep -q '"ok" : 1' + desc 'check if rs1 and all its related stateful sets are properly removed' + set +o xtrace ----------------------------------------------------------------------------------- check if rs1 and all its related stateful sets are properly removed ----------------------------------------------------------------------------------- + check_rs_proper_component_deletion some-name rs1 + local cluster=some-name + local rs_name=rs1 ++ kubectl_bin get psmdb some-name -ojson ++ jq --arg RS rs1 '.spec.replsets | map(.name == $RS) | index(true)' +++ mktemp ++ local LAST_OUT=/tmp/tmp.imlYqnHH3m +++ mktemp ++ local LAST_ERR=/tmp/tmp.C75xd2TMDQ ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -ojson ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.imlYqnHH3m ++ cat /tmp/tmp.C75xd2TMDQ ++ rm /tmp/tmp.imlYqnHH3m /tmp/tmp.C75xd2TMDQ ++ return 0 + rs_idx=1 + kubectl_bin patch psmdb some-name --type=json '-p=[{'\''op'\'': '\''remove'\'', '\''path'\'': '\''/spec/replsets/1'\''}]' ++ mktemp + local LAST_OUT=/tmp/tmp.oLiOYD1EBt ++ mktemp + local LAST_ERR=/tmp/tmp.rLJkmTDd2Y + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl patch psmdb some-name --type=json '-p=[{'\''op'\'': '\''remove'\'', '\''path'\'': '\''/spec/replsets/1'\''}]' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.oLiOYD1EBt perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.rLJkmTDd2Y + rm /tmp/tmp.oLiOYD1EBt /tmp/tmp.rLJkmTDd2Y + return 0 + echo -n 'Deleting replset rs1' Deleting replset rs1++ kubectl_bin get sts -l app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs1 -ojson ++ jq '.items | length' +++ mktemp ++ local LAST_OUT=/tmp/tmp.gTksJPHRCO +++ mktemp ++ local LAST_ERR=/tmp/tmp.66fQs1KdpJ ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get sts -l app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs1 -ojson ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.gTksJPHRCO ++ cat /tmp/tmp.66fQs1KdpJ ++ rm /tmp/tmp.gTksJPHRCO /tmp/tmp.66fQs1KdpJ ++ return 0 + [[ 1 -eq 0 ]] + let retry+=1 + '[' 1 -ge 70 ']' + echo -n . .+ sleep 30 ++ kubectl_bin get sts -l app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs1 -ojson ++ jq '.items | length' +++ mktemp ++ local LAST_OUT=/tmp/tmp.QFC3CZ44Ed +++ mktemp ++ local LAST_ERR=/tmp/tmp.RczaGhkATs ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get sts -l app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs1 -ojson ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.QFC3CZ44Ed ++ cat /tmp/tmp.RczaGhkATs ++ rm /tmp/tmp.QFC3CZ44Ed /tmp/tmp.RczaGhkATs ++ return 0 + [[ 0 -eq 0 ]] + echo OK OK + desc 'check if rs2 and all its related stateful sets are properly removed' + set +o xtrace ----------------------------------------------------------------------------------- check if rs2 and all its related stateful sets are properly removed ----------------------------------------------------------------------------------- + check_rs_proper_component_deletion some-name rs2 + local cluster=some-name + local rs_name=rs2 ++ kubectl_bin get psmdb some-name -ojson ++ jq --arg RS rs2 '.spec.replsets | map(.name == $RS) | index(true)' +++ mktemp ++ local LAST_OUT=/tmp/tmp.E9s5SeWpOg +++ mktemp ++ local LAST_ERR=/tmp/tmp.SjvhZiZFzd ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -ojson ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.E9s5SeWpOg ++ cat /tmp/tmp.SjvhZiZFzd ++ rm /tmp/tmp.E9s5SeWpOg /tmp/tmp.SjvhZiZFzd ++ return 0 + rs_idx=1 + kubectl_bin patch psmdb some-name --type=json '-p=[{'\''op'\'': '\''remove'\'', '\''path'\'': '\''/spec/replsets/1'\''}]' ++ mktemp + local LAST_OUT=/tmp/tmp.WewtoWoZnz ++ mktemp + local LAST_ERR=/tmp/tmp.daXbQjdoSw + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl patch psmdb some-name --type=json '-p=[{'\''op'\'': '\''remove'\'', '\''path'\'': '\''/spec/replsets/1'\''}]' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.WewtoWoZnz perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.daXbQjdoSw + rm /tmp/tmp.WewtoWoZnz /tmp/tmp.daXbQjdoSw + return 0 + echo -n 'Deleting replset rs2' Deleting replset rs2++ jq '.items | length' ++ kubectl_bin get sts -l app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs2 -ojson +++ mktemp ++ local LAST_OUT=/tmp/tmp.q2Tr1hYGpc +++ mktemp ++ local LAST_ERR=/tmp/tmp.t8t5toMA0y ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get sts -l app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs2 -ojson ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.q2Tr1hYGpc ++ cat /tmp/tmp.t8t5toMA0y ++ rm /tmp/tmp.q2Tr1hYGpc /tmp/tmp.t8t5toMA0y ++ return 0 + [[ 2 -eq 0 ]] + let retry+=1 + '[' 2 -ge 70 ']' + echo -n . .+ sleep 30 ++ kubectl_bin get sts -l app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs2 -ojson ++ jq '.items | length' +++ mktemp ++ local LAST_OUT=/tmp/tmp.vkQHUv2FTt +++ mktemp ++ local LAST_ERR=/tmp/tmp.qxZhXTrv0Z ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get sts -l app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs2 -ojson ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.vkQHUv2FTt ++ cat /tmp/tmp.qxZhXTrv0Z ++ rm /tmp/tmp.vkQHUv2FTt /tmp/tmp.qxZhXTrv0Z ++ return 0 + [[ 0 -eq 0 ]] + echo OK OK + destroy data-sharded-1390 + local namespace=data-sharded-1390 + 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-1559/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.AIsIQHPxnk ++ mktemp + local LAST_ERR=/tmp/tmp.RArqp8V5iq + 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-1559/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.AIsIQHPxnk 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.RArqp8V5iq + rm /tmp/tmp.AIsIQHPxnk /tmp/tmp.RArqp8V5iq + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1559/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.9BQzJjuBbU ++ mktemp + local LAST_ERR=/tmp/tmp.dwS4Z4imuf + 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.9BQzJjuBbU + cat /tmp/tmp.dwS4Z4imuf + rm /tmp/tmp.9BQzJjuBbU /tmp/tmp.dwS4Z4imuf + 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 + grep -v NAMESPACE + 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.AaHlyVBZkm ++ mktemp + local LAST_ERR=/tmp/tmp.ll9rqgqAFq + 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.AaHlyVBZkm + cat /tmp/tmp.ll9rqgqAFq + rm /tmp/tmp.AaHlyVBZkm /tmp/tmp.ll9rqgqAFq + 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.FCySTG348O ++ mktemp + local LAST_ERR=/tmp/tmp.y10LQdPDQn + 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.FCySTG348O + cat /tmp/tmp.y10LQdPDQn + rm /tmp/tmp.FCySTG348O /tmp/tmp.y10LQdPDQn + 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-1559/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.0v2dGV15Ni ++ mktemp + local LAST_ERR=/tmp/tmp.RIuhZNpqZ3 + 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-1559/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.0v2dGV15Ni 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.RIuhZNpqZ3 + rm /tmp/tmp.0v2dGV15Ni /tmp/tmp.RIuhZNpqZ3 + return 0 + kubectl_bin delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml namespace "cert-manager" deleted customresourcedefinition.apiextensions.k8s.io "certificaterequests.cert-manager.io" deleted customresourcedefinition.apiextensions.k8s.io "certificates.cert-manager.io" deleted customresourcedefinition.apiextensions.k8s.io "challenges.acme.cert-manager.io" deleted customresourcedefinition.apiextensions.k8s.io "clusterissuers.cert-manager.io" deleted customresourcedefinition.apiextensions.k8s.io "issuers.cert-manager.io" deleted customresourcedefinition.apiextensions.k8s.io "orders.acme.cert-manager.io" deleted serviceaccount "cert-manager-cainjector" deleted serviceaccount "cert-manager" deleted serviceaccount "cert-manager-webhook" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-cainjector" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-issuers" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-certificates" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-orders" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-challenges" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-cluster-view" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-view" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-edit" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-cainjector" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-issuers" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-certificates" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-orders" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-challenges" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" deleted role.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" deleted role.rbac.authorization.k8s.io "cert-manager:leaderelection" deleted rolebinding.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" deleted rolebinding.rbac.authorization.k8s.io "cert-manager:leaderelection" deleted mutatingwebhookconfiguration.admissionregistration.k8s.io "cert-manager-webhook" deleted validatingwebhookconfiguration.admissionregistration.k8s.io "cert-manager-webhook" deleted namespace "cert-manager" deleted + : + '[' -n '' ']' + '[' -n psmdb-operator ']' + rm -rf /tmp/tmp.RYLYb32D8E + kubectl_bin delete --grace-period=0 --force=true namespace psmdb-operator + kubectl_bin delete --grace-period=0 --force=true namespace data-sharded-1390 ++ mktemp ++ mktemp + desc 'test passed' + set +o xtrace ----------------------------------------------------------------------------------- test passed ----------------------------------------------------------------------------------- + local LAST_OUT=/tmp/tmp.nA3qeUvZqy + local LAST_OUT=/tmp/tmp.mFfvU0s8BQ ++ mktemp + local LAST_ERR=/tmp/tmp.jBFpNOJgL7 + local exit_status=0 + local timeout=4 ++ seq 0 2 ++ mktemp + local LAST_ERR=/tmp/tmp.FOorTMJlSy + local exit_status=0 + local timeout=4 + for i in '$(seq 0 2)' + set +e + kubectl delete --grace-period=0 --force=true namespace data-sharded-1390 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete --grace-period=0 --force=true namespace psmdb-operator