Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/logs/balancer.log Warning: version difference between client (1.35) and server (1.32) exceeds the supported minor version skew of +/-1 Warning: version difference between client (1.35) and server (1.32) exceeds the supported minor version skew of +/-1 Warning: version difference between client (1.35) and server (1.32) exceeds the supported minor version skew of +/-1 + main + create_infra balancer-17371 + local ns=balancer-17371 + [[ 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-2298/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.YHHkxpl6dm ++ mktemp + local LAST_ERR=/tmp/tmp.6dfv3k4bBO + 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-2298/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.YHHkxpl6dm 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.6dfv3k4bBO + rm /tmp/tmp.YHHkxpl6dm /tmp/tmp.6dfv3k4bBO + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/deploy/crd.yaml ++ grep -v '\-\-\-' grep: warning: stray \ before - grep: warning: stray \ before - + for crd_name in $(yq eval '.metadata.name' "${src_dir}/deploy/crd.yaml" | grep -v '\-\-\-') + kubectl get perconaservermongodbbackups.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' No resources found + kubectl patch perconaservermongodbbackups.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: resource(s) were provided, but no name was specified + : + kubectl_bin wait --for=delete crd perconaservermongodbbackups.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.jU8ju01wNi ++ mktemp + local LAST_ERR=/tmp/tmp.d3mtU9iIU1 + 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.jU8ju01wNi + cat /tmp/tmp.d3mtU9iIU1 + rm /tmp/tmp.jU8ju01wNi /tmp/tmp.d3mtU9iIU1 + 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.JIvpm6FoGs ++ mktemp + local LAST_ERR=/tmp/tmp.GkGH6HwnKr + 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.JIvpm6FoGs + cat /tmp/tmp.GkGH6HwnKr + rm /tmp/tmp.JIvpm6FoGs /tmp/tmp.GkGH6HwnKr + 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.i21WqdWGcm ++ mktemp + local LAST_ERR=/tmp/tmp.W2RkbbRlMb + 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.i21WqdWGcm + cat /tmp/tmp.W2RkbbRlMb + rm /tmp/tmp.i21WqdWGcm /tmp/tmp.W2RkbbRlMb + 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-2298/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.NSgSn2KtkP ++ mktemp + local LAST_ERR=/tmp/tmp.M7xZY9oAZh + 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-2298/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.NSgSn2KtkP 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.M7xZY9oAZh + rm /tmp/tmp.NSgSn2KtkP /tmp/tmp.M7xZY9oAZh + return 0 + check_crd_for_deletion PR-2298-b17522b7 + local git_tag=PR-2298-b17522b7 ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-2298-b17522b7/deploy/crd.yaml ++ yq eval .metadata.name ++ /usr/sbin/sed ':a;N;$!ba;s/\n/ /g' ++ /usr/sbin/sed s/---//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.AT7INC4PD1 +++ mktemp ++ local LAST_ERR=/tmp/tmp.2G1ezlpxUX ++ 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.AT7INC4PD1 ++ cat /tmp/tmp.2G1ezlpxUX 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.AT7INC4PD1 ++ cat /tmp/tmp.2G1ezlpxUX 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.AT7INC4PD1 ++ cat /tmp/tmp.2G1ezlpxUX Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 8 ++ cat /tmp/tmp.AT7INC4PD1 ++ cat /tmp/tmp.2G1ezlpxUX Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.AT7INC4PD1 /tmp/tmp.2G1ezlpxUX ++ return 1 + [[ '' == Terminating ]] + '[' -n psmdb-operator ']' + create_namespace psmdb-operator + local namespace=psmdb-operator + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + 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 ++ 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 ----------------------------------------------------------------------------------- + kubectl_bin get ns + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + awk '{print$1}' ++ mktemp + '[' -n '' ']' + desc 'cleaned up old namespaces psmdb-operator' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces psmdb-operator+ xargs kubectl delete ns ----------------------------------------------------------------------------------- + kubectl_bin delete namespace psmdb-operator --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.JYiCHWppSK ++ mktemp + local LAST_OUT=/tmp/tmp.vVFP19kPzj ++ mktemp + local LAST_ERR=/tmp/tmp.OevOLu1Rte + local exit_status=0 + local timeout=4 ++ seq 0 2 + local LAST_ERR=/tmp/tmp.y9QofwW7hM + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + for i in $(seq 0 2) + kubectl get ns + set +e + kubectl delete namespace psmdb-operator --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.JYiCHWppSK + cat /tmp/tmp.OevOLu1Rte + rm /tmp/tmp.JYiCHWppSK /tmp/tmp.OevOLu1Rte + return 0 namespace "balancer-30983" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.vVFP19kPzj namespace "psmdb-operator" deleted + cat /tmp/tmp.y9QofwW7hM + rm /tmp/tmp.vVFP19kPzj /tmp/tmp.y9QofwW7hM + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.6CJKuIequw ++ mktemp + local LAST_ERR=/tmp/tmp.glN24ocUu1 + 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.6CJKuIequw + cat /tmp/tmp.glN24ocUu1 + rm /tmp/tmp.6CJKuIequw /tmp/tmp.glN24ocUu1 + 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.1uhY3dnQRs ++ mktemp + local LAST_ERR=/tmp/tmp.BtGswFvcy8 + 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.1uhY3dnQRs namespace/psmdb-operator created + cat /tmp/tmp.BtGswFvcy8 + rm /tmp/tmp.1uhY3dnQRs /tmp/tmp.BtGswFvcy8 + return 0 + set_kube_ctx psmdb-operator + local namespace=psmdb-operator ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.mI0NHBPD1X +++ mktemp ++ local LAST_ERR=/tmp/tmp.eNMSPnMbnB ++ 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.mI0NHBPD1X ++ cat /tmp/tmp.eNMSPnMbnB ++ rm /tmp/tmp.mI0NHBPD1X /tmp/tmp.eNMSPnMbnB ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2298-b17522b7-1-cluster2 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.4e5xBwq9GQ ++ mktemp + local LAST_ERR=/tmp/tmp.JXj0w3aLZN + 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-2298-b17522b7-1-cluster2 --namespace=psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.4e5xBwq9GQ Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2298-b17522b7-1-cluster2" modified. + cat /tmp/tmp.JXj0w3aLZN + rm /tmp/tmp.4e5xBwq9GQ /tmp/tmp.JXj0w3aLZN + return 0 + deploy_operator + desc 'start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2298-b17522b7' + set +o xtrace ----------------------------------------------------------------------------------- start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2298-b17522b7 ----------------------------------------------------------------------------------- + local cr_file + '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/balancer/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.CoqjLdzuMN ++ mktemp + local LAST_ERR=/tmp/tmp.ZrqBZsGXvR + 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-2298/deploy/crd.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.CoqjLdzuMN 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.ZrqBZsGXvR + rm /tmp/tmp.CoqjLdzuMN /tmp/tmp.ZrqBZsGXvR + 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-2298/deploy/cw-rbac.yaml + sed -e 's^namespace: .*^namespace: psmdb-operator^' + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.xKFU2gH55z ++ mktemp + local LAST_ERR=/tmp/tmp.SQElC8zVHD + 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.xKFU2gH55z 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.SQElC8zVHD + rm /tmp/tmp.xKFU2gH55z /tmp/tmp.SQElC8zVHD + return 0 + yq eval $'\n\t\t\t(.spec.template.spec.containers[].image = "docker.io/perconalab/percona-server-mongodb-operator:PR-2298-b17522b7") |\n\t\t\t((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") |\n\t\t\t((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/deploy/cw-operator.yaml + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.u2TRvZzfwp ++ mktemp + local LAST_ERR=/tmp/tmp.hHsHRXeBWw + 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.u2TRvZzfwp deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.hHsHRXeBWw + rm /tmp/tmp.u2TRvZzfwp /tmp/tmp.hHsHRXeBWw + return 0 + sleep 20 ++ 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.698AqxE1lO +++ mktemp ++ local LAST_ERR=/tmp/tmp.yIF6YZIGMy ++ 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.698AqxE1lO ++ cat /tmp/tmp.yIF6YZIGMy ++ rm /tmp/tmp.698AqxE1lO /tmp/tmp.yIF6YZIGMy ++ return 0 + wait_operator_pod percona-server-mongodb-operator-794f6c48b-6smm8 + local pod=percona-server-mongodb-operator-794f6c48b-6smm8 + set +o xtrace waiting for pod/percona-server-mongodb-operator-794f6c48b-6smm8 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.AWNHJ5q6Fl +++ mktemp ++ local LAST_ERR=/tmp/tmp.gS3YUfbxfT ++ 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.AWNHJ5q6Fl ++ cat /tmp/tmp.gS3YUfbxfT ++ rm /tmp/tmp.AWNHJ5q6Fl /tmp/tmp.gS3YUfbxfT ++ return 0 + kubectl_bin logs -n psmdb-operator percona-server-mongodb-operator-794f6c48b-6smm8 ++ mktemp + local LAST_OUT=/tmp/tmp.XkNOeXzTgW ++ mktemp + local LAST_ERR=/tmp/tmp.LWndhILWSB + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl logs -n psmdb-operator percona-server-mongodb-operator-794f6c48b-6smm8 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.XkNOeXzTgW + cat /tmp/tmp.LWndhILWSB + rm /tmp/tmp.XkNOeXzTgW /tmp/tmp.LWndhILWSB + return 0 2026-04-01T01:48:13.130Z INFO setup Manager starting up {"gitCommit": "b17522b7a9268954882f284fd5c502fbe0759d07", "gitBranch": "PR-2298-b17522b7", "buildTime": "", "goVersion": "go1.25.8", "os": "linux", "arch": "amd64"} + create_namespace balancer-17371 + local namespace=balancer-17371 + 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 ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ awk '{print $1}' ++ grep validate-auth + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' ++ 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 ++ 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 ----------------------------------------------------------------------------------- + kubectl_bin get ns + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + awk '{print$1}' + '[' -n '' ']' + desc 'cleaned up old namespaces balancer-17371' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces balancer-17371 ----------------------------------------------------------------------------------- ++ mktemp + kubectl_bin delete namespace balancer-17371 --ignore-not-found + xargs kubectl delete ns ++ mktemp + local LAST_OUT=/tmp/tmp.FS0v12dLdK ++ mktemp + local LAST_OUT=/tmp/tmp.weEvrPuKED + local LAST_ERR=/tmp/tmp.W4zZ4jspuv + local exit_status=0 + local timeout=4 ++ seq 0 2 ++ mktemp + for i in $(seq 0 2) + set +e + kubectl delete namespace balancer-17371 --ignore-not-found + local LAST_ERR=/tmp/tmp.Q55qqi76Xi + 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.weEvrPuKED + cat /tmp/tmp.Q55qqi76Xi + rm /tmp/tmp.weEvrPuKED /tmp/tmp.Q55qqi76Xi + 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.FS0v12dLdK + cat /tmp/tmp.W4zZ4jspuv + rm /tmp/tmp.FS0v12dLdK /tmp/tmp.W4zZ4jspuv + return 0 + kubectl_bin wait --for=delete namespace balancer-17371 ++ mktemp + local LAST_OUT=/tmp/tmp.n3lsFkCBQg ++ mktemp + local LAST_ERR=/tmp/tmp.NmvwKjv787 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl wait --for=delete namespace balancer-17371 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.n3lsFkCBQg + cat /tmp/tmp.NmvwKjv787 + rm /tmp/tmp.n3lsFkCBQg /tmp/tmp.NmvwKjv787 + return 0 + desc 'create namespace balancer-17371' + set +o xtrace ----------------------------------------------------------------------------------- create namespace balancer-17371 ----------------------------------------------------------------------------------- + kubectl_bin create namespace balancer-17371 ++ mktemp + local LAST_OUT=/tmp/tmp.FvtaYfLXdm ++ mktemp + local LAST_ERR=/tmp/tmp.jAFGfuSqam + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl create namespace balancer-17371 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.FvtaYfLXdm namespace/balancer-17371 created + cat /tmp/tmp.jAFGfuSqam + rm /tmp/tmp.FvtaYfLXdm /tmp/tmp.jAFGfuSqam + return 0 + set_kube_ctx balancer-17371 + local namespace=balancer-17371 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.Zw9hn5Kqjs +++ mktemp ++ local LAST_ERR=/tmp/tmp.jsr9w3Mlyy ++ 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.Zw9hn5Kqjs ++ cat /tmp/tmp.jsr9w3Mlyy ++ rm /tmp/tmp.Zw9hn5Kqjs /tmp/tmp.jsr9w3Mlyy ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2298-b17522b7-1-cluster2 --namespace=balancer-17371 ++ mktemp + local LAST_OUT=/tmp/tmp.vDGDIzLnbt ++ mktemp + local LAST_ERR=/tmp/tmp.YKL2tdIehM + 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-2298-b17522b7-1-cluster2 --namespace=balancer-17371 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.vDGDIzLnbt Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2298-b17522b7-1-cluster2" modified. + cat /tmp/tmp.YKL2tdIehM + rm /tmp/tmp.vDGDIzLnbt /tmp/tmp.YKL2tdIehM + return 0 + deploy_minio + local cert_secret= + local service_name=minio-service + desc 'install MinIO: minio-service' + set +o xtrace ----------------------------------------------------------------------------------- install MinIO: minio-service ----------------------------------------------------------------------------------- + helm uninstall minio-service + : + helm repo remove minio "minio" has been removed from your repositories + helm repo add minio https://charts.min.io/ "minio" has been added to your repositories + local endpoint=http://minio-service:9000 + minio_args=('--version' '5.4.0' '--set' 'replicas=1' '--set' 'mode=standalone' '--set' 'resources.requests.memory=256Mi' '--set' 'rootUser=rootuser' '--set' 'rootPassword=rootpass123' '--set' 'users[0].accessKey=some-access-key' '--set' 'users[0].secretKey=some-secret-key' '--set' 'users[0].policy=consoleAdmin' '--set' 'service.type=ClusterIP' '--set' 'configPathmc=/tmp/' '--set' 'securityContext.enabled=false' '--set' 'persistence.size=2G' '--set' 'fullnameOverride=minio-service' '--set' 'serviceAccount.create=true' '--set' 'serviceAccount.name=minio-service-sa') + local minio_args + [[ -n '' ]] + retry 10 60 helm install minio-service --version 5.4.0 --set replicas=1 --set mode=standalone --set resources.requests.memory=256Mi --set rootUser=rootuser --set rootPassword=rootpass123 --set 'users[0].accessKey=some-access-key' --set 'users[0].secretKey=some-secret-key' --set 'users[0].policy=consoleAdmin' --set service.type=ClusterIP --set configPathmc=/tmp/ --set securityContext.enabled=false --set persistence.size=2G --set fullnameOverride=minio-service --set serviceAccount.create=true --set serviceAccount.name=minio-service-sa minio/minio + local max=10 + local delay=60 + shift 2 + local n=1 + helm install minio-service --version 5.4.0 --set replicas=1 --set mode=standalone --set resources.requests.memory=256Mi --set rootUser=rootuser --set rootPassword=rootpass123 --set 'users[0].accessKey=some-access-key' --set 'users[0].secretKey=some-secret-key' --set 'users[0].policy=consoleAdmin' --set service.type=ClusterIP --set configPathmc=/tmp/ --set securityContext.enabled=false --set persistence.size=2G --set fullnameOverride=minio-service --set serviceAccount.create=true --set serviceAccount.name=minio-service-sa minio/minio NAME: minio-service LAST DEPLOYED: Wed Apr 1 01:48:51 2026 NAMESPACE: balancer-17371 STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: MinIO can be accessed via port 9000 on the following DNS name from within your cluster: minio-service.balancer-17371.cluster.local To access MinIO from localhost, run the below commands: 1. export POD_NAME=$(kubectl get pods --namespace balancer-17371 -l "release=minio-service" -o jsonpath="{.items[0].metadata.name}") 2. kubectl port-forward $POD_NAME 9000 --namespace balancer-17371 Read more about port forwarding here: http://kubernetes.io/docs/user-guide/kubectl/kubectl_port-forward/ You can now access MinIO server on http://localhost:9000. Follow the below steps to connect to MinIO server with mc client: 1. Download the MinIO mc client - https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart 2. export MC_HOST_minio-service-local=http://$(kubectl get secret --namespace balancer-17371 minio-service -o jsonpath="{.data.rootUser}" | base64 --decode):$(kubectl get secret --namespace balancer-17371 minio-service -o jsonpath="{.data.rootPassword}" | base64 --decode)@localhost:9000 3. mc ls minio-service-local ++ kubectl_bin get pods --selector=release=minio-service -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.rwZhoYYYpo +++ mktemp ++ local LAST_ERR=/tmp/tmp.Vtwe0B9uEC ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get pods --selector=release=minio-service -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.rwZhoYYYpo ++ cat /tmp/tmp.Vtwe0B9uEC ++ rm /tmp/tmp.rwZhoYYYpo /tmp/tmp.Vtwe0B9uEC ++ return 0 + local MINIO_POD=minio-service-6d5f646cdc-rfd2w + wait_pod minio-service-6d5f646cdc-rfd2w + local pod=minio-service-6d5f646cdc-rfd2w + set +o xtrace waiting for pod/minio-service-6d5f646cdc-rfd2w to be ready.OK + '[' -n psmdb-operator ']' + kubectl_bin create svc -n psmdb-operator externalname minio-service --external-name=minio-service.balancer-17371.svc.cluster.local --tcp=9000 service/minio-service created + create_minio_bucket operator-testing http://minio-service:9000 + local bucket=operator-testing + local endpoint=http://minio-service:9000 + kubectl_bin run -i --rm aws-cli --image=docker.io/perconalab/awscli --restart=Never -- bash -c $'AWS_ACCESS_KEY_ID=some-access-key \t\tAWS_SECRET_ACCESS_KEY=some-secret-key \t\tAWS_DEFAULT_REGION=us-east-1 /usr/bin/aws --no-verify-ssl --endpoint-url http://minio-service:9000 s3 mb s3://operator-testing' ++ mktemp + local LAST_OUT=/tmp/tmp.rrcOKtXgvb ++ mktemp + local LAST_ERR=/tmp/tmp.2VciVm1qCZ + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl run -i --rm aws-cli --image=docker.io/perconalab/awscli --restart=Never -- bash -c $'AWS_ACCESS_KEY_ID=some-access-key \t\tAWS_SECRET_ACCESS_KEY=some-secret-key \t\tAWS_DEFAULT_REGION=us-east-1 /usr/bin/aws --no-verify-ssl --endpoint-url http://minio-service:9000 s3 mb s3://operator-testing' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.rrcOKtXgvb make_bucket: operator-testing pod "aws-cli" deleted from balancer-17371 namespace + cat /tmp/tmp.2VciVm1qCZ All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt. If you don't see a command prompt, try pressing enter. warning: couldn't attach to pod/aws-cli, falling back to streaming logs: Internal error occurred: unable to upgrade connection: container aws-cli not found in pod aws-cli_balancer-17371 + rm /tmp/tmp.rrcOKtXgvb /tmp/tmp.2VciVm1qCZ + return 0 + apply_s3_storage_secrets + desc 'create secrets for cloud storages' + set +o xtrace ----------------------------------------------------------------------------------- create secrets for cloud storages ----------------------------------------------------------------------------------- + '[' -z '' ']' + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/conf/minio-secret.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/conf/cloud-secret.yml ++ mktemp + local LAST_OUT=/tmp/tmp.juwl4jQipV ++ mktemp + local LAST_ERR=/tmp/tmp.Yz7hXrVSFR + 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-2298/e2e-tests/conf/minio-secret.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/conf/cloud-secret.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.juwl4jQipV secret/minio-secret created secret/aws-s3-secret created secret/gcp-cs-secret created secret/azure-secret created secret/gcp-cs-sa-key-secret created + cat /tmp/tmp.Yz7hXrVSFR + rm /tmp/tmp.juwl4jQipV /tmp/tmp.Yz7hXrVSFR + return 0 + log 'create PSMDB cluster' + set +o xtrace [2026-04-01T01:49:29+0000] create PSMDB cluster + cluster=some-name + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/conf/client-70.yml ++ mktemp + local LAST_OUT=/tmp/tmp.uXvx8XwQn8 ++ mktemp + local LAST_ERR=/tmp/tmp.F2hiLTssSY + 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-2298/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/conf/client-70.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.uXvx8XwQn8 secret/some-users created deployment.apps/psmdb-client created + cat /tmp/tmp.F2hiLTssSY + rm /tmp/tmp.uXvx8XwQn8 /tmp/tmp.F2hiLTssSY + return 0 + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/balancer/conf/some-name-rs0.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/balancer/conf/some-name-rs0.yml + kubectl_bin apply -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/balancer/conf/some-name-rs0.yml + yq eval '(.spec | select(.image == null)).image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0"' ++ mktemp + yq eval '(.spec | select(has("pmm"))).pmm.image = "docker.io/percona/pmm-client:2.44.1-1"' + yq eval '(.spec | select(has("initImage"))).initImage = "docker.io/perconalab/percona-server-mongodb-operator:PR-2298-b17522b7"' + yq eval '(.spec | select(has("backup"))).backup.image = "docker.io/perconalab/percona-server-mongodb-operator:main-backup"' + /usr/sbin/sed -e s/NAME_SPACE/balancer-17371/g + yq eval '.spec.upgradeOptions.apply="Never"' + local LAST_OUT=/tmp/tmp.hsVX4YQc07 ++ mktemp + local LAST_ERR=/tmp/tmp.5u4Et5CiZq + 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.hsVX4YQc07 perconaservermongodb.psmdb.percona.com/some-name created + cat /tmp/tmp.5u4Et5CiZq + rm /tmp/tmp.hsVX4YQc07 /tmp/tmp.5u4Et5CiZq + return 0 + log 'check if cfg pods started' + set +o xtrace [2026-04-01T01:49:34+0000] check if cfg pods started + wait_for_running some-name-cfg 3 false + local name=some-name-cfg + let last_pod=2 + local check_cluster_readyness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-cfg-0 + local pod=some-name-cfg-0 + set +o xtrace waiting for pod/some-name-cfg-0 to be ready.....OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-cfg-1 + local pod=some-name-cfg-1 + set +o xtrace waiting for pod/some-name-cfg-1 to be ready......OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Bc7OZcRVnl +++ mktemp ++ local LAST_ERR=/tmp/tmp.YWZ0fkTmvt ++ 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.Bc7OZcRVnl ++ cat /tmp/tmp.YWZ0fkTmvt ++ rm /tmp/tmp.Bc7OZcRVnl /tmp/tmp.YWZ0fkTmvt ++ return 0 + [[ '' == true ]] + 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")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.jf5ut45Xdv +++ mktemp ++ local LAST_ERR=/tmp/tmp.8sjNWqDtgC ++ 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")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.jf5ut45Xdv ++ cat /tmp/tmp.8sjNWqDtgC ++ rm /tmp/tmp.jf5ut45Xdv /tmp/tmp.8sjNWqDtgC ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.dZglFYqMON +++ mktemp ++ local LAST_ERR=/tmp/tmp.LfnFfr3HYh ++ 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")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.dZglFYqMON ++ cat /tmp/tmp.LfnFfr3HYh ++ rm /tmp/tmp.dZglFYqMON /tmp/tmp.LfnFfr3HYh ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + log 'check if all shards started' + set +o xtrace [2026-04-01T01:50:54+0000] check if all shards started + wait_for_running some-name-rs0 3 false + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=false + 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.FJ5zOnom8S +++ mktemp ++ local LAST_ERR=/tmp/tmp.4CCCoOQJSG ++ 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.FJ5zOnom8S ++ cat /tmp/tmp.4CCCoOQJSG ++ rm /tmp/tmp.FJ5zOnom8S /tmp/tmp.4CCCoOQJSG ++ return 0 + [[ '' == true ]] + 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")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.WUeKZHMogd +++ mktemp ++ local LAST_ERR=/tmp/tmp.9nv2quwPjS ++ 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")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.WUeKZHMogd ++ cat /tmp/tmp.9nv2quwPjS ++ rm /tmp/tmp.WUeKZHMogd /tmp/tmp.9nv2quwPjS ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.9BB6m4XgKi +++ mktemp ++ local LAST_ERR=/tmp/tmp.OV1hrfIHZq ++ 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.9BB6m4XgKi ++ cat /tmp/tmp.OV1hrfIHZq ++ rm /tmp/tmp.9BB6m4XgKi /tmp/tmp.OV1hrfIHZq ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + wait_for_running some-name-rs1 3 false + local name=some-name-rs1 + let last_pod=2 + local check_cluster_readyness=false + 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.jjLnhWooac +++ mktemp ++ local LAST_ERR=/tmp/tmp.M9Yd8B2Qq9 ++ 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.jjLnhWooac ++ cat /tmp/tmp.M9Yd8B2Qq9 ++ rm /tmp/tmp.jjLnhWooac /tmp/tmp.M9Yd8B2Qq9 ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs1-2 + local pod=some-name-rs1-2 + set +o xtrace waiting for pod/some-name-rs1-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Foe5JfZt8M +++ mktemp ++ local LAST_ERR=/tmp/tmp.k2arPKYf9D ++ 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")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.Foe5JfZt8M ++ cat /tmp/tmp.k2arPKYf9D ++ rm /tmp/tmp.Foe5JfZt8M /tmp/tmp.k2arPKYf9D ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.z7qBCwiulr +++ mktemp ++ local LAST_ERR=/tmp/tmp.g6RWqCEBft ++ 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")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.z7qBCwiulr ++ cat /tmp/tmp.g6RWqCEBft ++ rm /tmp/tmp.z7qBCwiulr /tmp/tmp.g6RWqCEBft ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + wait_for_running some-name-rs2 3 false + local name=some-name-rs2 + let last_pod=2 + local check_cluster_readyness=false + 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.51tPvh0pxO +++ mktemp ++ local LAST_ERR=/tmp/tmp.jtMJhFE7h1 ++ 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.51tPvh0pxO ++ cat /tmp/tmp.jtMJhFE7h1 ++ rm /tmp/tmp.51tPvh0pxO /tmp/tmp.jtMJhFE7h1 ++ return 0 + [[ '' == true ]] + 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")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.wTPe7wulaF +++ mktemp ++ local LAST_ERR=/tmp/tmp.aOhJXya0va ++ 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")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.wTPe7wulaF ++ cat /tmp/tmp.aOhJXya0va ++ rm /tmp/tmp.wTPe7wulaF /tmp/tmp.aOhJXya0va ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs2")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.37EPcXiCQe +++ mktemp ++ local LAST_ERR=/tmp/tmp.EL8281ZUey ++ 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")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.37EPcXiCQe ++ cat /tmp/tmp.EL8281ZUey ++ rm /tmp/tmp.37EPcXiCQe /tmp/tmp.EL8281ZUey ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + log 'check if mongos pods started' + set +o xtrace [2026-04-01T01:51:42+0000] check if mongos pods started + 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.q0uYC45Fw3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.MFd9kbWzXF ++ 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.q0uYC45Fw3 ++ cat /tmp/tmp.MFd9kbWzXF ++ rm /tmp/tmp.q0uYC45Fw3 /tmp/tmp.MFd9kbWzXF ++ return 0 + [[ '' == true ]] + 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")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.VtYkC8A1T1 +++ mktemp ++ local LAST_ERR=/tmp/tmp.mG5eUCJBay ++ 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")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.VtYkC8A1T1 ++ cat /tmp/tmp.mG5eUCJBay ++ rm /tmp/tmp.VtYkC8A1T1 /tmp/tmp.mG5eUCJBay ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.OSFizkJdtN +++ mktemp ++ local LAST_ERR=/tmp/tmp.0o1RSJ6Gts ++ 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")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.OSFizkJdtN ++ cat /tmp/tmp.0o1RSJ6Gts ++ rm /tmp/tmp.OSFizkJdtN /tmp/tmp.0o1RSJ6Gts ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness........... + check_balancer some-name true 10 + local cluster=some-name + local expected=true + local delay=10 + local balancer_running + log 'sleeping for 10 seconds...' + set +o xtrace [2026-04-01T01:53:03+0000] sleeping for 10 seconds... + sleep 10 ++ run_mongosh 'sh.getBalancerState()' clusterAdmin:clusterAdmin123456@some-name-cfg.balancer-17371 ++ local 'command=sh.getBalancerState()' ++ grep -E -v 'Warning|cfg' ++ local uri=clusterAdmin:clusterAdmin123456@some-name-cfg.balancer-17371 ++ local driver=mongodb+srv ++ local suffix=.svc.cluster.local ++ local mongo_flag= ++ grep -E 'true|false' +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.l685kzNY1S ++++ mktemp +++ local LAST_ERR=/tmp/tmp.dh0eJk5hQD +++ 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.l685kzNY1S +++ cat /tmp/tmp.dh0eJk5hQD +++ rm /tmp/tmp.l685kzNY1S /tmp/tmp.dh0eJk5hQD +++ return 0 ++ local client_container=psmdb-client-f6f8c745d-lx9j4 ++ [[ clusterAdmin:clusterAdmin123456@some-name-cfg.balancer-17371 == *cfg* ]] ++ replica_set=cfg ++ kubectl_bin exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'printf '\''sh.getBalancerState()\n'\'' | mongosh --quiet mongodb+srv://clusterAdmin:clusterAdmin123456@some-name-cfg.balancer-17371.svc.cluster.local/admin?ssl=false\&replicaSet=cfg ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.eC3keGq2zU +++ mktemp ++ local LAST_ERR=/tmp/tmp.PG9mBcIS0o ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'printf '\''sh.getBalancerState()\n'\'' | mongosh --quiet mongodb+srv://clusterAdmin:clusterAdmin123456@some-name-cfg.balancer-17371.svc.cluster.local/admin?ssl=false\&replicaSet=cfg ' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.eC3keGq2zU ++ cat /tmp/tmp.PG9mBcIS0o ++ rm /tmp/tmp.eC3keGq2zU /tmp/tmp.PG9mBcIS0o ++ return 0 + balancer_running=true + echo -n 'checking if balancer status is true...' checking if balancer status is true...+ [[ true != true ]] + echo OK OK + write_data some-name + local cluster=some-name + log 'create user' + set +o xtrace [2026-04-01T01:53:16+0000] create user + run_mongos 'db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})' userAdmin:userAdmin123456@some-name-mongos.balancer-17371 mongodb .svc.cluster.local --quiet 27017 mongosh + local 'command=db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})' + local uri=userAdmin:userAdmin123456@some-name-mongos.balancer-17371 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag=--quiet + local port=27017 + local mongo_bin=mongosh ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.lh0lfXv3zf +++ mktemp ++ local LAST_ERR=/tmp/tmp.MUuasGmOiO ++ 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.lh0lfXv3zf ++ cat /tmp/tmp.MUuasGmOiO ++ rm /tmp/tmp.lh0lfXv3zf /tmp/tmp.MUuasGmOiO ++ return 0 + local client_container=psmdb-client-f6f8c745d-lx9j4 + kubectl_bin exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'printf '\''db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n'\'' | mongosh mongodb://userAdmin:userAdmin123456@some-name-mongos.balancer-17371.svc.cluster.local:27017/admin --quiet' ++ mktemp + local LAST_OUT=/tmp/tmp.58FvoVsbyX ++ mktemp + local LAST_ERR=/tmp/tmp.743l3jwnNy + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'printf '\''db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n'\'' | mongosh mongodb://userAdmin:userAdmin123456@some-name-mongos.balancer-17371.svc.cluster.local:27017/admin --quiet' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.58FvoVsbyX [direct: mongos] admin> { ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1775008399, i: 4 }), signature: { hash: Binary.createFromBase64('uzXz7DtXfvpMYt6LcWboZjy9p+Y=', 0), keyId: Long('7623602353815420952') } }, operationTime: Timestamp({ t: 1775008399, i: 3 }) } [direct: mongos] admin> + cat /tmp/tmp.743l3jwnNy + rm /tmp/tmp.58FvoVsbyX /tmp/tmp.743l3jwnNy + return 0 + sleep 2 + log 'enable sharding' + set +o xtrace [2026-04-01T01:53:22+0000] enable sharding + run_mongos 'sh.enableSharding("app")' clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17371 mongodb .svc.cluster.local --quiet 27017 mongosh + local 'command=sh.enableSharding("app")' + local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17371 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag=--quiet + local port=27017 + local mongo_bin=mongosh ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.NTXuXlDldn +++ mktemp ++ local LAST_ERR=/tmp/tmp.HGs4xaHwvd ++ 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.NTXuXlDldn ++ cat /tmp/tmp.HGs4xaHwvd ++ rm /tmp/tmp.NTXuXlDldn /tmp/tmp.HGs4xaHwvd ++ return 0 + local client_container=psmdb-client-f6f8c745d-lx9j4 + kubectl_bin exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'printf '\''sh.enableSharding("app")\n'\'' | mongosh mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17371.svc.cluster.local:27017/admin --quiet' ++ mktemp + local LAST_OUT=/tmp/tmp.zwMfMm9Xph ++ mktemp + local LAST_ERR=/tmp/tmp.ATew3SDnAn + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'printf '\''sh.enableSharding("app")\n'\'' | mongosh mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17371.svc.cluster.local:27017/admin --quiet' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.zwMfMm9Xph [direct: mongos] admin> { ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1775008404, i: 10 }), signature: { hash: Binary.createFromBase64('lbBtYbIOKvDgDZDJCvu3dzAjZ/g=', 0), keyId: Long('7623602353815420952') } }, operationTime: Timestamp({ t: 1775008404, i: 7 }) } [direct: mongos] admin> + cat /tmp/tmp.ATew3SDnAn + rm /tmp/tmp.zwMfMm9Xph /tmp/tmp.ATew3SDnAn + return 0 + sleep 2 + log 'shard collection' + set +o xtrace [2026-04-01T01:53:27+0000] shard collection + run_mongos 'sh.shardCollection("app.city", { _id: 1 } )' clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17371 mongodb .svc.cluster.local --quiet 27017 mongosh + local 'command=sh.shardCollection("app.city", { _id: 1 } )' + local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17371 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag=--quiet + local port=27017 + local mongo_bin=mongosh ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.24los2C3hY +++ mktemp ++ local LAST_ERR=/tmp/tmp.vHg0ISlnDz ++ 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.24los2C3hY ++ cat /tmp/tmp.vHg0ISlnDz ++ rm /tmp/tmp.24los2C3hY /tmp/tmp.vHg0ISlnDz ++ return 0 + local client_container=psmdb-client-f6f8c745d-lx9j4 + kubectl_bin exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'printf '\''sh.shardCollection("app.city", { _id: 1 } )\n'\'' | mongosh mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17371.svc.cluster.local:27017/admin --quiet' ++ mktemp + local LAST_OUT=/tmp/tmp.PYquRFtjrV ++ mktemp + local LAST_ERR=/tmp/tmp.XWgz78AQgU + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'printf '\''sh.shardCollection("app.city", { _id: 1 } )\n'\'' | mongosh mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.balancer-17371.svc.cluster.local:27017/admin --quiet' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.PYquRFtjrV [direct: mongos] admin> { collectionsharded: 'app.city', ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1775008410, i: 40 }), signature: { hash: Binary.createFromBase64('cDqXlvjcby+aK6ituI7MmatKses=', 0), keyId: Long('7623602353815420952') } }, operationTime: Timestamp({ t: 1775008410, i: 39 }) } [direct: mongos] admin> + cat /tmp/tmp.XWgz78AQgU + rm /tmp/tmp.PYquRFtjrV /tmp/tmp.XWgz78AQgU + return 0 + log 'write data (this can take some time, be patient)' + set +o xtrace [2026-04-01T01:53:30+0000] write data (this can take some time, be patient) + run_script_mongos /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/balancer/data.js user:pass@some-name-mongos.balancer-17371 mongodb .svc.cluster.local --quiet mongosh + local script=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/balancer/data.js + local uri=user:pass@some-name-mongos.balancer-17371 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag=--quiet + local mongo_bin=mongosh ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.ieZhJ8V6cr +++ mktemp ++ local LAST_ERR=/tmp/tmp.eDIj8YmguH ++ 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.ieZhJ8V6cr ++ cat /tmp/tmp.eDIj8YmguH ++ rm /tmp/tmp.ieZhJ8V6cr /tmp/tmp.eDIj8YmguH ++ return 0 + local client_container=psmdb-client-f6f8c745d-lx9j4 ++ basename /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/balancer/data.js + name=data.js + kubectl_bin cp /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2298/e2e-tests/balancer/data.js balancer-17371/psmdb-client-f6f8c745d-lx9j4:/tmp ++ mktemp + local LAST_OUT=/tmp/tmp.pmp8VOh4JZ ++ mktemp + local LAST_ERR=/tmp/tmp.m3hqtoJCmH + 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-2298/e2e-tests/balancer/data.js balancer-17371/psmdb-client-f6f8c745d-lx9j4:/tmp + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.pmp8VOh4JZ + cat /tmp/tmp.m3hqtoJCmH + rm /tmp/tmp.pmp8VOh4JZ /tmp/tmp.m3hqtoJCmH + return 0 + kubectl_bin exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'mongosh mongodb://user:pass@some-name-mongos.balancer-17371.svc.cluster.local/admin --quiet /tmp/data.js' ++ mktemp + local LAST_OUT=/tmp/tmp.QDGNbN3y83 ++ mktemp + local LAST_ERR=/tmp/tmp.OkkiTwbh6v + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'mongosh mongodb://user:pass@some-name-mongos.balancer-17371.svc.cluster.local/admin --quiet /tmp/data.js' + exit_status=137 + set -e + '[' 137 '!=' 0 -a -n 1 ']' + cat /tmp/tmp.QDGNbN3y83 + cat /tmp/tmp.OkkiTwbh6v command terminated with exit code 137 + sleep 0 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'mongosh mongodb://user:pass@some-name-mongos.balancer-17371.svc.cluster.local/admin --quiet /tmp/data.js' + exit_status=1 + set -e + '[' 1 '!=' 0 -a -n 1 ']' + cat /tmp/tmp.QDGNbN3y83 + cat /tmp/tmp.OkkiTwbh6v error: cannot exec into a container in a completed pod; current phase is Failed + sleep 4 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-f6f8c745d-lx9j4 -- bash -c 'mongosh mongodb://user:pass@some-name-mongos.balancer-17371.svc.cluster.local/admin --quiet /tmp/data.js' + exit_status=1 + set -e + '[' 1 '!=' 0 -a -n 1 ']' + cat /tmp/tmp.QDGNbN3y83 + cat /tmp/tmp.OkkiTwbh6v error: cannot exec into a container in a completed pod; current phase is Failed + sleep 8 + cat /tmp/tmp.QDGNbN3y83 + cat /tmp/tmp.OkkiTwbh6v error: cannot exec into a container in a completed pod; current phase is Failed + rm /tmp/tmp.QDGNbN3y83 /tmp/tmp.OkkiTwbh6v + return 1