mkdir -p e2e-tests/reports e2e-tests/logs ========================================================================================= test session starts ========================================================================================== platform linux -- Python 3.14.10, pytest-9.1.1, pluggy-1.7.0 -- /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/.venv/bin/python cachedir: .pytest_cache metadata: {'Python': '3.14.10', 'Platform': 'Linux-7.1.10-200.fc44.x86_64-x86_64-with-glibc2.43', 'Packages': {'pytest': '9.1.1', 'pluggy': '1.7.0'}, 'Plugins': {'html': '4.2.0', 'json-report': '1.5.0', 'dependency': '0.6.1', 'metadata': '3.1.1'}, 'CI': 'true', 'BUILD_NUMBER': '9', 'BUILD_ID': '9', 'BUILD_URL': 'https://cloud.cd.percona.com/job/cloud-psmdb-operator/job/PR-2715/9/', 'NODE_NAME': 'hcloud-nialm8wqguv220jl', 'JOB_NAME': 'cloud-psmdb-operator/PR-2715', 'BUILD_TAG': 'jenkins-cloud-psmdb-operator-PR-2715-9', 'EXECUTOR_NUMBER': '0', 'JENKINS_URL': 'https://cloud.cd.percona.com/', 'WORKSPACE': '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715', 'GIT_COMMIT': '27e0b796072fe59ec1fa78fca82dc7491ddb9891', 'GIT_URL': 'https://github.com/percona/percona-server-mongodb-operator.git', 'GIT_BRANCH': 'PR-2715'} rootdir: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715 configfile: pyproject.toml plugins: html-4.2.0, json-report-1.5.0, dependency-0.6.1, metadata-3.1.1 collecting ... collected 1 item e2e-tests/test_pytest_wrapper.py::test_bash_wrapper[data-sharded] [05:51:27.424232] WARNING kubectl error: Warning: version difference between client (1.37) and server (1.34) exceeds the supported minor version skew of +/-1 [05:51:28.676608] INFO Environment variables: KUBE_VERSION=1.34 PLATFORM=gke ARCH= EKS= GKE=1 AKS= OPENSHIFT= KIND= MINIKUBE= RANCHER= API=psmdb.percona.com/v1 REGISTRY_NAME=docker.io GIT_COMMIT=27e0b796072fe59ec1fa78fca82dc7491ddb9891 GIT_BRANCH=PR-2715 OPERATOR_VERSION=1.24.0 IMAGE=docker.io/perconalab/percona-server-mongodb-operator:PR-2715-27e0b7960 IMAGE_MONGOD=docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 IMAGE_MONGOD_CHAIN=docker.io/perconalab/percona-server-mongodb-operator:main-mongod7.0 docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 IMAGE_SEARCH=docker.io/perconalab/percona-server-mongodb-operator:main-mongot IMAGE_BACKUP=docker.io/perconalab/percona-server-mongodb-operator:main-backup IMAGE_PMM_CLIENT=docker.io/perconalab/pmm-client:3-dev-latest IMAGE_PMM_SERVER=docker.io/perconalab/pmm-server:3-dev-latest IMAGE_LOGCOLLECTOR=docker.io/perconalab/fluentbit:main-logcollector IMAGE_CLUSTERSYNC=docker.io/percona/percona-clustersync-mongodb:1.0.0 IMAGE_AWS_CLI=docker.io/amazon/aws-cli:2.34.60 CERT_MANAGER_VER=1.21.0 CHAOS_MESH_VER=2.7.1 SEAWEEDFS_VER=4.47.0 PMM_SERVER_VER=9.9.9 CLEAN_NAMESPACE=1 DELETE_CRD_ON_START=1 SKIP_DELETE=0 SKIP_BACKUPS_TO_AWS_GCP_AZURE= UPDATE_COMPARE_FILES=0 Debug logging disabled. + main + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 == *percona\-server\-mongodb\-operator* ]] ++ echo -n docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 ++ /usr/sbin/sed -r 's/.*([0-9].[0-9])$/\1/' + MONGO_VER=8.3 + create_infra data-sharded-4333 + local ns=data-sharded-4333 + echo data-sharded-4333 + destroy_cert_manager + [[ -n '' ]] + kubectl_bin delete mutatingwebhookconfiguration cert-manager-webhook --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.shSnu64dS5 ++ mktemp + local LAST_ERR=/tmp/tmp.KdZ34ElTTz + local exit_status=0 + local timeout=4 + local i + args=('delete' 'mutatingwebhookconfiguration' 'cert-manager-webhook' '--ignore-not-found') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mutatingwebhookconfiguration == \- ]] + [[ mutatingwebhookconfiguration =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cert-manager-webhook == \- ]] + [[ cert-manager-webhook =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete mutatingwebhookconfiguration cert-manager-webhook --ignore-not-found + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.shSnu64dS5 + cat /tmp/tmp.KdZ34ElTTz + rm /tmp/tmp.shSnu64dS5 /tmp/tmp.KdZ34ElTTz + return 0 + kubectl_bin delete validatingwebhookconfiguration cert-manager-webhook --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.O2yQFN4LNm ++ mktemp + local LAST_ERR=/tmp/tmp.JriJ4hxvei + local exit_status=0 + local timeout=4 + local i + args=('delete' 'validatingwebhookconfiguration' 'cert-manager-webhook' '--ignore-not-found') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ validatingwebhookconfiguration == \- ]] + [[ validatingwebhookconfiguration =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cert-manager-webhook == \- ]] + [[ cert-manager-webhook =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete validatingwebhookconfiguration cert-manager-webhook --ignore-not-found + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.O2yQFN4LNm + cat /tmp/tmp.JriJ4hxvei + rm /tmp/tmp.O2yQFN4LNm /tmp/tmp.JriJ4hxvei + return 0 + kubectl_bin delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.21.0/cert-manager.yaml --ignore-not-found --wait=false + crds=('certificates.cert-manager.io' 'certificaterequests.cert-manager.io' 'issuers.cert-manager.io' 'clusterissuers.cert-manager.io' 'orders.acme.cert-manager.io' 'challenges.acme.cert-manager.io') + local crds + kubectl_bin delete crd certificates.cert-manager.io certificaterequests.cert-manager.io issuers.cert-manager.io clusterissuers.cert-manager.io orders.acme.cert-manager.io challenges.acme.cert-manager.io --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.5h5Rvha0td ++ mktemp + local LAST_ERR=/tmp/tmp.LtaWDOmDup + local exit_status=0 + local timeout=4 + local i + args=('delete' 'crd' 'certificates.cert-manager.io' 'certificaterequests.cert-manager.io' 'issuers.cert-manager.io' 'clusterissuers.cert-manager.io' 'orders.acme.cert-manager.io' 'challenges.acme.cert-manager.io' '--ignore-not-found' '--wait=false') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ crd == \- ]] + [[ crd =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ certificates.cert-manager.io == \- ]] + [[ certificates.cert-manager.io =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ certificaterequests.cert-manager.io == \- ]] + [[ certificaterequests.cert-manager.io =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ issuers.cert-manager.io == \- ]] + [[ issuers.cert-manager.io =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ clusterissuers.cert-manager.io == \- ]] + [[ clusterissuers.cert-manager.io =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ orders.acme.cert-manager.io == \- ]] + [[ orders.acme.cert-manager.io =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ challenges.acme.cert-manager.io == \- ]] + [[ challenges.acme.cert-manager.io =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --wait=false == \- ]] + [[ --wait=false =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete crd certificates.cert-manager.io certificaterequests.cert-manager.io issuers.cert-manager.io clusterissuers.cert-manager.io orders.acme.cert-manager.io challenges.acme.cert-manager.io --ignore-not-found --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.5h5Rvha0td + cat /tmp/tmp.LtaWDOmDup + rm /tmp/tmp.5h5Rvha0td /tmp/tmp.LtaWDOmDup + return 0 + kubectl_bin delete namespace cert-manager --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.hSfwue6AGl ++ mktemp + local LAST_ERR=/tmp/tmp.AOHj1Tdp2u + local exit_status=0 + local timeout=4 + local i + args=('delete' 'namespace' 'cert-manager' '--ignore-not-found' '--wait=false') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ namespace == \- ]] + [[ namespace =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cert-manager == \- ]] + [[ cert-manager =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --wait=false == \- ]] + [[ --wait=false =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete namespace cert-manager --ignore-not-found --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.hSfwue6AGl + cat /tmp/tmp.AOHj1Tdp2u + rm /tmp/tmp.hSfwue6AGl /tmp/tmp.AOHj1Tdp2u + return 0 + local remaining + local attempt ++ seq 1 60 + for attempt in $(seq 1 60) ++ kubectl_bin get mutatingwebhookconfiguration cert-manager-webhook --ignore-not-found -o name +++ mktemp ++ local LAST_OUT=/tmp/tmp.XbywfaTvpn +++ mktemp ++ local LAST_ERR=/tmp/tmp.Rm9Zju5jAM ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'mutatingwebhookconfiguration' 'cert-manager-webhook' '--ignore-not-found' '-o' 'name') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ mutatingwebhookconfiguration == \- ]] ++ [[ mutatingwebhookconfiguration =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ cert-manager-webhook == \- ]] ++ [[ cert-manager-webhook =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --ignore-not-found == \- ]] ++ [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ name == \- ]] ++ [[ name =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get mutatingwebhookconfiguration cert-manager-webhook --ignore-not-found -o name ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.XbywfaTvpn ++ cat /tmp/tmp.Rm9Zju5jAM ++ rm /tmp/tmp.XbywfaTvpn /tmp/tmp.Rm9Zju5jAM ++ return 0 + remaining= ++ kubectl_bin get validatingwebhookconfiguration cert-manager-webhook --ignore-not-found -o name +++ mktemp ++ local LAST_OUT=/tmp/tmp.OQNwWwdObI +++ mktemp ++ local LAST_ERR=/tmp/tmp.2919YIVHYX ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'validatingwebhookconfiguration' 'cert-manager-webhook' '--ignore-not-found' '-o' 'name') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ validatingwebhookconfiguration == \- ]] ++ [[ validatingwebhookconfiguration =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ cert-manager-webhook == \- ]] ++ [[ cert-manager-webhook =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --ignore-not-found == \- ]] ++ [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ name == \- ]] ++ [[ name =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get validatingwebhookconfiguration cert-manager-webhook --ignore-not-found -o name ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.OQNwWwdObI ++ cat /tmp/tmp.2919YIVHYX ++ rm /tmp/tmp.OQNwWwdObI /tmp/tmp.2919YIVHYX ++ return 0 + remaining+= ++ kubectl_bin get crd certificates.cert-manager.io certificaterequests.cert-manager.io issuers.cert-manager.io clusterissuers.cert-manager.io orders.acme.cert-manager.io challenges.acme.cert-manager.io --ignore-not-found -o name +++ mktemp ++ local LAST_OUT=/tmp/tmp.61ZTl3vCNs +++ mktemp ++ local LAST_ERR=/tmp/tmp.GhvAwP5f4F ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'crd' 'certificates.cert-manager.io' 'certificaterequests.cert-manager.io' 'issuers.cert-manager.io' 'clusterissuers.cert-manager.io' 'orders.acme.cert-manager.io' 'challenges.acme.cert-manager.io' '--ignore-not-found' '-o' 'name') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ crd == \- ]] ++ [[ crd =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ certificates.cert-manager.io == \- ]] ++ [[ certificates.cert-manager.io =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ certificaterequests.cert-manager.io == \- ]] ++ [[ certificaterequests.cert-manager.io =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ issuers.cert-manager.io == \- ]] ++ [[ issuers.cert-manager.io =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ clusterissuers.cert-manager.io == \- ]] ++ [[ clusterissuers.cert-manager.io =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ orders.acme.cert-manager.io == \- ]] ++ [[ orders.acme.cert-manager.io =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ challenges.acme.cert-manager.io == \- ]] ++ [[ challenges.acme.cert-manager.io =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --ignore-not-found == \- ]] ++ [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ name == \- ]] ++ [[ name =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get crd certificates.cert-manager.io certificaterequests.cert-manager.io issuers.cert-manager.io clusterissuers.cert-manager.io orders.acme.cert-manager.io challenges.acme.cert-manager.io --ignore-not-found -o name ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.61ZTl3vCNs ++ cat /tmp/tmp.GhvAwP5f4F ++ rm /tmp/tmp.61ZTl3vCNs /tmp/tmp.GhvAwP5f4F ++ return 0 + remaining+= ++ kubectl_bin get namespace cert-manager --ignore-not-found -o name +++ mktemp ++ local LAST_OUT=/tmp/tmp.tPCnNTHTgd +++ mktemp ++ local LAST_ERR=/tmp/tmp.mbN7Xz5cBp ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'namespace' 'cert-manager' '--ignore-not-found' '-o' 'name') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ namespace == \- ]] ++ [[ namespace =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ cert-manager == \- ]] ++ [[ cert-manager =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --ignore-not-found == \- ]] ++ [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ name == \- ]] ++ [[ name =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get namespace cert-manager --ignore-not-found -o name ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.tPCnNTHTgd ++ cat /tmp/tmp.mbN7Xz5cBp ++ rm /tmp/tmp.tPCnNTHTgd /tmp/tmp.mbN7Xz5cBp ++ return 0 + remaining+= + [[ -z '' ]] + return 0 + [[ 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-2715/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.jmraPOuyFB ++ mktemp + local LAST_ERR=/tmp/tmp.ooZHfKVlb6 + local exit_status=0 + local timeout=4 + local i + args=('delete' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml' '--ignore-not-found' '--wait=false') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --wait=false == \- ]] + [[ --wait=false =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.jmraPOuyFB + cat /tmp/tmp.ooZHfKVlb6 + rm /tmp/tmp.jmraPOuyFB /tmp/tmp.ooZHfKVlb6 + return 0 ++ grep -v '\-\-\-' ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml 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\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbbackups" in group "psmdb.percona.com" + kubectl patch perconaservermongodbbackups.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbbackups" in group "psmdb.percona.com" + : + kubectl get crd perconaservermongodbbackups.psmdb.percona.com + for crd_name in $(yq eval '.metadata.name' "${src_dir}/deploy/crd.yaml" | grep -v '\-\-\-') + grep -v NAMESPACE + kubectl get perconaservermongodbclustersyncs.psmdb.percona.com --all-namespaces -o wide + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbclustersyncs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbclustersyncs" in group "psmdb.percona.com" + kubectl patch perconaservermongodbclustersyncs.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbclustersyncs" in group "psmdb.percona.com" + : + kubectl get crd perconaservermongodbclustersyncs.psmdb.percona.com + for crd_name in $(yq eval '.metadata.name' "${src_dir}/deploy/crd.yaml" | grep -v '\-\-\-') + grep -v NAMESPACE + kubectl get perconaservermongodbrestores.psmdb.percona.com --all-namespaces -o wide + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbrestores.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbrestores" in group "psmdb.percona.com" + kubectl patch perconaservermongodbrestores.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbrestores" in group "psmdb.percona.com" + : + kubectl get crd perconaservermongodbrestores.psmdb.percona.com + for crd_name in $(yq eval '.metadata.name' "${src_dir}/deploy/crd.yaml" | grep -v '\-\-\-') + grep -v NAMESPACE + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide + 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" in group "psmdb.percona.com" + kubectl patch perconaservermongodbs.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbs" in group "psmdb.percona.com" + : + kubectl get crd perconaservermongodbs.psmdb.percona.com + local rbac_yaml=rbac.yaml + '[' -n psmdb-operator ']' + rbac_yaml=cw-rbac.yaml + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-rbac.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.bIyihnIqOn ++ mktemp + local LAST_ERR=/tmp/tmp.5r52S19s3f + local exit_status=0 + local timeout=4 + local i + args=('delete' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-rbac.yaml' '--ignore-not-found' '--wait=false') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-rbac.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-rbac.yaml =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --wait=false == \- ]] + [[ --wait=false =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-rbac.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.bIyihnIqOn + cat /tmp/tmp.5r52S19s3f + rm /tmp/tmp.bIyihnIqOn /tmp/tmp.5r52S19s3f + return 0 + check_crd_for_deletion PR-2715 + local git_tag=PR-2715 ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-2715/deploy/crd.yaml ++ yq eval .metadata.name ++ /usr/sbin/sed s/---//g ++ /usr/sbin/sed ':a;N;$!ba;s/\n/ /g' + for crd_name in $(curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/${git_tag}/deploy/crd.yaml | yq eval '.metadata.name' | $sed 's/---//g' | $sed ':a;N;$!ba;s/\n/ /g') ++ kubectl_bin get crd/null -o 'jsonpath={.status.conditions[-1].type}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.jNjGbn2i1Y +++ mktemp ++ local LAST_ERR=/tmp/tmp.yjnlTM7szO ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'crd/null' '-o' 'jsonpath={.status.conditions[-1].type}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ crd/null == \- ]] ++ [[ crd/null =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.status.conditions[-1].type} == \- ]] ++ [[ jsonpath={.status.conditions[-1].type} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get crd/null -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=1 ++ set -e ++ [[ 1 == 0 ]] ++ [[ 0 == 9 ]] ++ grep -q 'Error from server (NotFound)' /tmp/tmp.yjnlTM7szO ++ break ++ cat /tmp/tmp.jNjGbn2i1Y ++ cat /tmp/tmp.yjnlTM7szO Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.jNjGbn2i1Y /tmp/tmp.yjnlTM7szO ++ 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 + : ++ grep chaos-mesh ++ kubectl api-resources ++ 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 ++ awk '{print $1}' ++ grep chaos-mesh + 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 ----------------------------------------------------------------------------------- + local 'ns_filter=^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + [[ -n '' ]] + kubectl_bin get ns + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' ++ mktemp + awk '{print$1}' + xargs kubectl delete ns + [[ -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.3kgBvE85Hi ++ mktemp + local LAST_OUT=/tmp/tmp.SSQL86jkDE ++ mktemp + local LAST_ERR=/tmp/tmp.MdXfTFGG2R + local exit_status=0 + local timeout=4 + local i + args=('get' 'ns') + local args + transformed_files=() + local transformed_files + local LAST_ERR=/tmp/tmp.FTJJzeCWmB + local stdin_manifest + for i in "${!args[@]}" + local exit_status=0 + local timeout=4 + [[ get == \- ]] + local i + [[ get =~ ^(-f|--filename)=-$ ]] + args=('delete' 'namespace' 'psmdb-operator' '--ignore-not-found') + for i in "${!args[@]}" + local args + [[ ns == \- ]] + [[ ns =~ ^(-f|--filename)=-$ ]] + transformed_files=() + local transformed_files + arch_scheduling_enabled + local stdin_manifest + for i in "${!args[@]}" + [[ -n '' ]] + [[ delete == \- ]] + arch_scheduling_enabled + [[ delete =~ ^(-f|--filename)=-$ ]] + [[ -n '' ]] + local attempt + local delay + for i in "${!args[@]}" + [[ namespace == \- ]] + [[ namespace =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl get ns + for attempt in $(seq 0 9) + set +e + kubectl delete namespace psmdb-operator --ignore-not-found + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.3kgBvE85Hi + cat /tmp/tmp.MdXfTFGG2R + rm /tmp/tmp.3kgBvE85Hi /tmp/tmp.MdXfTFGG2R + return 0 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.SSQL86jkDE + cat /tmp/tmp.FTJJzeCWmB + rm /tmp/tmp.SSQL86jkDE /tmp/tmp.FTJJzeCWmB + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.D26YARN98j ++ mktemp + local LAST_ERR=/tmp/tmp.lVY2Xgmol9 + local exit_status=0 + local timeout=4 + local i + args=('wait' '--for=delete' 'namespace' 'psmdb-operator') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ wait == \- ]] + [[ wait =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --for=delete == \- ]] + [[ --for=delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ namespace == \- ]] + [[ namespace =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl wait --for=delete namespace psmdb-operator + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.D26YARN98j + cat /tmp/tmp.lVY2Xgmol9 + rm /tmp/tmp.D26YARN98j /tmp/tmp.lVY2Xgmol9 + 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.Dg3JNZdoXs ++ mktemp + local LAST_ERR=/tmp/tmp.iYKeKCq8Ji + local exit_status=0 + local timeout=4 + local i + args=('create' 'namespace' 'psmdb-operator') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ create == \- ]] + [[ create =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ namespace == \- ]] + [[ namespace =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl create namespace psmdb-operator + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.Dg3JNZdoXs namespace/psmdb-operator created + cat /tmp/tmp.iYKeKCq8Ji + rm /tmp/tmp.Dg3JNZdoXs /tmp/tmp.iYKeKCq8Ji + return 0 + set_kube_ctx psmdb-operator + local namespace=psmdb-operator ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.gkO0WLDxmd +++ mktemp ++ local LAST_ERR=/tmp/tmp.8Lt0WvQlRG ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('config' 'current-context') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ config == \- ]] ++ [[ config =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ current-context == \- ]] ++ [[ current-context =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl config current-context ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.gkO0WLDxmd ++ cat /tmp/tmp.8Lt0WvQlRG ++ rm /tmp/tmp.gkO0WLDxmd /tmp/tmp.8Lt0WvQlRG ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.vjM2gTFVFi ++ mktemp + local LAST_ERR=/tmp/tmp.bxKz0TepnY + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11' '--namespace=psmdb-operator') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ config == \- ]] + [[ config =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ set-context == \- ]] + [[ set-context =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --namespace=psmdb-operator == \- ]] + [[ --namespace=psmdb-operator =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11 --namespace=psmdb-operator + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.vjM2gTFVFi Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11" modified. + cat /tmp/tmp.bxKz0TepnY + rm /tmp/tmp.vjM2gTFVFi /tmp/tmp.bxKz0TepnY + return 0 + deploy_operator + desc 'start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2715-27e0b7960' + set +o xtrace ----------------------------------------------------------------------------------- start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2715-27e0b7960 ----------------------------------------------------------------------------------- + local cr_file + '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/data-sharded/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.EerpDFVBfw ++ mktemp + local LAST_ERR=/tmp/tmp.jLjExIKo0m + local exit_status=0 + local timeout=4 + local i + args=('apply' '--server-side' '--force-conflicts' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ apply == \- ]] + [[ apply =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --server-side == \- ]] + [[ --server-side =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --force-conflicts == \- ]] + [[ --force-conflicts =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.EerpDFVBfw customresourcedefinition.apiextensions.k8s.io/perconaservermongodbbackups.psmdb.percona.com serverside-applied customresourcedefinition.apiextensions.k8s.io/perconaservermongodbclustersyncs.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.jLjExIKo0m + rm /tmp/tmp.EerpDFVBfw /tmp/tmp.jLjExIKo0m + 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-2715/deploy/cw-rbac.yaml + sed -e 's^namespace: .*^namespace: psmdb-operator^' + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.YcNqDv6JjU ++ mktemp + local LAST_ERR=/tmp/tmp.pvMJXcsmJg + local exit_status=0 + local timeout=4 + local i + args=('apply' '-n' 'psmdb-operator' '-f' '-') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ apply == \- ]] + [[ apply =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -n == \- ]] + [[ -n =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ - == \- ]] + [[ 4 -gt 0 ]] + [[ -f =~ ^(-f|--filename)$ ]] ++ mktemp + stdin_manifest=/tmp/tmp.byaewLt47B + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.byaewLt47B + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl apply -n psmdb-operator -f /tmp/tmp.byaewLt47B + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.YcNqDv6JjU 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.pvMJXcsmJg + rm /tmp/tmp.YcNqDv6JjU /tmp/tmp.pvMJXcsmJg /tmp/tmp.byaewLt47B + return 0 + yq eval $'\n\t\t\t(.spec.template.spec.containers[].image = "docker.io/perconalab/percona-server-mongodb-operator:PR-2715-27e0b7960") |\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-2715/deploy/cw-operator.yaml + add_arch_to_podspecs - + arch_scheduling_enabled + [[ -n '' ]] + cat - + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.78F9BlrC1b ++ mktemp + local LAST_ERR=/tmp/tmp.7TbdEY69NX + local exit_status=0 + local timeout=4 + local i + args=('apply' '-n' 'psmdb-operator' '-f' '-') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ apply == \- ]] + [[ apply =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -n == \- ]] + [[ -n =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ - == \- ]] + [[ 4 -gt 0 ]] + [[ -f =~ ^(-f|--filename)$ ]] ++ mktemp + stdin_manifest=/tmp/tmp.wmpKKVMqld + cat + return + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.wmpKKVMqld + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl apply -n psmdb-operator -f /tmp/tmp.wmpKKVMqld + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.78F9BlrC1b deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.7TbdEY69NX + rm /tmp/tmp.78F9BlrC1b /tmp/tmp.7TbdEY69NX /tmp/tmp.wmpKKVMqld + 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.YeDvWwKvRC +++ mktemp ++ local LAST_ERR=/tmp/tmp.RMMZvNZsL8 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=percona-server-mongodb-operator' '-o' 'jsonpath={.items[].metadata.name}' '-n' 'psmdb-operator') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ pods == \- ]] ++ [[ pods =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --selector=name=percona-server-mongodb-operator == \- ]] ++ [[ --selector=name=percona-server-mongodb-operator =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.items[].metadata.name} == \- ]] ++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -n == \- ]] ++ [[ -n =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-operator == \- ]] ++ [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ 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 ]] ++ break ++ cat /tmp/tmp.YeDvWwKvRC ++ cat /tmp/tmp.RMMZvNZsL8 ++ rm /tmp/tmp.YeDvWwKvRC /tmp/tmp.RMMZvNZsL8 ++ return 0 + wait_operator_pod percona-server-mongodb-operator-b57dc4869-nzpk2 + local pod=percona-server-mongodb-operator-b57dc4869-nzpk2 + set +o xtrace waiting for pod/percona-server-mongodb-operator-b57dc4869-nzpk2 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.PiIwazviHY +++ mktemp ++ local LAST_ERR=/tmp/tmp.sy5UpFhW2E ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=percona-server-mongodb-operator' '-o' 'jsonpath={.items[].metadata.name}' '-n' 'psmdb-operator') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ pods == \- ]] ++ [[ pods =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --selector=name=percona-server-mongodb-operator == \- ]] ++ [[ --selector=name=percona-server-mongodb-operator =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.items[].metadata.name} == \- ]] ++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -n == \- ]] ++ [[ -n =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-operator == \- ]] ++ [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ 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 ]] ++ break ++ cat /tmp/tmp.PiIwazviHY ++ cat /tmp/tmp.sy5UpFhW2E ++ rm /tmp/tmp.PiIwazviHY /tmp/tmp.sy5UpFhW2E ++ return 0 + kubectl_bin logs -n psmdb-operator percona-server-mongodb-operator-b57dc4869-nzpk2 ++ mktemp + local LAST_OUT=/tmp/tmp.AyrQhcHA7U ++ mktemp + local LAST_ERR=/tmp/tmp.jweilJ1TGJ + local exit_status=0 + local timeout=4 + local i + args=('logs' '-n' 'psmdb-operator' 'percona-server-mongodb-operator-b57dc4869-nzpk2') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ logs == \- ]] + [[ logs =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -n == \- ]] + [[ -n =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ percona-server-mongodb-operator-b57dc4869-nzpk2 == \- ]] + [[ percona-server-mongodb-operator-b57dc4869-nzpk2 =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl logs -n psmdb-operator percona-server-mongodb-operator-b57dc4869-nzpk2 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.AyrQhcHA7U + cat /tmp/tmp.jweilJ1TGJ + rm /tmp/tmp.AyrQhcHA7U /tmp/tmp.jweilJ1TGJ + return 0 2026-11-23T05:52:30.672Z INFO setup Manager starting up {"gitCommit": "27e0b796072fe59ec1fa78fca82dc7491ddb9891", "gitBranch": "PR-2715-27e0b7960", "buildTime": "", "goVersion": "go1.27.4", "os": "linux", "arch": "amd64"} + create_namespace data-sharded-4333 + local namespace=data-sharded-4333 + 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 ++ awk '{print $1}' ++ grep chaos-mesh + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + local 'ns_filter=^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + [[ -n '' ]] + kubectl_bin get ns + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + [[ -n '' ]] + desc 'cleaned up old namespaces data-sharded-4333' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces data-sharded-4333 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace data-sharded-4333 --ignore-not-found ++ mktemp + awk '{print$1}' + local LAST_OUT=/tmp/tmp.LDt1IKAHz1 + xargs kubectl delete ns ++ mktemp ++ mktemp + local LAST_ERR=/tmp/tmp.eTW0VqdUWK + local exit_status=0 + local timeout=4 + local i + args=('get' 'ns') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ get == \- ]] + [[ get =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ ns == \- ]] + [[ ns =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + local LAST_OUT=/tmp/tmp.E9PZW22Q7L + for attempt in $(seq 0 9) ++ mktemp + set +e + kubectl get ns + local LAST_ERR=/tmp/tmp.RTyXf3BDJc + local exit_status=0 + local timeout=4 + local i + args=('delete' 'namespace' 'data-sharded-4333' '--ignore-not-found') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ namespace == \- ]] + [[ namespace =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ data-sharded-4333 == \- ]] + [[ data-sharded-4333 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete namespace data-sharded-4333 --ignore-not-found + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.LDt1IKAHz1 + cat /tmp/tmp.eTW0VqdUWK + rm /tmp/tmp.LDt1IKAHz1 /tmp/tmp.eTW0VqdUWK + return 0 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.E9PZW22Q7L + cat /tmp/tmp.RTyXf3BDJc + rm /tmp/tmp.E9PZW22Q7L /tmp/tmp.RTyXf3BDJc + return 0 + kubectl_bin wait --for=delete namespace data-sharded-4333 ++ mktemp + local LAST_OUT=/tmp/tmp.GJ1ZecXc2c ++ mktemp + local LAST_ERR=/tmp/tmp.TlqauJfoUp + local exit_status=0 + local timeout=4 + local i + args=('wait' '--for=delete' 'namespace' 'data-sharded-4333') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ wait == \- ]] + [[ wait =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --for=delete == \- ]] + [[ --for=delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ namespace == \- ]] + [[ namespace =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ data-sharded-4333 == \- ]] + [[ data-sharded-4333 =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl wait --for=delete namespace data-sharded-4333 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.GJ1ZecXc2c + cat /tmp/tmp.TlqauJfoUp + rm /tmp/tmp.GJ1ZecXc2c /tmp/tmp.TlqauJfoUp + return 0 + desc 'create namespace data-sharded-4333' + set +o xtrace ----------------------------------------------------------------------------------- create namespace data-sharded-4333 ----------------------------------------------------------------------------------- + kubectl_bin create namespace data-sharded-4333 ++ mktemp + local LAST_OUT=/tmp/tmp.SEyucJwtW7 ++ mktemp + local LAST_ERR=/tmp/tmp.F80dIsnkrH + local exit_status=0 + local timeout=4 + local i + args=('create' 'namespace' 'data-sharded-4333') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ create == \- ]] + [[ create =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ namespace == \- ]] + [[ namespace =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ data-sharded-4333 == \- ]] + [[ data-sharded-4333 =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl create namespace data-sharded-4333 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.SEyucJwtW7 namespace/data-sharded-4333 created + cat /tmp/tmp.F80dIsnkrH + rm /tmp/tmp.SEyucJwtW7 /tmp/tmp.F80dIsnkrH + return 0 + set_kube_ctx data-sharded-4333 + local namespace=data-sharded-4333 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.Nl3duDXSrG +++ mktemp ++ local LAST_ERR=/tmp/tmp.p7GxCnbsn9 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('config' 'current-context') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ config == \- ]] ++ [[ config =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ current-context == \- ]] ++ [[ current-context =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl config current-context ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.Nl3duDXSrG ++ cat /tmp/tmp.p7GxCnbsn9 ++ rm /tmp/tmp.Nl3duDXSrG /tmp/tmp.p7GxCnbsn9 ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11 --namespace=data-sharded-4333 ++ mktemp + local LAST_OUT=/tmp/tmp.Wlv6KtIcix ++ mktemp + local LAST_ERR=/tmp/tmp.48wJ9eEno4 + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11' '--namespace=data-sharded-4333') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ config == \- ]] + [[ config =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ set-context == \- ]] + [[ set-context =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --namespace=data-sharded-4333 == \- ]] + [[ --namespace=data-sharded-4333 =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11 --namespace=data-sharded-4333 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.Wlv6KtIcix Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster11" modified. + cat /tmp/tmp.48wJ9eEno4 + rm /tmp/tmp.Wlv6KtIcix /tmp/tmp.48wJ9eEno4 + return 0 + deploy_cert_manager + [[ -n '' ]] + desc 'deploy cert manager' + set +o xtrace ----------------------------------------------------------------------------------- deploy cert manager ----------------------------------------------------------------------------------- + kubectl_bin -n cert-manager delete clusterissuer --all ++ mktemp + local LAST_OUT=/tmp/tmp.drtDGbdNOS ++ mktemp + local LAST_ERR=/tmp/tmp.oAt1GBbRkI + local exit_status=0 + local timeout=4 + local i + args=('-n' 'cert-manager' 'delete' 'clusterissuer' '--all') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ -n == \- ]] + [[ -n =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cert-manager == \- ]] + [[ cert-manager =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ clusterissuer == \- ]] + [[ clusterissuer =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --all == \- ]] + [[ --all =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl -n cert-manager delete clusterissuer --all + exit_status=1 + set -e + [[ 1 == 0 ]] + [[ 0 == 9 ]] + grep -q 'Error from server (NotFound)' /tmp/tmp.oAt1GBbRkI + grep -qE 'ENHANCE_YOUR_CALM|ResourceExhausted|TooManyRequests|TLS handshake timeout|etcdserver: request timed out|the server is currently unable to handle the request|Unable to connect to the server|connection reset by peer' /tmp/tmp.oAt1GBbRkI + [[ -n 1 ]] + [[ 0 -lt 2 ]] + delay=0 + cat /tmp/tmp.drtDGbdNOS /tmp/tmp.oAt1GBbRkI error: the server doesn't have a resource type "clusterissuer" + sleep 0 + for attempt in $(seq 0 9) + set +e + kubectl -n cert-manager delete clusterissuer --all + exit_status=1 + set -e + [[ 1 == 0 ]] + [[ 1 == 9 ]] + grep -q 'Error from server (NotFound)' /tmp/tmp.oAt1GBbRkI + grep -qE 'ENHANCE_YOUR_CALM|ResourceExhausted|TooManyRequests|TLS handshake timeout|etcdserver: request timed out|the server is currently unable to handle the request|Unable to connect to the server|connection reset by peer' /tmp/tmp.oAt1GBbRkI + [[ -n 1 ]] + [[ 1 -lt 2 ]] + delay=4 + cat /tmp/tmp.drtDGbdNOS /tmp/tmp.oAt1GBbRkI error: the server doesn't have a resource type "clusterissuer" + sleep 4 + for attempt in $(seq 0 9) + set +e + kubectl -n cert-manager delete clusterissuer --all + exit_status=1 + set -e + [[ 1 == 0 ]] + [[ 2 == 9 ]] + grep -q 'Error from server (NotFound)' /tmp/tmp.oAt1GBbRkI + grep -qE 'ENHANCE_YOUR_CALM|ResourceExhausted|TooManyRequests|TLS handshake timeout|etcdserver: request timed out|the server is currently unable to handle the request|Unable to connect to the server|connection reset by peer' /tmp/tmp.oAt1GBbRkI + [[ -n 1 ]] + [[ 2 -lt 2 ]] + break + cat /tmp/tmp.drtDGbdNOS + cat /tmp/tmp.oAt1GBbRkI error: the server doesn't have a resource type "clusterissuer" + rm /tmp/tmp.drtDGbdNOS /tmp/tmp.oAt1GBbRkI + return 1 + : + kubectl_bin -n cert-manager delete certificate --all ++ mktemp + local LAST_OUT=/tmp/tmp.W97Of5g7rQ ++ mktemp + local LAST_ERR=/tmp/tmp.vEwFwb2WN8 + local exit_status=0 + local timeout=4 + local i + args=('-n' 'cert-manager' 'delete' 'certificate' '--all') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ -n == \- ]] + [[ -n =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cert-manager == \- ]] + [[ cert-manager =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ certificate == \- ]] + [[ certificate =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --all == \- ]] + [[ --all =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl -n cert-manager delete certificate --all + exit_status=1 + set -e + [[ 1 == 0 ]] + [[ 0 == 9 ]] + grep -q 'Error from server (NotFound)' /tmp/tmp.vEwFwb2WN8 + grep -qE 'ENHANCE_YOUR_CALM|ResourceExhausted|TooManyRequests|TLS handshake timeout|etcdserver: request timed out|the server is currently unable to handle the request|Unable to connect to the server|connection reset by peer' /tmp/tmp.vEwFwb2WN8 + [[ -n 1 ]] + [[ 0 -lt 2 ]] + delay=0 + cat /tmp/tmp.W97Of5g7rQ /tmp/tmp.vEwFwb2WN8 error: the server doesn't have a resource type "certificate" + sleep 0 + for attempt in $(seq 0 9) + set +e + kubectl -n cert-manager delete certificate --all + exit_status=1 + set -e + [[ 1 == 0 ]] + [[ 1 == 9 ]] + grep -q 'Error from server (NotFound)' /tmp/tmp.vEwFwb2WN8 + grep -qE 'ENHANCE_YOUR_CALM|ResourceExhausted|TooManyRequests|TLS handshake timeout|etcdserver: request timed out|the server is currently unable to handle the request|Unable to connect to the server|connection reset by peer' /tmp/tmp.vEwFwb2WN8 + [[ -n 1 ]] + [[ 1 -lt 2 ]] + delay=4 + cat /tmp/tmp.W97Of5g7rQ /tmp/tmp.vEwFwb2WN8 error: the server doesn't have a resource type "certificate" + sleep 4 + for attempt in $(seq 0 9) + set +e + kubectl -n cert-manager delete certificate --all + exit_status=1 + set -e + [[ 1 == 0 ]] + [[ 2 == 9 ]] + grep -q 'Error from server (NotFound)' /tmp/tmp.vEwFwb2WN8 + grep -qE 'ENHANCE_YOUR_CALM|ResourceExhausted|TooManyRequests|TLS handshake timeout|etcdserver: request timed out|the server is currently unable to handle the request|Unable to connect to the server|connection reset by peer' /tmp/tmp.vEwFwb2WN8 + [[ -n 1 ]] + [[ 2 -lt 2 ]] + break + cat /tmp/tmp.W97Of5g7rQ + cat /tmp/tmp.vEwFwb2WN8 error: the server doesn't have a resource type "certificate" + rm /tmp/tmp.W97Of5g7rQ /tmp/tmp.vEwFwb2WN8 + return 1 + : + kubectl_bin create namespace cert-manager ++ mktemp + local LAST_OUT=/tmp/tmp.QNGovrWgwr ++ mktemp + local LAST_ERR=/tmp/tmp.XGPnlDsNh7 + local exit_status=0 + local timeout=4 + local i + args=('create' 'namespace' 'cert-manager') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ create == \- ]] + [[ create =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ namespace == \- ]] + [[ namespace =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cert-manager == \- ]] + [[ cert-manager =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl create namespace cert-manager + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.QNGovrWgwr namespace/cert-manager created + cat /tmp/tmp.XGPnlDsNh7 + rm /tmp/tmp.QNGovrWgwr /tmp/tmp.XGPnlDsNh7 + return 0 + kubectl_bin label namespace cert-manager certmanager.k8s.io/disable-validation=true ++ mktemp + local LAST_OUT=/tmp/tmp.dNsz7Jq4iF ++ mktemp + local LAST_ERR=/tmp/tmp.jWovYQ85Gt + local exit_status=0 + local timeout=4 + local i + args=('label' 'namespace' 'cert-manager' 'certmanager.k8s.io/disable-validation=true') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ label == \- ]] + [[ label =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ namespace == \- ]] + [[ namespace =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cert-manager == \- ]] + [[ cert-manager =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ certmanager.k8s.io/disable-validation=true == \- ]] + [[ certmanager.k8s.io/disable-validation=true =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.dNsz7Jq4iF namespace/cert-manager labeled + cat /tmp/tmp.jWovYQ85Gt + rm /tmp/tmp.dNsz7Jq4iF /tmp/tmp.jWovYQ85Gt + return 0 + curl -sL https://github.com/cert-manager/cert-manager/releases/download/v1.21.0/cert-manager.yaml + add_arch_to_podspecs - + kubectl_bin apply -f - --validate=false + arch_scheduling_enabled + [[ -n '' ]] + cat - + return namespace/cert-manager configured customresourcedefinition.apiextensions.k8s.io/challenges.acme.cert-manager.io created customresourcedefinition.apiextensions.k8s.io/orders.acme.cert-manager.io created customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io created customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io created customresourcedefinition.apiextensions.k8s.io/clusterissuers.cert-manager.io created customresourcedefinition.apiextensions.k8s.io/issuers.cert-manager.io created serviceaccount/cert-manager-cainjector created serviceaccount/cert-manager created serviceaccount/cert-manager-webhook created clusterrole.rbac.authorization.k8s.io/cert-manager-cainjector created clusterrole.rbac.authorization.k8s.io/cert-manager-controller-issuers created clusterrole.rbac.authorization.k8s.io/cert-manager-controller-clusterissuers created clusterrole.rbac.authorization.k8s.io/cert-manager-controller-certificates created clusterrole.rbac.authorization.k8s.io/cert-manager-controller-orders created clusterrole.rbac.authorization.k8s.io/cert-manager-controller-challenges created clusterrole.rbac.authorization.k8s.io/cert-manager-controller-ingress-shim created clusterrole.rbac.authorization.k8s.io/cert-manager-cluster-view created clusterrole.rbac.authorization.k8s.io/cert-manager-view created clusterrole.rbac.authorization.k8s.io/cert-manager-edit created clusterrole.rbac.authorization.k8s.io/cert-manager-controller-approve:cert-manager-io created clusterrole.rbac.authorization.k8s.io/cert-manager-controller-certificatesigningrequests created clusterrole.rbac.authorization.k8s.io/cert-manager-webhook:subjectaccessreviews created clusterrolebinding.rbac.authorization.k8s.io/cert-manager-cainjector created clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-issuers created clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-clusterissuers created clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-certificates created clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-orders created clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-challenges created clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-ingress-shim created clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-approve:cert-manager-io created clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-certificatesigningrequests created clusterrolebinding.rbac.authorization.k8s.io/cert-manager-webhook:subjectaccessreviews created role.rbac.authorization.k8s.io/cert-manager-cainjector:leaderelection created role.rbac.authorization.k8s.io/cert-manager:leaderelection created role.rbac.authorization.k8s.io/cert-manager-webhook:dynamic-serving created rolebinding.rbac.authorization.k8s.io/cert-manager-cainjector:leaderelection created rolebinding.rbac.authorization.k8s.io/cert-manager:leaderelection created rolebinding.rbac.authorization.k8s.io/cert-manager-webhook:dynamic-serving created service/cert-manager-cainjector 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 created validatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook created + kubectl_bin -n cert-manager wait pod -l app.kubernetes.io/instance=cert-manager --for=condition=ready ++ mktemp + local LAST_OUT=/tmp/tmp.RMUVBfwuFW ++ mktemp + local LAST_ERR=/tmp/tmp.NO5zUYdM6c + local exit_status=0 + local timeout=4 + local i + args=('-n' 'cert-manager' 'wait' 'pod' '-l' 'app.kubernetes.io/instance=cert-manager' '--for=condition=ready') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ -n == \- ]] + [[ -n =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cert-manager == \- ]] + [[ cert-manager =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ wait == \- ]] + [[ wait =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ pod == \- ]] + [[ pod =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -l == \- ]] + [[ -l =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ app.kubernetes.io/instance=cert-manager == \- ]] + [[ app.kubernetes.io/instance=cert-manager =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --for=condition=ready == \- ]] + [[ --for=condition=ready =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + 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 ]] + break + cat /tmp/tmp.RMUVBfwuFW pod/cert-manager-74bb94c469-f49qj condition met pod/cert-manager-cainjector-7c8bfb9579-c72sk condition met pod/cert-manager-webhook-5b4b98dcf4-bh6s4 condition met + cat /tmp/tmp.NO5zUYdM6c + rm /tmp/tmp.RMUVBfwuFW /tmp/tmp.NO5zUYdM6c + 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-2715/e2e-tests/conf/secrets.yml ++ mktemp + local LAST_OUT=/tmp/tmp.bVLs0j1dcl ++ mktemp + local LAST_ERR=/tmp/tmp.wXBMghInG9 + local exit_status=0 + local timeout=4 + local i + args=('apply' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/secrets.yml') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ apply == \- ]] + [[ apply =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/secrets.yml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/secrets.yml =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/secrets.yml + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.bVLs0j1dcl secret/some-users created + cat /tmp/tmp.wXBMghInG9 + rm /tmp/tmp.bVLs0j1dcl /tmp/tmp.wXBMghInG9 + return 0 + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/client_with_tls.yml ++ mktemp + local LAST_OUT=/tmp/tmp.iN0JpJVeZB ++ mktemp + local LAST_ERR=/tmp/tmp.g0PkXK4GXj + local exit_status=0 + local timeout=4 + local i + args=('apply' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/client_with_tls.yml') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ apply == \- ]] + [[ apply =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/client_with_tls.yml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/client_with_tls.yml =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/client_with_tls.yml + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.iN0JpJVeZB deployment.apps/psmdb-client created + cat /tmp/tmp.g0PkXK4GXj + rm /tmp/tmp.iN0JpJVeZB /tmp/tmp.g0PkXK4GXj + 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-2715/e2e-tests/data-sharded/conf/some-name.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/data-sharded/conf/some-name.yml + kubectl_bin apply -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/data-sharded/conf/some-name.yml + yq eval '(.spec | select(.image == null)).image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3"' + yq eval '(.spec | select(has("pmm"))).pmm.image = "docker.io/perconalab/pmm-client:3-dev-latest"' ++ mktemp + yq eval '(.spec | select(has("initImage"))).initImage = "docker.io/perconalab/percona-server-mongodb-operator:PR-2715-27e0b7960"' + local LAST_OUT=/tmp/tmp.xYVXN2RGaT + yq eval '(.spec | select(has("backup"))).backup.image = "docker.io/perconalab/percona-server-mongodb-operator:main-backup"' + yq eval '(.spec | select(has("search"))).search.image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongot"' + add_arch_to_psmdb - + /usr/sbin/sed -e s/NAME_SPACE/data-sharded-4333/g + [[ -n docker.io/perconalab/fluentbit:main-logcollector ]] + arch_scheduling_enabled + [[ -n '' ]] + cat - + IMAGE_LOGCOLLECTOR=docker.io/perconalab/fluentbit:main-logcollector + yq eval '(.spec | select(has("logcollector"))).logcollector.image = strenv(IMAGE_LOGCOLLECTOR)' ++ mktemp + yq eval '.spec.upgradeOptions.apply="Never"' + local LAST_ERR=/tmp/tmp.vfGqnGapKx + local exit_status=0 + local timeout=4 + local i + args=('apply' '-f' '-') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ apply == \- ]] + [[ apply =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ - == \- ]] + [[ 2 -gt 0 ]] + [[ -f =~ ^(-f|--filename)$ ]] ++ mktemp + stdin_manifest=/tmp/tmp.sj4mPUUB66 + cat + return + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.sj4mPUUB66 + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl apply -f /tmp/tmp.sj4mPUUB66 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.xYVXN2RGaT perconaservermongodb.psmdb.percona.com/some-name created + cat /tmp/tmp.vfGqnGapKx + rm /tmp/tmp.xYVXN2RGaT /tmp/tmp.vfGqnGapKx /tmp/tmp.sj4mPUUB66 + 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_readiness=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.w9XwlcrInx +++ mktemp ++ local LAST_ERR=/tmp/tmp.070OqBU8dh ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.w9XwlcrInx ++ cat /tmp/tmp.070OqBU8dh ++ rm /tmp/tmp.w9XwlcrInx /tmp/tmp.070OqBU8dh ++ 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.tcAU3ifs1a +++ mktemp ++ local LAST_ERR=/tmp/tmp.aMHm4SKTZk ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.tcAU3ifs1a ++ cat /tmp/tmp.aMHm4SKTZk ++ rm /tmp/tmp.tcAU3ifs1a /tmp/tmp.aMHm4SKTZk ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.zcXf1Qc3tj +++ mktemp ++ local LAST_ERR=/tmp/tmp.NvdQarm21J ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.zcXf1Qc3tj ++ cat /tmp/tmp.NvdQarm21J ++ rm /tmp/tmp.zcXf1Qc3tj /tmp/tmp.NvdQarm21J ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster some-name to be ready............................... + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readiness=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.UVltGcJVf6 +++ mktemp ++ local LAST_ERR=/tmp/tmp.EuaXibPBS8 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.UVltGcJVf6 ++ cat /tmp/tmp.EuaXibPBS8 ++ rm /tmp/tmp.UVltGcJVf6 /tmp/tmp.EuaXibPBS8 ++ 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.fll6L225r1 +++ mktemp ++ local LAST_ERR=/tmp/tmp.Qki2HekAku ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.fll6L225r1 ++ cat /tmp/tmp.Qki2HekAku ++ rm /tmp/tmp.fll6L225r1 /tmp/tmp.Qki2HekAku ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.vZeEnvhPyg +++ mktemp ++ local LAST_ERR=/tmp/tmp.aCSRnFQXzd ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.vZeEnvhPyg ++ cat /tmp/tmp.aCSRnFQXzd ++ rm /tmp/tmp.vZeEnvhPyg /tmp/tmp.aCSRnFQXzd ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster some-name to be ready + wait_for_running some-name-rs1 3 + local name=some-name-rs1 + let last_pod=2 + local check_cluster_readiness=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.0EaVgUTk1m +++ mktemp ++ local LAST_ERR=/tmp/tmp.2yYFIRwI0r ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="rs1")].arbiter.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="rs1")].arbiter.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="rs1")].arbiter.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.0EaVgUTk1m ++ cat /tmp/tmp.2yYFIRwI0r ++ rm /tmp/tmp.0EaVgUTk1m /tmp/tmp.2yYFIRwI0r ++ return 0 + [[ true == true ]] + 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")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.nFiuwse92U +++ mktemp ++ local LAST_ERR=/tmp/tmp.dYtYQKUXHw ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="rs1")].nonvoting.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="rs1")].nonvoting.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="rs1")].nonvoting.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.nFiuwse92U ++ cat /tmp/tmp.dYtYQKUXHw ++ rm /tmp/tmp.nFiuwse92U /tmp/tmp.dYtYQKUXHw ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.zwuN2frISy +++ mktemp ++ local LAST_ERR=/tmp/tmp.PVLnRCfOKR ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="rs1")].hidden.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="rs1")].hidden.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="rs1")].hidden.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.zwuN2frISy ++ cat /tmp/tmp.PVLnRCfOKR ++ rm /tmp/tmp.zwuN2frISy /tmp/tmp.PVLnRCfOKR ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster some-name to be ready + wait_for_running some-name-rs2 3 + local name=some-name-rs2 + let last_pod=2 + local check_cluster_readiness=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.7nanj93toA +++ mktemp ++ local LAST_ERR=/tmp/tmp.q9tv2asnAE ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="rs2")].arbiter.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="rs2")].arbiter.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="rs2")].arbiter.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs2")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.7nanj93toA ++ cat /tmp/tmp.q9tv2asnAE ++ rm /tmp/tmp.7nanj93toA /tmp/tmp.q9tv2asnAE ++ 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.Jk3aLxdItz +++ mktemp ++ local LAST_ERR=/tmp/tmp.WuTnEz05y9 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="rs2")].nonvoting.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="rs2")].nonvoting.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="rs2")].nonvoting.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs2")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.Jk3aLxdItz ++ cat /tmp/tmp.WuTnEz05y9 ++ rm /tmp/tmp.Jk3aLxdItz /tmp/tmp.WuTnEz05y9 ++ return 0 + [[ true == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs2")].nonvoting.size}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.sXVVkWSKBx +++ mktemp ++ local LAST_ERR=/tmp/tmp.31xESBcH2s ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="rs2")].nonvoting.size}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="rs2")].nonvoting.size} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="rs2")].nonvoting.size} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs2")].nonvoting.size}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.sXVVkWSKBx ++ cat /tmp/tmp.31xESBcH2s ++ rm /tmp/tmp.sXVVkWSKBx /tmp/tmp.31xESBcH2s ++ return 0 + last_pod=2 ++ seq 0 2 + for i in $(seq 0 $last_pod) + wait_pod some-name-rs2-nv-0 + local pod=some-name-rs2-nv-0 + set +o xtrace waiting for pod/some-name-rs2-nv-0 to be ready.OK + for i in $(seq 0 $last_pod) + wait_pod some-name-rs2-nv-1 + local pod=some-name-rs2-nv-1 + set +o xtrace waiting for pod/some-name-rs2-nv-1 to be ready.OK + for i in $(seq 0 $last_pod) + wait_pod some-name-rs2-nv-2 + local pod=some-name-rs2-nv-2 + set +o xtrace waiting for pod/some-name-rs2-nv-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs2")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.I5ktBUnKFd +++ mktemp ++ local LAST_ERR=/tmp/tmp.ezZrGJ5kJA ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="rs2")].hidden.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="rs2")].hidden.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="rs2")].hidden.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs2")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.I5ktBUnKFd ++ cat /tmp/tmp.ezZrGJ5kJA ++ rm /tmp/tmp.I5ktBUnKFd /tmp/tmp.ezZrGJ5kJA ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster some-name to be ready + wait_for_running some-name-mongos 3 + local name=some-name-mongos + let last_pod=2 + local check_cluster_readiness=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.Fcb4uUUXhW +++ mktemp ++ local LAST_ERR=/tmp/tmp.x320HczTyZ ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.Fcb4uUUXhW ++ cat /tmp/tmp.x320HczTyZ ++ rm /tmp/tmp.Fcb4uUUXhW /tmp/tmp.x320HczTyZ ++ 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.2WIWm8Xu1f +++ mktemp ++ local LAST_ERR=/tmp/tmp.OFp9hcYj1J ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.2WIWm8Xu1f ++ cat /tmp/tmp.OFp9hcYj1J ++ rm /tmp/tmp.2WIWm8Xu1f /tmp/tmp.OFp9hcYj1J ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.74wVf4gXgh +++ mktemp ++ local LAST_ERR=/tmp/tmp.kc1PsXMeun ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-o' 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.74wVf4gXgh ++ cat /tmp/tmp.kc1PsXMeun ++ rm /tmp/tmp.74wVf4gXgh /tmp/tmp.kc1PsXMeun ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster some-name to be ready + 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-4333 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-4333 + local driver=mongodb + local suffix=.svc.cluster.local + local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + local port=27017 + local mongo_bin=mongo ++ awk -F: '{print $2}' ++ echo .svc.cluster.local + 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.bxkjlSiHk1 +++ mktemp ++ local LAST_ERR=/tmp/tmp.rZH1LErUae ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=psmdb-client' '-o' 'jsonpath={.items[].metadata.name}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ pods == \- ]] ++ [[ pods =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --selector=name=psmdb-client == \- ]] ++ [[ --selector=name=psmdb-client =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.items[].metadata.name} == \- ]] ++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.bxkjlSiHk1 ++ cat /tmp/tmp.rZH1LErUae ++ rm /tmp/tmp.bxkjlSiHk1 /tmp/tmp.rZH1LErUae ++ return 0 + local client_container=psmdb-client-748949c7cd-8zr8b + kubectl_bin exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ mktemp + local LAST_OUT=/tmp/tmp.jm0PzoRZJM ++ mktemp + local LAST_ERR=/tmp/tmp.ESsvN6EpAv + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-748949c7cd-8zr8b' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-748949c7cd-8zr8b == \- ]] + [[ psmdb-client-748949c7cd-8zr8b =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ bash == \- ]] + [[ bash =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ export HOME=/tmp; printf 'db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls == \- ]] + [[ export HOME=/tmp; printf 'db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.jm0PzoRZJM Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb {"t":{"$date":"2026-11-23T06:00:19.350Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} Implicit session: session { "id" : UUID("fa22af21-cbfb-4e1c-b2b3-3e334eff7e5d") } Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match Successfully added user: { "user" : "user", "roles" : [ { "db" : "app", "role" : "readWrite" } ] } bye + cat /tmp/tmp.ESsvN6EpAv + rm /tmp/tmp.jm0PzoRZJM /tmp/tmp.ESsvN6EpAv + 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-4333 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-4333 + local driver=mongodb + local suffix=.svc.cluster.local + local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + local port=27017 + local mongo_bin=mongo ++ awk -F: '{print $2}' ++ echo .svc.cluster.local + 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.JMktnhBvgn +++ mktemp ++ local LAST_ERR=/tmp/tmp.6M3W7rU0G8 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=psmdb-client' '-o' 'jsonpath={.items[].metadata.name}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ pods == \- ]] ++ [[ pods =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --selector=name=psmdb-client == \- ]] ++ [[ --selector=name=psmdb-client =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.items[].metadata.name} == \- ]] ++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.JMktnhBvgn ++ cat /tmp/tmp.6M3W7rU0G8 ++ rm /tmp/tmp.JMktnhBvgn /tmp/tmp.6M3W7rU0G8 ++ return 0 + local client_container=psmdb-client-748949c7cd-8zr8b + kubectl_bin exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use config\n db.settings.save( { _id:"chunksize", value: 32 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ mktemp + local LAST_OUT=/tmp/tmp.otolOI9WiF ++ mktemp + local LAST_ERR=/tmp/tmp.Vm2g1ULKmI + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-748949c7cd-8zr8b' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use config\n db.settings.save( { _id:"chunksize", value: 32 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-748949c7cd-8zr8b == \- ]] + [[ psmdb-client-748949c7cd-8zr8b =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ bash == \- ]] + [[ bash =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ export HOME=/tmp; printf 'use config\n db.settings.save( { _id:"chunksize", value: 32 } )\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls == \- ]] + [[ export HOME=/tmp; printf 'use config\n db.settings.save( { _id:"chunksize", value: 32 } )\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use config\n db.settings.save( { _id:"chunksize", value: 32 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.otolOI9WiF Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb {"t":{"$date":"2026-11-23T06:00:24.054Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} Implicit session: session { "id" : UUID("382d8e2c-b047-4461-9bef-d1c3ba6de2a4") } Percona Server for MongoDB server version: v8.3.17-5 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.Vm2g1ULKmI + rm /tmp/tmp.otolOI9WiF /tmp/tmp.Vm2g1ULKmI + return 0 + sleep 2 + desc 'write data' + set +o xtrace ----------------------------------------------------------------------------------- write data ----------------------------------------------------------------------------------- + run_script_mongos /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/data-sharded/data.js user:pass@some-name-mongos.data-sharded-4333 mongodb .svc.cluster.local '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + local script=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/data-sharded/data.js + local uri=user:pass@some-name-mongos.data-sharded-4333 + local driver=mongodb + local suffix=.svc.cluster.local + local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + local mongo_bin=mongo ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.ZuUBhvyFCz +++ mktemp ++ local LAST_ERR=/tmp/tmp.KLVQqOoQtu ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=psmdb-client' '-o' 'jsonpath={.items[].metadata.name}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ pods == \- ]] ++ [[ pods =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --selector=name=psmdb-client == \- ]] ++ [[ --selector=name=psmdb-client =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.items[].metadata.name} == \- ]] ++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.ZuUBhvyFCz ++ cat /tmp/tmp.KLVQqOoQtu ++ rm /tmp/tmp.ZuUBhvyFCz /tmp/tmp.KLVQqOoQtu ++ return 0 + local client_container=psmdb-client-748949c7cd-8zr8b ++ basename /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/data-sharded/data.js + name=data.js + kubectl_bin cp /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/data-sharded/data.js data-sharded-4333/psmdb-client-748949c7cd-8zr8b:/tmp ++ mktemp + local LAST_OUT=/tmp/tmp.LUBqJhRagG ++ mktemp + local LAST_ERR=/tmp/tmp.uYf18bqvjn + local exit_status=0 + local timeout=4 + local i + args=('cp' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/data-sharded/data.js' 'data-sharded-4333/psmdb-client-748949c7cd-8zr8b:/tmp') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ cp == \- ]] + [[ cp =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/data-sharded/data.js == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/data-sharded/data.js =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ data-sharded-4333/psmdb-client-748949c7cd-8zr8b:/tmp == \- ]] + [[ data-sharded-4333/psmdb-client-748949c7cd-8zr8b:/tmp =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl cp /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/data-sharded/data.js data-sharded-4333/psmdb-client-748949c7cd-8zr8b:/tmp + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.LUBqJhRagG + cat /tmp/tmp.uYf18bqvjn + rm /tmp/tmp.LUBqJhRagG /tmp/tmp.uYf18bqvjn + return 0 + kubectl_bin exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; mongo mongodb://user:pass@some-name-mongos.data-sharded-4333.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls /tmp/data.js' ++ mktemp + local LAST_OUT=/tmp/tmp.Jj1eTILm2e ++ mktemp + local LAST_ERR=/tmp/tmp.M5fbTr26qA + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-748949c7cd-8zr8b' '--' 'bash' '-c' 'export HOME=/tmp; mongo mongodb://user:pass@some-name-mongos.data-sharded-4333.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls /tmp/data.js') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-748949c7cd-8zr8b == \- ]] + [[ psmdb-client-748949c7cd-8zr8b =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ bash == \- ]] + [[ bash =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ export HOME=/tmp; mongo mongodb://user:pass@some-name-mongos.data-sharded-4333.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls /tmp/data.js == \- ]] + [[ export HOME=/tmp; mongo mongodb://user:pass@some-name-mongos.data-sharded-4333.svc.cluster.local/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls /tmp/data.js =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; mongo mongodb://user:pass@some-name-mongos.data-sharded-4333.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 ]] + break + cat /tmp/tmp.Jj1eTILm2e Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb {"t":{"$date":"2026-11-23T06:00:30.777Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} Implicit session: session { "id" : UUID("a4d1f1bf-6d43-4893-ab32-ad63de4e3603") } Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match + cat /tmp/tmp.M5fbTr26qA + rm /tmp/tmp.Jj1eTILm2e /tmp/tmp.M5fbTr26qA + return 0 + desc 'shard collection' + set +o xtrace ----------------------------------------------------------------------------------- shard collection ----------------------------------------------------------------------------------- + run_mongos 'sh.enableSharding("app")' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333 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-4333 + local driver=mongodb + local suffix=.svc.cluster.local + local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + local port=27017 + local mongo_bin=mongo ++ awk -F: '{print $2}' ++ echo .svc.cluster.local + 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.odGqcsIce2 +++ mktemp ++ local LAST_ERR=/tmp/tmp.duLv2E1ddo ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=psmdb-client' '-o' 'jsonpath={.items[].metadata.name}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ pods == \- ]] ++ [[ pods =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --selector=name=psmdb-client == \- ]] ++ [[ --selector=name=psmdb-client =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.items[].metadata.name} == \- ]] ++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.odGqcsIce2 ++ cat /tmp/tmp.duLv2E1ddo ++ rm /tmp/tmp.odGqcsIce2 /tmp/tmp.duLv2E1ddo ++ return 0 + local client_container=psmdb-client-748949c7cd-8zr8b + kubectl_bin exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''sh.enableSharding("app")\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ mktemp + local LAST_OUT=/tmp/tmp.Vbn35gYcnP ++ mktemp + local LAST_ERR=/tmp/tmp.595Wy1BLoM + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-748949c7cd-8zr8b' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''sh.enableSharding("app")\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-748949c7cd-8zr8b == \- ]] + [[ psmdb-client-748949c7cd-8zr8b =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ bash == \- ]] + [[ bash =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ export HOME=/tmp; printf 'sh.enableSharding("app")\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls == \- ]] + [[ export HOME=/tmp; printf 'sh.enableSharding("app")\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''sh.enableSharding("app")\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.Vbn35gYcnP Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb {"t":{"$date":"2026-11-23T06:02:48.722Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} Implicit session: session { "id" : UUID("969b4561-785b-4de3-a3ec-c0e6dedcda8d") } Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match { "ok" : 1, "$clusterTime" : { "clusterTime" : Timestamp(1795413768, 4), "signature" : { "hash" : BinData(0,"aoMXTMd5zKtDdI2Wh+Z8jOnRjSs="), "keyId" : NumberLong("7711241986124021789") } }, "operationTime" : Timestamp(1795413768, 4) } bye + cat /tmp/tmp.595Wy1BLoM + rm /tmp/tmp.Vbn35gYcnP /tmp/tmp.595Wy1BLoM + return 0 + sleep 2 + run_mongos 'sh.shardCollection("app.city", { _id: 1 } )' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333 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-4333 + local driver=mongodb + local suffix=.svc.cluster.local + local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + local port=27017 + local mongo_bin=mongo ++ 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.C7mgAC4rY4 +++ mktemp ++ local LAST_ERR=/tmp/tmp.CSgbfKaRAW ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=psmdb-client' '-o' 'jsonpath={.items[].metadata.name}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ pods == \- ]] ++ [[ pods =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --selector=name=psmdb-client == \- ]] ++ [[ --selector=name=psmdb-client =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.items[].metadata.name} == \- ]] ++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.C7mgAC4rY4 ++ cat /tmp/tmp.CSgbfKaRAW ++ rm /tmp/tmp.C7mgAC4rY4 /tmp/tmp.CSgbfKaRAW ++ return 0 + local client_container=psmdb-client-748949c7cd-8zr8b + kubectl_bin exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''sh.shardCollection("app.city", { _id: 1 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ mktemp + local LAST_OUT=/tmp/tmp.PrDjX3DWcj ++ mktemp + local LAST_ERR=/tmp/tmp.hB7dZdk40f + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-748949c7cd-8zr8b' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''sh.shardCollection("app.city", { _id: 1 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-748949c7cd-8zr8b == \- ]] + [[ psmdb-client-748949c7cd-8zr8b =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ bash == \- ]] + [[ bash =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ export HOME=/tmp; printf 'sh.shardCollection("app.city", { _id: 1 } )\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls == \- ]] + [[ export HOME=/tmp; printf 'sh.shardCollection("app.city", { _id: 1 } )\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''sh.shardCollection("app.city", { _id: 1 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.PrDjX3DWcj Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb {"t":{"$date":"2026-11-23T06:02:53.257Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} Implicit session: session { "id" : UUID("5eff1390-ad3d-4dda-8cac-f20f87e90dca") } Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match { "collectionsharded" : "app.city", "ok" : 1, "$clusterTime" : { "clusterTime" : Timestamp(1795413773, 38), "signature" : { "hash" : BinData(0,"4AoUwL/beo3eSAAIsRo8aq/8g4o="), "keyId" : NumberLong("7711241986124021789") } }, "operationTime" : Timestamp(1795413773, 37) } bye + cat /tmp/tmp.hB7dZdk40f + rm /tmp/tmp.PrDjX3DWcj /tmp/tmp.hB7dZdk40f + return 0 + sleep 120 + desc 'check chunks' + set +o xtrace ----------------------------------------------------------------------------------- check chunks ----------------------------------------------------------------------------------- + chunks_param1=ns + chunks_param2='"app.city"' + [[ 8.3 != 4\.4 ]] + chunks_param1=uuid ++ run_mongos 'use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid' user:pass@some-name-mongos.data-sharded-4333 '' '' '--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-4333 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ local port=27017 ++ local mongo_bin=mongo ++ grep 'switched to db app' -A 1 ++ grep -v 'switched to db app' +++ 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.G1VZUKslmd ++++ mktemp +++ local LAST_ERR=/tmp/tmp.X5PnS4UO4y +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'pods' '--selector=name=psmdb-client' '-o' 'jsonpath={.items[].metadata.name}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ pods == \- ]] +++ [[ pods =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ --selector=name=psmdb-client == \- ]] +++ [[ --selector=name=psmdb-client =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.items[].metadata.name} == \- ]] +++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] +++ arch_scheduling_enabled +++ [[ -n '' ]] +++ arch_scheduling_enabled +++ [[ -n '' ]] +++ local attempt +++ local delay ++++ seq 0 9 +++ for attempt in $(seq 0 9) +++ set +e +++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.G1VZUKslmd +++ cat /tmp/tmp.X5PnS4UO4y +++ rm /tmp/tmp.G1VZUKslmd /tmp/tmp.X5PnS4UO4y +++ return 0 ++ local client_container=psmdb-client-748949c7cd-8zr8b ++ kubectl_bin exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid\n'\'' | mongo mongodb://user:pass@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' +++ mktemp ++ local LAST_OUT=/tmp/tmp.iEiFiC9eVH +++ mktemp ++ local LAST_ERR=/tmp/tmp.LMntV1bXF6 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-748949c7cd-8zr8b' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid\n'\'' | mongo mongodb://user:pass@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-748949c7cd-8zr8b == \- ]] ++ [[ psmdb-client-748949c7cd-8zr8b =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -- == \- ]] ++ [[ -- =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ bash == \- ]] ++ [[ bash =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -c == \- ]] ++ [[ -c =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ export HOME=/tmp; printf 'use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid\n' | mongo mongodb://user:pass@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls == \- ]] ++ [[ export HOME=/tmp; printf 'use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid\n' | mongo mongodb://user:pass@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid\n'\'' | mongo mongodb://user:pass@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.iEiFiC9eVH ++ cat /tmp/tmp.LMntV1bXF6 ++ rm /tmp/tmp.iEiFiC9eVH /tmp/tmp.LMntV1bXF6 ++ return 0 + chunks_param2='UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853")' + shards=0 + for i in "rs0" "rs1" "rs2" ++ grep 'switched to db config' -A 1 ++ run_mongos 'use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs0"})' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333 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("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs0"})' ++ local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ local port=27017 ++ local mongo_bin=mongo ++ grep -v 'switched to db config' +++ 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.GusYXLosAm ++++ mktemp +++ local LAST_ERR=/tmp/tmp.qL0KQKsilo +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'pods' '--selector=name=psmdb-client' '-o' 'jsonpath={.items[].metadata.name}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ pods == \- ]] +++ [[ pods =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ --selector=name=psmdb-client == \- ]] +++ [[ --selector=name=psmdb-client =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.items[].metadata.name} == \- ]] +++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] +++ arch_scheduling_enabled +++ [[ -n '' ]] +++ arch_scheduling_enabled +++ [[ -n '' ]] +++ local attempt +++ local delay ++++ seq 0 9 +++ for attempt in $(seq 0 9) +++ set +e +++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.GusYXLosAm +++ cat /tmp/tmp.qL0KQKsilo +++ rm /tmp/tmp.GusYXLosAm /tmp/tmp.qL0KQKsilo +++ return 0 ++ local client_container=psmdb-client-748949c7cd-8zr8b ++ kubectl_bin exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs0"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' +++ mktemp ++ local LAST_OUT=/tmp/tmp.2CmAZIZCTq +++ mktemp ++ local LAST_ERR=/tmp/tmp.JDSR1uamLm ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-748949c7cd-8zr8b' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs0"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-748949c7cd-8zr8b == \- ]] ++ [[ psmdb-client-748949c7cd-8zr8b =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -- == \- ]] ++ [[ -- =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ bash == \- ]] ++ [[ bash =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -c == \- ]] ++ [[ -c =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ export HOME=/tmp; printf 'use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs0"})\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls == \- ]] ++ [[ export HOME=/tmp; printf 'use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs0"})\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs0"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.2CmAZIZCTq ++ cat /tmp/tmp.JDSR1uamLm ++ rm /tmp/tmp.2CmAZIZCTq /tmp/tmp.JDSR1uamLm ++ 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("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs1"})' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333 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("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs1"})' ++ local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ local port=27017 ++ local mongo_bin=mongo ++ grep -v 'switched to db config' +++ 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.VufXeKw19z ++++ mktemp +++ local LAST_ERR=/tmp/tmp.XyeV5tDRKk +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'pods' '--selector=name=psmdb-client' '-o' 'jsonpath={.items[].metadata.name}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ pods == \- ]] +++ [[ pods =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ --selector=name=psmdb-client == \- ]] +++ [[ --selector=name=psmdb-client =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.items[].metadata.name} == \- ]] +++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] +++ arch_scheduling_enabled +++ [[ -n '' ]] +++ arch_scheduling_enabled +++ [[ -n '' ]] +++ local attempt +++ local delay ++++ seq 0 9 +++ for attempt in $(seq 0 9) +++ set +e +++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.VufXeKw19z +++ cat /tmp/tmp.XyeV5tDRKk +++ rm /tmp/tmp.VufXeKw19z /tmp/tmp.XyeV5tDRKk +++ return 0 ++ local client_container=psmdb-client-748949c7cd-8zr8b ++ kubectl_bin exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs1"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' +++ mktemp ++ local LAST_OUT=/tmp/tmp.dCG6pxttru +++ mktemp ++ local LAST_ERR=/tmp/tmp.VfWCf24PG5 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-748949c7cd-8zr8b' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs1"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-748949c7cd-8zr8b == \- ]] ++ [[ psmdb-client-748949c7cd-8zr8b =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -- == \- ]] ++ [[ -- =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ bash == \- ]] ++ [[ bash =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -c == \- ]] ++ [[ -c =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ export HOME=/tmp; printf 'use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs1"})\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls == \- ]] ++ [[ export HOME=/tmp; printf 'use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs1"})\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs1"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.dCG6pxttru ++ cat /tmp/tmp.VfWCf24PG5 ++ rm /tmp/tmp.dCG6pxttru /tmp/tmp.VfWCf24PG5 ++ 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("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs2"})' clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333 mongodb .svc.cluster.local '--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ grep 'switched to db config' -A 1 ++ grep -v 'switched to db config' ++ local 'command=use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs2"})' ++ local uri=clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ local port=27017 ++ local mongo_bin=mongo +++ 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.8C2aV0WywY ++++ mktemp +++ local LAST_ERR=/tmp/tmp.XBB0vzUHFu +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'pods' '--selector=name=psmdb-client' '-o' 'jsonpath={.items[].metadata.name}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ pods == \- ]] +++ [[ pods =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ --selector=name=psmdb-client == \- ]] +++ [[ --selector=name=psmdb-client =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.items[].metadata.name} == \- ]] +++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] +++ arch_scheduling_enabled +++ [[ -n '' ]] +++ arch_scheduling_enabled +++ [[ -n '' ]] +++ local attempt +++ local delay ++++ seq 0 9 +++ for attempt in $(seq 0 9) +++ set +e +++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.8C2aV0WywY +++ cat /tmp/tmp.XBB0vzUHFu +++ rm /tmp/tmp.8C2aV0WywY /tmp/tmp.XBB0vzUHFu +++ return 0 ++ local client_container=psmdb-client-748949c7cd-8zr8b ++ kubectl_bin exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs2"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' +++ mktemp ++ local LAST_OUT=/tmp/tmp.FuzZbz3pSE +++ mktemp ++ local LAST_ERR=/tmp/tmp.OvfFJfoZVh ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-748949c7cd-8zr8b' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs2"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-748949c7cd-8zr8b == \- ]] ++ [[ psmdb-client-748949c7cd-8zr8b =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -- == \- ]] ++ [[ -- =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ bash == \- ]] ++ [[ bash =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -c == \- ]] ++ [[ -c =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ export HOME=/tmp; printf 'use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs2"})\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls == \- ]] ++ [[ export HOME=/tmp; printf 'use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs2"})\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("50b2aaae-c13c-4b83-bcb0-254fd1e90853"), "shard": "rs2"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.FuzZbz3pSE ++ cat /tmp/tmp.OvfFJfoZVh ++ rm /tmp/tmp.FuzZbz3pSE /tmp/tmp.OvfFJfoZVh ++ 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-4333 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-4333 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local 'mongo_flag=--tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ local port=27017 ++ local mongo_bin=mongo +++ 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.Anuz5CAh7N ++++ mktemp +++ local LAST_ERR=/tmp/tmp.4P6yxO4veR +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'pods' '--selector=name=psmdb-client' '-o' 'jsonpath={.items[].metadata.name}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ pods == \- ]] +++ [[ pods =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ --selector=name=psmdb-client == \- ]] +++ [[ --selector=name=psmdb-client =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.items[].metadata.name} == \- ]] +++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] +++ arch_scheduling_enabled +++ [[ -n '' ]] +++ arch_scheduling_enabled +++ [[ -n '' ]] +++ local attempt +++ local delay ++++ seq 0 9 +++ for attempt in $(seq 0 9) +++ set +e +++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.Anuz5CAh7N +++ cat /tmp/tmp.4P6yxO4veR +++ rm /tmp/tmp.Anuz5CAh7N /tmp/tmp.4P6yxO4veR +++ return 0 ++ local client_container=psmdb-client-748949c7cd-8zr8b ++ kubectl_bin exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use app\n db.dropDatabase()\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' +++ mktemp ++ local LAST_OUT=/tmp/tmp.DY60KHO7PV +++ mktemp ++ local LAST_ERR=/tmp/tmp.vCDuJdeTUs ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-748949c7cd-8zr8b' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use app\n db.dropDatabase()\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-748949c7cd-8zr8b == \- ]] ++ [[ psmdb-client-748949c7cd-8zr8b =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -- == \- ]] ++ [[ -- =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ bash == \- ]] ++ [[ bash =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -c == \- ]] ++ [[ -c =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ export HOME=/tmp; printf 'use app\n db.dropDatabase()\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls == \- ]] ++ [[ export HOME=/tmp; printf 'use app\n db.dropDatabase()\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl exec psmdb-client-748949c7cd-8zr8b -- bash -c 'export HOME=/tmp; printf '\''use app\n db.dropDatabase()\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.DY60KHO7PV ++ cat /tmp/tmp.vCDuJdeTUs ++ rm /tmp/tmp.DY60KHO7PV /tmp/tmp.vCDuJdeTUs ++ return 0 + res=$'Percona Server for MongoDB shell version v4.4.29-28\nconnecting to: mongodb://some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb\n{"t":{"$date":"2026-11-23T06:05:05.345Z"},"s":"I", "c":"NETWORK", "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"}\nImplicit session: session { "id" : UUID("2a70e00f-8fde-4134-9418-6b8744575e1d") }\nPercona Server for MongoDB server version: v8.3.17-5\nWARNING: shell and server versions do not match\nswitched to db app\n{\n\t"ok" : 1,\n\t"$clusterTime" : {\n\t\t"clusterTime" : Timestamp(1795413905, 73),\n\t\t"signature" : {\n\t\t\t"hash" : BinData(0,"j3dGPn5mZWiwRtzH7IoIUohoeQg="),\n\t\t\t"keyId" : NumberLong("7711241986124021789")\n\t\t}\n\t},\n\t"operationTime" : Timestamp(1795413905, 73)\n}\nbye' + grep -q '"ok" : 1' + echo Percona Server for MongoDB shell version v4.4.29-28 connecting to: 'mongodb://some-name-mongos.data-sharded-4333.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb' '{"t":{"$date":"2026-11-23T06:05:05.345Z"},"s":"I",' '"c":"NETWORK",' '"id":5490002,' '"ctx":"thread1","msg":"Started' a new thread for the timer 'service"}' Implicit session: session '{' '"id"' : 'UUID("2a70e00f-8fde-4134-9418-6b8744575e1d")' '}' Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match switched to db app '{' '"ok"' : 1, '"$clusterTime"' : '{' '"clusterTime"' : 'Timestamp(1795413905,' '73),' '"signature"' : '{' '"hash"' : 'BinData(0,"j3dGPn5mZWiwRtzH7IoIUohoeQg="),' '"keyId"' : 'NumberLong("7711241986124021789")' '}' '},' '"operationTime"' : 'Timestamp(1795413905,' '73)' '}' bye + 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.Qwb8UORh0A +++ mktemp ++ local LAST_ERR=/tmp/tmp.mp4zoH8yVh ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-ojson') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -ojson == \- ]] ++ [[ -ojson =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -ojson ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.Qwb8UORh0A ++ cat /tmp/tmp.mp4zoH8yVh ++ rm /tmp/tmp.Qwb8UORh0A /tmp/tmp.mp4zoH8yVh ++ 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.PDUotgp6j3 ++ mktemp + local LAST_ERR=/tmp/tmp.QBHVy9d7rh + local exit_status=0 + local timeout=4 + local i + args=('patch' 'psmdb' 'some-name' '--type=json' '-p=[{'\''op'\'': '\''remove'\'', '\''path'\'': '\''/spec/replsets/1'\''}]') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ patch == \- ]] + [[ patch =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb == \- ]] + [[ psmdb =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ some-name == \- ]] + [[ some-name =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --type=json == \- ]] + [[ --type=json =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -p=[{'op': 'remove', 'path': '/spec/replsets/1'}] == \- ]] + [[ -p=[{'op': 'remove', 'path': '/spec/replsets/1'}] =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl patch psmdb some-name --type=json '-p=[{'\''op'\'': '\''remove'\'', '\''path'\'': '\''/spec/replsets/1'\''}]' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.PDUotgp6j3 perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.QBHVy9d7rh + rm /tmp/tmp.PDUotgp6j3 /tmp/tmp.QBHVy9d7rh + 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.gP23EHgmOe +++ mktemp ++ local LAST_ERR=/tmp/tmp.gDAJQNnNpr ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'sts' '-l' 'app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs1' '-ojson') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ sts == \- ]] ++ [[ sts =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -l == \- ]] ++ [[ -l =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs1 == \- ]] ++ [[ app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs1 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -ojson == \- ]] ++ [[ -ojson =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ 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 ]] ++ break ++ cat /tmp/tmp.gP23EHgmOe ++ cat /tmp/tmp.gDAJQNnNpr ++ rm /tmp/tmp.gP23EHgmOe /tmp/tmp.gDAJQNnNpr ++ 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.Y9huoy7GuD +++ mktemp ++ local LAST_ERR=/tmp/tmp.lwlYuNp5sG ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'sts' '-l' 'app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs1' '-ojson') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ sts == \- ]] ++ [[ sts =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -l == \- ]] ++ [[ -l =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs1 == \- ]] ++ [[ app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs1 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -ojson == \- ]] ++ [[ -ojson =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ 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 ]] ++ break ++ cat /tmp/tmp.Y9huoy7GuD ++ cat /tmp/tmp.lwlYuNp5sG ++ rm /tmp/tmp.Y9huoy7GuD /tmp/tmp.lwlYuNp5sG ++ 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.pcz5uqLNg2 +++ mktemp ++ local LAST_ERR=/tmp/tmp.HUjfDDsdvf ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'some-name' '-ojson') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ some-name == \- ]] ++ [[ some-name =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -ojson == \- ]] ++ [[ -ojson =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb some-name -ojson ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.pcz5uqLNg2 ++ cat /tmp/tmp.HUjfDDsdvf ++ rm /tmp/tmp.pcz5uqLNg2 /tmp/tmp.HUjfDDsdvf ++ 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.QVkCLDrnZW ++ mktemp + local LAST_ERR=/tmp/tmp.T4Oj84sdgl + local exit_status=0 + local timeout=4 + local i + args=('patch' 'psmdb' 'some-name' '--type=json' '-p=[{'\''op'\'': '\''remove'\'', '\''path'\'': '\''/spec/replsets/1'\''}]') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ patch == \- ]] + [[ patch =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb == \- ]] + [[ psmdb =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ some-name == \- ]] + [[ some-name =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --type=json == \- ]] + [[ --type=json =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -p=[{'op': 'remove', 'path': '/spec/replsets/1'}] == \- ]] + [[ -p=[{'op': 'remove', 'path': '/spec/replsets/1'}] =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl patch psmdb some-name --type=json '-p=[{'\''op'\'': '\''remove'\'', '\''path'\'': '\''/spec/replsets/1'\''}]' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.QVkCLDrnZW perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.T4Oj84sdgl + rm /tmp/tmp.QVkCLDrnZW /tmp/tmp.T4Oj84sdgl + return 0 + echo -n 'Deleting replset rs2' Deleting replset rs2++ 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.fcpDbPjr5Q +++ mktemp ++ local LAST_ERR=/tmp/tmp.74pbV8ZF70 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'sts' '-l' 'app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs2' '-ojson') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ sts == \- ]] ++ [[ sts =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -l == \- ]] ++ [[ -l =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs2 == \- ]] ++ [[ app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs2 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -ojson == \- ]] ++ [[ -ojson =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ 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 ]] ++ break ++ cat /tmp/tmp.fcpDbPjr5Q ++ cat /tmp/tmp.74pbV8ZF70 ++ rm /tmp/tmp.fcpDbPjr5Q /tmp/tmp.74pbV8ZF70 ++ return 0 + [[ 1 -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.PITGva8PHq +++ mktemp ++ local LAST_ERR=/tmp/tmp.dc08yiLa8R ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'sts' '-l' 'app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs2' '-ojson') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ sts == \- ]] ++ [[ sts =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -l == \- ]] ++ [[ -l =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs2 == \- ]] ++ [[ app.kubernetes.io/instance=some-name,app.kubernetes.io/replset=rs2 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -ojson == \- ]] ++ [[ -ojson =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ 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 ]] ++ break ++ cat /tmp/tmp.PITGva8PHq ++ cat /tmp/tmp.dc08yiLa8R ++ rm /tmp/tmp.PITGva8PHq /tmp/tmp.dc08yiLa8R ++ return 0 + [[ 0 -eq 0 ]] + echo OK OK + destroy data-sharded-4333 + local namespace=data-sharded-4333 + local ignore_logs=true + [[ 1 == 1 ]] + echo 'SKIP_DELETE=1, not destroying data-sharded-4333' SKIP_DELETE=1, not destroying data-sharded-4333 + return + desc 'test passed' + set +o xtrace ----------------------------------------------------------------------------------- test passed ----------------------------------------------------------------------------------- ==================================================================================================== [PASSED] e2e-tests/test_pytest_wrapper.py::test_bash_wrapper ==================================================================================================== [06:06:16.004056] INFO Deleting cert-manager [06:06:41.463265] INFO Cleaning up test environment ---------------------------------------------- generated xml file: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/reports/data-sharded.xml ---------------------------------------------- ---------------------------------------- Generated html report: file:///mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/reports/data-sharded.html ----------------------------------------- ==================================================================================== 1 passed in 931.20s (0:15:31) =====================================================================================