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-2742/.venv/bin/python cachedir: .pytest_cache metadata: {'Python': '3.14.10', 'Platform': 'Linux-7.1.6-201.fc44.x86_64-x86_64-with-glibc2.43', 'Packages': {'pytest': '9.1.1', 'pluggy': '1.7.0'}, 'Plugins': {'json-report': '1.5.0', 'dependency': '0.6.1', 'html': '4.2.0', 'metadata': '3.1.1'}, 'CI': 'true', 'BUILD_NUMBER': '2', 'BUILD_ID': '2', 'BUILD_URL': 'https://cloud.cd.percona.com/job/cloud-psmdb-operator/job/PR-2742/2/', 'NODE_NAME': 'hcloud-bfkncubytbaldetv', 'JOB_NAME': 'cloud-psmdb-operator/PR-2742', 'BUILD_TAG': 'jenkins-cloud-psmdb-operator-PR-2742-2', 'EXECUTOR_NUMBER': '0', 'JENKINS_URL': 'https://cloud.cd.percona.com/', 'WORKSPACE': '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742', 'GIT_COMMIT': 'cf134fefe3b251937747923cc1a37f3d6e0fa43f', 'GIT_URL': 'https://github.com/percona/percona-server-mongodb-operator.git', 'GIT_BRANCH': 'PR-2742'} rootdir: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742 configfile: pyproject.toml plugins: json-report-1.5.0, dependency-0.6.1, html-4.2.0, metadata-3.1.1 collecting ... collected 1 item e2e-tests/test_pytest_wrapper.py::test_bash_wrapper[cross-site-sharded] [09:07:30.753334] WARNING kubectl error: Warning: version difference between client (1.37) and server (1.34) exceeds the supported minor version skew of +/-1 [09:07:31.977386] 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=cf134fefe3b251937747923cc1a37f3d6e0fa43f GIT_BRANCH=PR-2742 OPERATOR_VERSION=1.24.0 IMAGE=docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe 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. ++ get_mongod_ver_from_image docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 ++ local image=docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 +++ run_simple_cli_inside_image docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 'mongod --version' +++ local image=docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 +++ local 'cli=mongod --version' +++ local pod_name=17426 +++ run_args=() +++ local run_args +++ arch_scheduling_enabled +++ [[ -n '' ]] +++ kubectl_bin -n default run 17426 --image=docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 --restart=Never --command -- sleep infinity +++ /usr/sbin/sed -r 's/^.*db version v(([0-9]+\.){2}[0-9]+-[0-9]+).*$/\1/g' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.YEDzHMSOow ++++ mktemp +++ local LAST_ERR=/tmp/tmp.vPi2e09lMS +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('-n' 'default' 'run' '17426' '--image=docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3' '--restart=Never' '--command' '--' 'sleep' 'infinity') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ -n == \- ]] +++ [[ -n =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ default == \- ]] +++ [[ default =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ run == \- ]] +++ [[ run =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ 17426 == \- ]] +++ [[ 17426 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ --image=docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 == \- ]] +++ [[ --image=docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ --restart=Never == \- ]] +++ [[ --restart=Never =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ --command == \- ]] +++ [[ --command =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -- == \- ]] +++ [[ -- =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ sleep == \- ]] +++ [[ sleep =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ infinity == \- ]] +++ [[ infinity =~ ^(-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 default run 17426 --image=docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 --restart=Never --command -- sleep infinity +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.YEDzHMSOow +++ cat /tmp/tmp.vPi2e09lMS Warning: BCID failed open: BCID suppressed until 2026-11-24 12:05:25.621210599 +0000 UTC m=+10855.013876711 +++ rm /tmp/tmp.YEDzHMSOow /tmp/tmp.vPi2e09lMS +++ return 0 +++ kubectl_bin -n default wait --for=condition=Ready pod/17426 ++++ mktemp +++ local LAST_OUT=/tmp/tmp.m1dj9z1x3Y ++++ mktemp +++ local LAST_ERR=/tmp/tmp.sKt5kpOsyC +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('-n' 'default' 'wait' '--for=condition=Ready' 'pod/17426') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ -n == \- ]] +++ [[ -n =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ default == \- ]] +++ [[ default =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ wait == \- ]] +++ [[ wait =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ --for=condition=Ready == \- ]] +++ [[ --for=condition=Ready =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ pod/17426 == \- ]] +++ [[ pod/17426 =~ ^(-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 default wait --for=condition=Ready pod/17426 +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.m1dj9z1x3Y +++ cat /tmp/tmp.sKt5kpOsyC +++ rm /tmp/tmp.m1dj9z1x3Y /tmp/tmp.sKt5kpOsyC +++ return 0 ++++ kubectl_bin -n default exec 17426 -- bash -c 'mongod --version 2>&1' +++++ mktemp ++++ local LAST_OUT=/tmp/tmp.WC30btwG1M +++++ mktemp ++++ local LAST_ERR=/tmp/tmp.pyB7GITx6Y ++++ local exit_status=0 ++++ local timeout=4 ++++ local i ++++ args=('-n' 'default' 'exec' '17426' '--' 'bash' '-c' 'mongod --version 2>&1') ++++ local args ++++ transformed_files=() ++++ local transformed_files ++++ local stdin_manifest ++++ for i in "${!args[@]}" ++++ [[ -n == \- ]] ++++ [[ -n =~ ^(-f|--filename)=-$ ]] ++++ for i in "${!args[@]}" ++++ [[ default == \- ]] ++++ [[ default =~ ^(-f|--filename)=-$ ]] ++++ for i in "${!args[@]}" ++++ [[ exec == \- ]] ++++ [[ exec =~ ^(-f|--filename)=-$ ]] ++++ for i in "${!args[@]}" ++++ [[ 17426 == \- ]] ++++ [[ 17426 =~ ^(-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[@]}" ++++ [[ mongod --version 2>&1 == \- ]] ++++ [[ mongod --version 2>&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 -n default exec 17426 -- bash -c 'mongod --version 2>&1' ++++ exit_status=0 ++++ set -e ++++ [[ 0 == 0 ]] ++++ break ++++ cat /tmp/tmp.WC30btwG1M ++++ cat /tmp/tmp.pyB7GITx6Y ++++ rm /tmp/tmp.WC30btwG1M /tmp/tmp.pyB7GITx6Y ++++ return 0 +++ local $'output=db version v8.3.17-5\nBuild Info: {\n "version": "8.3.17-5",\n "gitVersion": "f8ded53966b12cc6630a387f33a48c908b918c5e",\n "openSSLVersion": "OpenSSL 3.5.9 29 Sep 2026",\n "modules": [],\n "perconaFeatures": [\n "MemoryEngine",\n "HotBackup",\n "BackupCursorAggregationStage",\n "BackupCursorExtendAggregationStage",\n "AWSIAM",\n "Kerberos",\n "LDAP",\n "OIDC",\n "TDE",\n "FIPSMode",\n "FCBIS",\n "Auditing",\n "ProfilingRateLimit",\n "LogRedaction",\n "ngram"\n ],\n "allocator": "tcmalloc-google",\n "environment": {\n "distarch": "x86_64",\n "target_arch": "x86_64"\n }\n}' +++ kubectl_bin -n default delete pod/17426 --grace-period=0 --force ++++ mktemp +++ local LAST_OUT=/tmp/tmp.mpcj13rWGm ++++ mktemp +++ local LAST_ERR=/tmp/tmp.73NaflKT0S +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('-n' 'default' 'delete' 'pod/17426' '--grace-period=0' '--force') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ -n == \- ]] +++ [[ -n =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ default == \- ]] +++ [[ default =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ delete == \- ]] +++ [[ delete =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ pod/17426 == \- ]] +++ [[ pod/17426 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ --grace-period=0 == \- ]] +++ [[ --grace-period=0 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ --force == \- ]] +++ [[ --force =~ ^(-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 default delete pod/17426 --grace-period=0 --force +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.mpcj13rWGm +++ cat /tmp/tmp.73NaflKT0S Warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely. +++ rm /tmp/tmp.mpcj13rWGm /tmp/tmp.73NaflKT0S +++ return 0 +++ echo db version v8.3.17-5 Build Info: '{' '"version":' '"8.3.17-5",' '"gitVersion":' '"f8ded53966b12cc6630a387f33a48c908b918c5e",' '"openSSLVersion":' '"OpenSSL' 3.5.9 29 Sep '2026",' '"modules":' '[],' '"perconaFeatures":' '[' '"MemoryEngine",' '"HotBackup",' '"BackupCursorAggregationStage",' '"BackupCursorExtendAggregationStage",' '"AWSIAM",' '"Kerberos",' '"LDAP",' '"OIDC",' '"TDE",' '"FIPSMode",' '"FCBIS",' '"Auditing",' '"ProfilingRateLimit",' '"LogRedaction",' '"ngram"' '],' '"allocator":' '"tcmalloc-google",' '"environment":' '{' '"distarch":' '"x86_64",' '"target_arch":' '"x86_64"' '}' '}' ++ version_info=8.3.17-5 ++ [[ ! 8.3.17-5 =~ ^([0-9]+\.){2}[0-9]+-[0-9]+$ ]] ++ echo 8.3.17-5 + FULL_VER=8.3.17-5 + MONGO_VER=8.3 + unset OPERATOR_NS + main_cluster=cross-site-sharded-main + replica_cluster=cross-site-sharded-replica + desc 'create main cluster' + set +o xtrace ----------------------------------------------------------------------------------- create main cluster ----------------------------------------------------------------------------------- + create_infra cross-site-sharded-8852 + local ns=cross-site-sharded-8852 + echo cross-site-sharded-8852 + destroy_cert_manager + [[ -n '' ]] + kubectl_bin delete mutatingwebhookconfiguration cert-manager-webhook --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.8FwEL3ko6L ++ mktemp + local LAST_ERR=/tmp/tmp.iBWkIfeVbv + 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.8FwEL3ko6L + cat /tmp/tmp.iBWkIfeVbv + rm /tmp/tmp.8FwEL3ko6L /tmp/tmp.iBWkIfeVbv + return 0 + kubectl_bin delete validatingwebhookconfiguration cert-manager-webhook --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.0tIqwKVPhf ++ mktemp + local LAST_ERR=/tmp/tmp.B0ZmkYEjBP + 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.0tIqwKVPhf + cat /tmp/tmp.B0ZmkYEjBP + rm /tmp/tmp.0tIqwKVPhf /tmp/tmp.B0ZmkYEjBP + 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.sQtTbkfhOI ++ mktemp + local LAST_ERR=/tmp/tmp.bzrkfkyp3Q + 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.sQtTbkfhOI + cat /tmp/tmp.bzrkfkyp3Q + rm /tmp/tmp.sQtTbkfhOI /tmp/tmp.bzrkfkyp3Q + return 0 + kubectl_bin delete namespace cert-manager --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.lhk5lnPZXh ++ mktemp + local LAST_ERR=/tmp/tmp.iqdpR6962J + 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.lhk5lnPZXh + cat /tmp/tmp.iqdpR6962J + rm /tmp/tmp.lhk5lnPZXh /tmp/tmp.iqdpR6962J + 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.WVy1jYM7Wr +++ mktemp ++ local LAST_ERR=/tmp/tmp.Hbq7640PVa ++ 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.WVy1jYM7Wr ++ cat /tmp/tmp.Hbq7640PVa ++ rm /tmp/tmp.WVy1jYM7Wr /tmp/tmp.Hbq7640PVa ++ return 0 + remaining= ++ kubectl_bin get validatingwebhookconfiguration cert-manager-webhook --ignore-not-found -o name +++ mktemp ++ local LAST_OUT=/tmp/tmp.iq8LLms9vO +++ mktemp ++ local LAST_ERR=/tmp/tmp.gWsPIhp8UO ++ 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.iq8LLms9vO ++ cat /tmp/tmp.gWsPIhp8UO ++ rm /tmp/tmp.iq8LLms9vO /tmp/tmp.gWsPIhp8UO ++ 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.dz93rlcgm0 +++ mktemp ++ local LAST_ERR=/tmp/tmp.Ri2ebTPLow ++ 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.dz93rlcgm0 ++ cat /tmp/tmp.Ri2ebTPLow ++ rm /tmp/tmp.dz93rlcgm0 /tmp/tmp.Ri2ebTPLow ++ return 0 + remaining+= ++ kubectl_bin get namespace cert-manager --ignore-not-found -o name +++ mktemp ++ local LAST_OUT=/tmp/tmp.2CudJv21JD +++ mktemp ++ local LAST_ERR=/tmp/tmp.PNJ7JQ7Kga ++ 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.2CudJv21JD ++ cat /tmp/tmp.PNJ7JQ7Kga ++ rm /tmp/tmp.2CudJv21JD /tmp/tmp.PNJ7JQ7Kga ++ 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-2742/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.LUIqRbXurG ++ mktemp + local LAST_ERR=/tmp/tmp.0EHut7o3kd + local exit_status=0 + local timeout=4 + local i + args=('delete' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/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-2742/deploy/crd.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/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-2742/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.LUIqRbXurG + cat /tmp/tmp.0EHut7o3kd + rm /tmp/tmp.LUIqRbXurG /tmp/tmp.0EHut7o3kd + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml ++ grep -v '\-\-\-' grep: warning: stray \ before - grep: warning: stray \ before - + for crd_name in $(yq eval '.metadata.name' "${src_dir}/deploy/crd.yaml" | grep -v '\-\-\-') + grep -v NAMESPACE + kubectl get perconaservermongodbbackups.psmdb.percona.com --all-namespaces -o wide + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbbackups" 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 '\-\-\-') + kubectl get perconaservermongodbrestores.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbrestores.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbrestores" 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 '\-\-\-') + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbs" 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 '' ']' + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/rbac.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.z8xYe6fjvx ++ mktemp + local LAST_ERR=/tmp/tmp.hyXgGz1emU + local exit_status=0 + local timeout=4 + local i + args=('delete' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/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-2742/deploy/rbac.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/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-2742/deploy/rbac.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.z8xYe6fjvx + cat /tmp/tmp.hyXgGz1emU + rm /tmp/tmp.z8xYe6fjvx /tmp/tmp.hyXgGz1emU + return 0 + check_crd_for_deletion PR-2742 + local git_tag=PR-2742 ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-2742/deploy/crd.yaml ++ yq eval .metadata.name ++ /usr/sbin/sed ':a;N;$!ba;s/\n/ /g' ++ /usr/sbin/sed s/---//g + for crd_name in $(curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/${git_tag}/deploy/crd.yaml | yq eval '.metadata.name' | $sed 's/---//g' | $sed ':a;N;$!ba;s/\n/ /g') ++ kubectl_bin get crd/null -o 'jsonpath={.status.conditions[-1].type}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.rcFWfib45X +++ mktemp ++ local LAST_ERR=/tmp/tmp.ArCbeubzzh ++ 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.ArCbeubzzh ++ break ++ cat /tmp/tmp.rcFWfib45X ++ cat /tmp/tmp.ArCbeubzzh Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.rcFWfib45X /tmp/tmp.ArCbeubzzh ++ return 1 + [[ '' == Terminating ]] + '[' -n '' ']' + create_namespace cross-site-sharded-8852 + local namespace=cross-site-sharded-8852 + 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 ++ awk '{print $1}' ++ grep chaos-mesh + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ 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 + awk '{print$1}' + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + xargs kubectl delete ns + [[ -n '' ]] + desc 'cleaned up old namespaces cross-site-sharded-8852' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces cross-site-sharded-8852 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace cross-site-sharded-8852 --ignore-not-found ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.jRgmZn0Uyv ++ mktemp + local LAST_OUT=/tmp/tmp.HkS0bLdan4 + local LAST_ERR=/tmp/tmp.plTF1UlLNq ++ mktemp + 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_ERR=/tmp/tmp.gSjWZnX0V1 + local exit_status=0 + local timeout=4 + local i + args=('delete' 'namespace' 'cross-site-sharded-8852' '--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[@]}" + [[ cross-site-sharded-8852 == \- ]] + [[ cross-site-sharded-8852 =~ ^(-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 get ns + for attempt in $(seq 0 9) + set +e + kubectl delete namespace cross-site-sharded-8852 --ignore-not-found + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.jRgmZn0Uyv + cat /tmp/tmp.plTF1UlLNq + rm /tmp/tmp.jRgmZn0Uyv /tmp/tmp.plTF1UlLNq + return 0 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.HkS0bLdan4 + cat /tmp/tmp.gSjWZnX0V1 + rm /tmp/tmp.HkS0bLdan4 /tmp/tmp.gSjWZnX0V1 + return 0 + kubectl_bin wait --for=delete namespace cross-site-sharded-8852 ++ mktemp + local LAST_OUT=/tmp/tmp.wtAWTTNhpk ++ mktemp + local LAST_ERR=/tmp/tmp.58HPPhfPLC + local exit_status=0 + local timeout=4 + local i + args=('wait' '--for=delete' 'namespace' 'cross-site-sharded-8852') + 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[@]}" + [[ cross-site-sharded-8852 == \- ]] + [[ cross-site-sharded-8852 =~ ^(-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 cross-site-sharded-8852 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.wtAWTTNhpk + cat /tmp/tmp.58HPPhfPLC + rm /tmp/tmp.wtAWTTNhpk /tmp/tmp.58HPPhfPLC + return 0 + desc 'create namespace cross-site-sharded-8852' + set +o xtrace ----------------------------------------------------------------------------------- create namespace cross-site-sharded-8852 ----------------------------------------------------------------------------------- + kubectl_bin create namespace cross-site-sharded-8852 ++ mktemp + local LAST_OUT=/tmp/tmp.KR4xiiWB73 ++ mktemp + local LAST_ERR=/tmp/tmp.529INa4A42 + local exit_status=0 + local timeout=4 + local i + args=('create' 'namespace' 'cross-site-sharded-8852') + 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[@]}" + [[ cross-site-sharded-8852 == \- ]] + [[ cross-site-sharded-8852 =~ ^(-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 cross-site-sharded-8852 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.KR4xiiWB73 namespace/cross-site-sharded-8852 created + cat /tmp/tmp.529INa4A42 + rm /tmp/tmp.KR4xiiWB73 /tmp/tmp.529INa4A42 + return 0 + set_kube_ctx cross-site-sharded-8852 + local namespace=cross-site-sharded-8852 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.EZJR5k4WY0 +++ mktemp ++ local LAST_ERR=/tmp/tmp.7KOVzhjl6m ++ 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.EZJR5k4WY0 ++ cat /tmp/tmp.7KOVzhjl6m ++ rm /tmp/tmp.EZJR5k4WY0 /tmp/tmp.7KOVzhjl6m ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-8852 ++ mktemp + local LAST_OUT=/tmp/tmp.ptQgqtazRT ++ mktemp + local LAST_ERR=/tmp/tmp.gomAomierq + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5' '--namespace=cross-site-sharded-8852') + 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-2742-cf134fefe-2-cluster5 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --namespace=cross-site-sharded-8852 == \- ]] + [[ --namespace=cross-site-sharded-8852 =~ ^(-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-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-8852 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.ptQgqtazRT Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5" modified. + cat /tmp/tmp.gomAomierq + rm /tmp/tmp.ptQgqtazRT /tmp/tmp.gomAomierq + return 0 + deploy_operator + desc 'start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe' + set +o xtrace ----------------------------------------------------------------------------------- start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe ----------------------------------------------------------------------------------- + local cr_file + '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.idWYnZSLYz ++ mktemp + local LAST_ERR=/tmp/tmp.Wx4kQfVy0s + local exit_status=0 + local timeout=4 + local i + args=('apply' '--server-side' '--force-conflicts' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/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-2742/deploy/crd.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/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-2742/deploy/crd.yaml + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.idWYnZSLYz 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.Wx4kQfVy0s + rm /tmp/tmp.idWYnZSLYz /tmp/tmp.Wx4kQfVy0s + return 0 + '[' -n '' ']' + apply_rbac rbac + local operator_namespace=psmdb-operator + local rbac=rbac + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/rbac.yaml + kubectl_bin apply -f - + sed -e 's^namespace: .*^namespace: psmdb-operator^' ++ mktemp + local LAST_OUT=/tmp/tmp.9FgJhoN5rc ++ mktemp + local LAST_ERR=/tmp/tmp.RqyyZxSgcy + 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.QrwYCwRA2s + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.QrwYCwRA2s + 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.QrwYCwRA2s + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.9FgJhoN5rc role.rbac.authorization.k8s.io/percona-server-mongodb-operator created serviceaccount/percona-server-mongodb-operator created rolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator created + cat /tmp/tmp.RqyyZxSgcy + rm /tmp/tmp.9FgJhoN5rc /tmp/tmp.RqyyZxSgcy /tmp/tmp.QrwYCwRA2s + return 0 + yq eval $'\n\t\t\t(.spec.template.spec.containers[].image = "docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe") |\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-2742/deploy/operator.yaml + add_arch_to_podspecs - + arch_scheduling_enabled + [[ -n '' ]] + cat - + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.XClixhxDK5 ++ mktemp + return + local LAST_ERR=/tmp/tmp.7aNdWByFYa + 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.uWLCKKSFzZ + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.uWLCKKSFzZ + 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.uWLCKKSFzZ + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.XClixhxDK5 deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.7aNdWByFYa + rm /tmp/tmp.XClixhxDK5 /tmp/tmp.7aNdWByFYa /tmp/tmp.uWLCKKSFzZ + return 0 + sleep 20 ++ get_operator_pod ++ kubectl_bin get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.RJvhq5kcSp +++ mktemp ++ local LAST_ERR=/tmp/tmp.XNXhtisPcL ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=percona-server-mongodb-operator' '-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=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)=-$ ]] ++ 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}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.RJvhq5kcSp ++ cat /tmp/tmp.XNXhtisPcL ++ rm /tmp/tmp.RJvhq5kcSp /tmp/tmp.XNXhtisPcL ++ return 0 + wait_operator_pod percona-server-mongodb-operator-d6688b754-4dftl + local pod=percona-server-mongodb-operator-d6688b754-4dftl + set +o xtrace waiting for pod/percona-server-mongodb-operator-d6688b754-4dftl 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}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.qh9Tz2aLLk +++ mktemp ++ local LAST_ERR=/tmp/tmp.0Dwx3BC2Gs ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=percona-server-mongodb-operator' '-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=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)=-$ ]] ++ 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}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.qh9Tz2aLLk ++ cat /tmp/tmp.0Dwx3BC2Gs ++ rm /tmp/tmp.qh9Tz2aLLk /tmp/tmp.0Dwx3BC2Gs ++ return 0 + kubectl_bin logs percona-server-mongodb-operator-d6688b754-4dftl ++ mktemp + local LAST_OUT=/tmp/tmp.vmYEo49L3s ++ mktemp + local LAST_ERR=/tmp/tmp.4Marj5VVu8 + local exit_status=0 + local timeout=4 + local i + args=('logs' 'percona-server-mongodb-operator-d6688b754-4dftl') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ logs == \- ]] + [[ logs =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ percona-server-mongodb-operator-d6688b754-4dftl == \- ]] + [[ percona-server-mongodb-operator-d6688b754-4dftl =~ ^(-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 percona-server-mongodb-operator-d6688b754-4dftl + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.vmYEo49L3s + cat /tmp/tmp.4Marj5VVu8 + rm /tmp/tmp.vmYEo49L3s /tmp/tmp.4Marj5VVu8 + return 0 2026-11-24T09:08:51.652Z INFO setup Manager starting up {"gitCommit": "cf134fefe3b251937747923cc1a37f3d6e0fa43f", "gitBranch": "PR-2742-cf134fefe", "buildTime": "", "goVersion": "go1.27.4", "os": "linux", "arch": "amd64"} + 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-2742/e2e-tests/conf/client.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/conf/secrets.yml ++ mktemp + local LAST_OUT=/tmp/tmp.dT2lx7dOYK ++ mktemp + local LAST_ERR=/tmp/tmp.sXg3vy6MCL + local exit_status=0 + local timeout=4 + local i + args=('apply' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/client.yml' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/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-2742/e2e-tests/conf/client.yml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/client.yml =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/conf/secrets.yml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/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-2742/e2e-tests/conf/client.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/conf/secrets.yml + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.dT2lx7dOYK deployment.apps/psmdb-client created secret/cross-site-sharded-main-secrets created secret/cross-site-sharded-main-ssl created secret/cross-site-sharded-main-ssl-internal created + cat /tmp/tmp.sXg3vy6MCL + rm /tmp/tmp.dT2lx7dOYK /tmp/tmp.sXg3vy6MCL + return 0 + desc 'create main PSMDB cluster cross-site-sharded-main.' + set +o xtrace ----------------------------------------------------------------------------------- create main PSMDB cluster cross-site-sharded-main. ----------------------------------------------------------------------------------- + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/conf/cross-site-sharded-main.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/conf/cross-site-sharded-main.yml + kubectl_bin apply -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/conf/cross-site-sharded-main.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-2742-cf134fefe"' + yq eval '(.spec | select(has("backup"))).backup.image = "docker.io/perconalab/percona-server-mongodb-operator:main-backup"' + [[ -n docker.io/perconalab/fluentbit:main-logcollector ]] + IMAGE_LOGCOLLECTOR=docker.io/perconalab/fluentbit:main-logcollector + yq eval '(.spec | select(has("logcollector"))).logcollector.image = strenv(IMAGE_LOGCOLLECTOR)' + local LAST_OUT=/tmp/tmp.Z7vMsLGORS + /usr/sbin/sed -e s/NAME_SPACE/cross-site-sharded-8852/g ++ mktemp + yq eval '(.spec | select(has("search"))).search.image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongot"' + yq eval '.spec.upgradeOptions.apply="Never"' + local LAST_ERR=/tmp/tmp.I4Kvazn8Jy + local exit_status=0 + local timeout=4 + local i + args=('apply' '-f' '-') + add_arch_to_psmdb - + arch_scheduling_enabled + [[ -n '' ]] + cat - + 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.LitddPxbko + cat + return + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.LitddPxbko + 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.LitddPxbko + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.Z7vMsLGORS perconaservermongodb.psmdb.percona.com/cross-site-sharded-main created + cat /tmp/tmp.I4Kvazn8Jy + rm /tmp/tmp.Z7vMsLGORS /tmp/tmp.I4Kvazn8Jy /tmp/tmp.LitddPxbko + return 0 + desc 'check if all 3 Pods started' + set +o xtrace ----------------------------------------------------------------------------------- check if all 3 Pods started ----------------------------------------------------------------------------------- + wait_for_running cross-site-sharded-main-rs0 3 + local name=cross-site-sharded-main-rs0 + let last_pod=2 + local check_cluster_readiness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=cross-site-sharded-main ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod cross-site-sharded-main-rs0-0 + local pod=cross-site-sharded-main-rs0-0 + set +o xtrace waiting for pod/cross-site-sharded-main-rs0-0 to be ready........................OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod cross-site-sharded-main-rs0-1 + local pod=cross-site-sharded-main-rs0-1 + set +o xtrace waiting for pod/cross-site-sharded-main-rs0-1 to be ready............OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.5bKaAV3A72 +++ mktemp ++ local LAST_ERR=/tmp/tmp.cKBFsygnS5 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-main' '-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[@]}" ++ [[ cross-site-sharded-main == \- ]] ++ [[ cross-site-sharded-main =~ ^(-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 cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.5bKaAV3A72 ++ cat /tmp/tmp.cKBFsygnS5 ++ rm /tmp/tmp.5bKaAV3A72 /tmp/tmp.cKBFsygnS5 ++ return 0 + [[ false == true ]] + wait_pod cross-site-sharded-main-rs0-2 + local pod=cross-site-sharded-main-rs0-2 + set +o xtrace waiting for pod/cross-site-sharded-main-rs0-2 to be ready............OK ++ kubectl_bin get psmdb cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.EwnVq97FcO +++ mktemp ++ local LAST_ERR=/tmp/tmp.1y5paX4GDi ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-main' '-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[@]}" ++ [[ cross-site-sharded-main == \- ]] ++ [[ cross-site-sharded-main =~ ^(-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 cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.EwnVq97FcO ++ cat /tmp/tmp.1y5paX4GDi ++ rm /tmp/tmp.EwnVq97FcO /tmp/tmp.1y5paX4GDi ++ return 0 + [[ false == true ]] ++ kubectl_bin get psmdb cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Wrvn3mIWyV +++ mktemp ++ local LAST_ERR=/tmp/tmp.8cBlEu3TF2 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-main' '-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[@]}" ++ [[ cross-site-sharded-main == \- ]] ++ [[ cross-site-sharded-main =~ ^(-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 cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.Wrvn3mIWyV ++ cat /tmp/tmp.8cBlEu3TF2 ++ rm /tmp/tmp.Wrvn3mIWyV /tmp/tmp.8cBlEu3TF2 ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster cross-site-sharded-main to be ready............................................ + wait_for_running cross-site-sharded-main-cfg 3 false + local name=cross-site-sharded-main-cfg + let last_pod=2 + local check_cluster_readiness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=cross-site-sharded-main ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod cross-site-sharded-main-cfg-0 + local pod=cross-site-sharded-main-cfg-0 + set +o xtrace waiting for pod/cross-site-sharded-main-cfg-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod cross-site-sharded-main-cfg-1 + local pod=cross-site-sharded-main-cfg-1 + set +o xtrace waiting for pod/cross-site-sharded-main-cfg-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.58bpJ10Fiy +++ mktemp ++ local LAST_ERR=/tmp/tmp.6UAyp33afp ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-main' '-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[@]}" ++ [[ cross-site-sharded-main == \- ]] ++ [[ cross-site-sharded-main =~ ^(-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 cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.58bpJ10Fiy ++ cat /tmp/tmp.6UAyp33afp ++ rm /tmp/tmp.58bpJ10Fiy /tmp/tmp.6UAyp33afp ++ return 0 + [[ '' == true ]] + wait_pod cross-site-sharded-main-cfg-2 + local pod=cross-site-sharded-main-cfg-2 + set +o xtrace waiting for pod/cross-site-sharded-main-cfg-2 to be ready.OK ++ kubectl_bin get psmdb cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.9mMOsLBwV0 +++ mktemp ++ local LAST_ERR=/tmp/tmp.EbE5feqYTF ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-main' '-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[@]}" ++ [[ cross-site-sharded-main == \- ]] ++ [[ cross-site-sharded-main =~ ^(-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 cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.9mMOsLBwV0 ++ cat /tmp/tmp.EbE5feqYTF ++ rm /tmp/tmp.9mMOsLBwV0 /tmp/tmp.EbE5feqYTF ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.wgYi5Bsx2n +++ mktemp ++ local LAST_ERR=/tmp/tmp.EHo1lmc6Kq ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-main' '-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[@]}" ++ [[ cross-site-sharded-main == \- ]] ++ [[ cross-site-sharded-main =~ ^(-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 cross-site-sharded-main -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.wgYi5Bsx2n ++ cat /tmp/tmp.EHo1lmc6Kq ++ rm /tmp/tmp.wgYi5Bsx2n /tmp/tmp.EHo1lmc6Kq ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + desc 'create user' + set +o xtrace ----------------------------------------------------------------------------------- create user ----------------------------------------------------------------------------------- + run_mongos 'db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})' userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local 'command=db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})' + local uri=userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + 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.oWph1qWFPT +++ mktemp ++ local LAST_ERR=/tmp/tmp.p0a81Jgcm5 ++ 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.oWph1qWFPT ++ cat /tmp/tmp.p0a81Jgcm5 ++ rm /tmp/tmp.oWph1qWFPT /tmp/tmp.p0a81Jgcm5 ++ return 0 + local client_container=psmdb-client-c8847c4cd-9vzfv + kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.uINMZfcaff ++ mktemp + local LAST_ERR=/tmp/tmp.dc1Fg2FfCC + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-c8847c4cd-9vzfv == \- ]] + [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin == \- ]] + [[ export HOME=/tmp; printf 'db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n' | mongo mongodb://userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.uINMZfcaff Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("06249205-3177-4f9b-9def-dfc5d5dfc006") } 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.dc1Fg2FfCC + rm /tmp/tmp.uINMZfcaff /tmp/tmp.dc1Fg2FfCC + return 0 + sleep 2 + desc 'set chunk size to 2 MB' + set +o xtrace ----------------------------------------------------------------------------------- set chunk size to 2 MB ----------------------------------------------------------------------------------- + run_mongos 'use config\n db.settings.save( { _id:"chunksize", value: 2 } )' clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local 'command=use config\n db.settings.save( { _id:"chunksize", value: 2 } )' + local uri=clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + 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.gk3Z7isG3l +++ mktemp ++ local LAST_ERR=/tmp/tmp.ZVRV0sUVhM ++ 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.gk3Z7isG3l ++ cat /tmp/tmp.ZVRV0sUVhM ++ rm /tmp/tmp.gk3Z7isG3l /tmp/tmp.ZVRV0sUVhM ++ return 0 + local client_container=psmdb-client-c8847c4cd-9vzfv + kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''use config\n db.settings.save( { _id:"chunksize", value: 2 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.fSgjB8y6jH ++ mktemp + local LAST_ERR=/tmp/tmp.oz60vUIw7k + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use config\n db.settings.save( { _id:"chunksize", value: 2 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-c8847c4cd-9vzfv == \- ]] + [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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: 2 } )\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin == \- ]] + [[ export HOME=/tmp; printf 'use config\n db.settings.save( { _id:"chunksize", value: 2 } )\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''use config\n db.settings.save( { _id:"chunksize", value: 2 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.fSgjB8y6jH Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("d1f161c4-b999-4a62-aa35-e720f9010e08") } 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.oz60vUIw7k + rm /tmp/tmp.fSgjB8y6jH /tmp/tmp.oz60vUIw7k + return 0 + sleep 2 + desc 'write data' + set +o xtrace ----------------------------------------------------------------------------------- write data ----------------------------------------------------------------------------------- + run_script_mongos /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/data.js user:pass@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local script=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/data.js + local uri=user:pass@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local mongo_bin=mongo ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.jpyjkoGs3g +++ mktemp ++ local LAST_ERR=/tmp/tmp.yMhUtdgFMQ ++ 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.jpyjkoGs3g ++ cat /tmp/tmp.yMhUtdgFMQ ++ rm /tmp/tmp.jpyjkoGs3g /tmp/tmp.yMhUtdgFMQ ++ return 0 + local client_container=psmdb-client-c8847c4cd-9vzfv ++ basename /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/data.js + name=data.js + kubectl_bin cp /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/data.js cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp ++ mktemp + local LAST_OUT=/tmp/tmp.Zvw7X0jtZE ++ mktemp + local LAST_ERR=/tmp/tmp.7yKfjFAMgt + local exit_status=0 + local timeout=4 + local i + args=('cp' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/data.js' 'cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/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-2742/e2e-tests/cross-site-sharded/data.js == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/data.js =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp == \- ]] + [[ cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/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-2742/e2e-tests/cross-site-sharded/data.js cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.Zvw7X0jtZE + cat /tmp/tmp.7yKfjFAMgt + rm /tmp/tmp.Zvw7X0jtZE /tmp/tmp.7yKfjFAMgt + return 0 + kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; mongo mongodb://user:pass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local/admin /tmp/data.js' ++ mktemp + local LAST_OUT=/tmp/tmp.yX5gH8fQMe ++ mktemp + local LAST_ERR=/tmp/tmp.MzCNTGGXPZ + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; mongo mongodb://user:pass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local/admin /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-c8847c4cd-9vzfv == \- ]] + [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local/admin /tmp/data.js == \- ]] + [[ export HOME=/tmp; mongo mongodb://user:pass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local/admin /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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; mongo mongodb://user:pass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local/admin /tmp/data.js' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.yX5gH8fQMe Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("197022a2-8f8a-47fd-a931-b22f13a8fe93") } Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match + cat /tmp/tmp.MzCNTGGXPZ + rm /tmp/tmp.yX5gH8fQMe /tmp/tmp.MzCNTGGXPZ + return 0 + desc 'shard collection' + set +o xtrace ----------------------------------------------------------------------------------- shard collection ----------------------------------------------------------------------------------- + run_mongos 'sh.enableSharding("app")' clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local 'command=sh.enableSharding("app")' + local uri=clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + 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.L0XYNTbUPe +++ mktemp ++ local LAST_ERR=/tmp/tmp.SD8dTVpCIY ++ 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.L0XYNTbUPe ++ cat /tmp/tmp.SD8dTVpCIY ++ rm /tmp/tmp.L0XYNTbUPe /tmp/tmp.SD8dTVpCIY ++ return 0 + local client_container=psmdb-client-c8847c4cd-9vzfv + kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''sh.enableSharding("app")\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.LBJwUEotaq ++ mktemp + local LAST_ERR=/tmp/tmp.gB3YdKH9Fj + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''sh.enableSharding("app")\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-c8847c4cd-9vzfv == \- ]] + [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin == \- ]] + [[ export HOME=/tmp; printf 'sh.enableSharding("app")\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''sh.enableSharding("app")\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.LBJwUEotaq Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("ba4b46ef-db59-4a6c-a78f-9722ec0e37d6") } Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match { "ok" : 1, "$clusterTime" : { "clusterTime" : Timestamp(1795511616, 2), "signature" : { "hash" : BinData(0,"/bBvs7cjuKG5vRJkW11VoehuctI="), "keyId" : NumberLong("7711662901508964359") } }, "operationTime" : Timestamp(1795511616, 2) } bye + cat /tmp/tmp.gB3YdKH9Fj + rm /tmp/tmp.LBJwUEotaq /tmp/tmp.gB3YdKH9Fj + return 0 + sleep 2 + run_mongos 'sh.shardCollection("app.city", { _id: 1 } )' clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local 'command=sh.shardCollection("app.city", { _id: 1 } )' + local uri=clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + 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.UcaNWQSOXV +++ mktemp ++ local LAST_ERR=/tmp/tmp.6WW6OURwIb ++ 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.UcaNWQSOXV ++ cat /tmp/tmp.6WW6OURwIb ++ rm /tmp/tmp.UcaNWQSOXV /tmp/tmp.6WW6OURwIb ++ return 0 + local client_container=psmdb-client-c8847c4cd-9vzfv + kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''sh.shardCollection("app.city", { _id: 1 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.myqJ2k1uNm ++ mktemp + local LAST_ERR=/tmp/tmp.FChEXruFyC + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''sh.shardCollection("app.city", { _id: 1 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-c8847c4cd-9vzfv == \- ]] + [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin == \- ]] + [[ export HOME=/tmp; printf 'sh.shardCollection("app.city", { _id: 1 } )\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''sh.shardCollection("app.city", { _id: 1 } )\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.myqJ2k1uNm Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("3abdb980-fe91-4fe9-b835-8f27187f8449") } 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(1795511621, 39), "signature" : { "hash" : BinData(0,"0rOHBXF0IAVDRFJNajAhHdd7ffs="), "keyId" : NumberLong("7711662901508964359") } }, "operationTime" : Timestamp(1795511621, 39) } bye + cat /tmp/tmp.FChEXruFyC + rm /tmp/tmp.myqJ2k1uNm /tmp/tmp.FChEXruFyC + 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@cross-site-sharded-main-mongos.cross-site-sharded-8852 ++ local 'command=use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid' ++ local uri=user:pass@cross-site-sharded-main-mongos.cross-site-sharded-8852 ++ local driver=mongodb ++ grep 'switched to db app' -A 1 ++ local suffix=.svc.cluster.local ++ local mongo_flag= ++ local port=27017 ++ local mongo_bin=mongo ++ 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.D7TUK17obE ++++ mktemp +++ local LAST_ERR=/tmp/tmp.23xkd5tCFw +++ 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.D7TUK17obE +++ cat /tmp/tmp.23xkd5tCFw +++ rm /tmp/tmp.D7TUK17obE /tmp/tmp.23xkd5tCFw +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid\n'\'' | mongo mongodb://user:pass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.zwkMtSGdbo +++ mktemp ++ local LAST_ERR=/tmp/tmp.rfJc149D9V ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid\n'\'' | mongo mongodb://user:pass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid\n' | mongo mongodb://user:pass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''use app\n db.getCollectionInfos({ "name": "city" })[0].info.uuid\n'\'' | mongo mongodb://user:pass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.zwkMtSGdbo ++ cat /tmp/tmp.rfJc149D9V ++ rm /tmp/tmp.zwkMtSGdbo /tmp/tmp.rfJc149D9V ++ return 0 + chunks_param2='UUID("9029b5f4-78a8-447e-bbac-e0182d31b902")' + shards=0 + for i in "rs0" "rs1" ++ run_mongos 'use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs0"})' clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 ++ local 'command=use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs0"})' ++ local uri=clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local mongo_flag= ++ local port=27017 ++ local mongo_bin=mongo ++ grep 'switched to db config' -A 1 ++ 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.jgYJS2tX3x ++++ mktemp +++ local LAST_ERR=/tmp/tmp.83jZUvATcy +++ 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.jgYJS2tX3x +++ cat /tmp/tmp.83jZUvATcy +++ rm /tmp/tmp.jgYJS2tX3x /tmp/tmp.83jZUvATcy +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs0"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.lcxpPrdwag +++ mktemp ++ local LAST_ERR=/tmp/tmp.4wJTGxwY5M ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs0"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs0"})\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs0"})\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs0"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.lcxpPrdwag ++ cat /tmp/tmp.4wJTGxwY5M ++ rm /tmp/tmp.lcxpPrdwag /tmp/tmp.4wJTGxwY5M ++ return 0 + out=3 + desc 'rs0 has 3 chunks' + set +o xtrace ----------------------------------------------------------------------------------- rs0 has 3 chunks ----------------------------------------------------------------------------------- + [[ 3 -ne 0 ]] + (( shards = shards + 1 )) + for i in "rs0" "rs1" ++ grep 'switched to db config' -A 1 ++ run_mongos 'use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs1"})' clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 ++ grep -v 'switched to db config' ++ local 'command=use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs1"})' ++ local uri=clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local mongo_flag= ++ 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.gEjmei1vjE ++++ mktemp +++ local LAST_ERR=/tmp/tmp.yoCwo0KcJc +++ 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.gEjmei1vjE +++ cat /tmp/tmp.yoCwo0KcJc +++ rm /tmp/tmp.gEjmei1vjE /tmp/tmp.yoCwo0KcJc +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs1"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.3NuKJpXgy1 +++ mktemp ++ local LAST_ERR=/tmp/tmp.7R2yUd1AyY ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs1"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs1"})\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs1"})\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''use config\n db.chunks.count({"uuid": UUID("9029b5f4-78a8-447e-bbac-e0182d31b902"), "shard": "rs1"})\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.3NuKJpXgy1 ++ cat /tmp/tmp.7R2yUd1AyY ++ rm /tmp/tmp.3NuKJpXgy1 /tmp/tmp.7R2yUd1AyY ++ return 0 + out=1 + desc 'rs1 has 1 chunks' + set +o xtrace ----------------------------------------------------------------------------------- rs1 has 1 chunks ----------------------------------------------------------------------------------- + [[ 1 -ne 0 ]] + (( shards = shards + 1 )) + [[ 2 -lt 2 ]] + desc 'create replica cluster' + set +o xtrace ----------------------------------------------------------------------------------- create replica cluster ----------------------------------------------------------------------------------- + create_namespace cross-site-sharded-replica-23121 0 + local namespace=cross-site-sharded-replica-23121 + local skip_clean_namespace=0 + [[ 1 == 1 ]] + [[ -z 0 ]] + [[ -n '' ]] + desc 'cleaned up old namespaces cross-site-sharded-replica-23121' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces cross-site-sharded-replica-23121 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace cross-site-sharded-replica-23121 --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.rdxXtKKZCV ++ mktemp + local LAST_ERR=/tmp/tmp.nO353jJFAP + local exit_status=0 + local timeout=4 + local i + args=('delete' 'namespace' 'cross-site-sharded-replica-23121' '--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[@]}" + [[ cross-site-sharded-replica-23121 == \- ]] + [[ cross-site-sharded-replica-23121 =~ ^(-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 cross-site-sharded-replica-23121 --ignore-not-found + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.rdxXtKKZCV + cat /tmp/tmp.nO353jJFAP + rm /tmp/tmp.rdxXtKKZCV /tmp/tmp.nO353jJFAP + return 0 + kubectl_bin wait --for=delete namespace cross-site-sharded-replica-23121 ++ mktemp + local LAST_OUT=/tmp/tmp.sLMxykUVeD ++ mktemp + local LAST_ERR=/tmp/tmp.erEydKsQ76 + local exit_status=0 + local timeout=4 + local i + args=('wait' '--for=delete' 'namespace' 'cross-site-sharded-replica-23121') + 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[@]}" + [[ cross-site-sharded-replica-23121 == \- ]] + [[ cross-site-sharded-replica-23121 =~ ^(-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 cross-site-sharded-replica-23121 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.sLMxykUVeD + cat /tmp/tmp.erEydKsQ76 + rm /tmp/tmp.sLMxykUVeD /tmp/tmp.erEydKsQ76 + return 0 + desc 'create namespace cross-site-sharded-replica-23121' + set +o xtrace ----------------------------------------------------------------------------------- create namespace cross-site-sharded-replica-23121 ----------------------------------------------------------------------------------- + kubectl_bin create namespace cross-site-sharded-replica-23121 ++ mktemp + local LAST_OUT=/tmp/tmp.FJ00W5igj1 ++ mktemp + local LAST_ERR=/tmp/tmp.4VVXq3Ihy3 + local exit_status=0 + local timeout=4 + local i + args=('create' 'namespace' 'cross-site-sharded-replica-23121') + 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[@]}" + [[ cross-site-sharded-replica-23121 == \- ]] + [[ cross-site-sharded-replica-23121 =~ ^(-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 cross-site-sharded-replica-23121 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.FJ00W5igj1 namespace/cross-site-sharded-replica-23121 created + cat /tmp/tmp.4VVXq3Ihy3 + rm /tmp/tmp.FJ00W5igj1 /tmp/tmp.4VVXq3Ihy3 + return 0 + set_kube_ctx cross-site-sharded-replica-23121 + local namespace=cross-site-sharded-replica-23121 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.ok2lri5u5w +++ mktemp ++ local LAST_ERR=/tmp/tmp.MLnginXHVX ++ 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.ok2lri5u5w ++ cat /tmp/tmp.MLnginXHVX ++ rm /tmp/tmp.ok2lri5u5w /tmp/tmp.MLnginXHVX ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-replica-23121 ++ mktemp + local LAST_OUT=/tmp/tmp.2HxwuAisK0 ++ mktemp + local LAST_ERR=/tmp/tmp.BVGrjNJOHC + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5' '--namespace=cross-site-sharded-replica-23121') + 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-2742-cf134fefe-2-cluster5 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --namespace=cross-site-sharded-replica-23121 == \- ]] + [[ --namespace=cross-site-sharded-replica-23121 =~ ^(-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-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-replica-23121 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.2HxwuAisK0 Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5" modified. + cat /tmp/tmp.BVGrjNJOHC + rm /tmp/tmp.2HxwuAisK0 /tmp/tmp.BVGrjNJOHC + return 0 + deploy_operator + desc 'start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe' + set +o xtrace ----------------------------------------------------------------------------------- start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe ----------------------------------------------------------------------------------- + local cr_file + '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.EnQQ7IlHOf ++ mktemp + local LAST_ERR=/tmp/tmp.tAetC2OTlN + local exit_status=0 + local timeout=4 + local i + args=('apply' '--server-side' '--force-conflicts' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/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-2742/deploy/crd.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/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-2742/deploy/crd.yaml + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.EnQQ7IlHOf 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.tAetC2OTlN + rm /tmp/tmp.EnQQ7IlHOf /tmp/tmp.tAetC2OTlN + return 0 + '[' -n '' ']' + apply_rbac rbac + local operator_namespace=psmdb-operator + local rbac=rbac + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/rbac.yaml + sed -e 's^namespace: .*^namespace: psmdb-operator^' + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.eHvqv2FwW2 ++ mktemp + local LAST_ERR=/tmp/tmp.PRE6xghau4 + 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.Uh6OzF9jY5 + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.Uh6OzF9jY5 + 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.Uh6OzF9jY5 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.eHvqv2FwW2 role.rbac.authorization.k8s.io/percona-server-mongodb-operator created serviceaccount/percona-server-mongodb-operator created rolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator created + cat /tmp/tmp.PRE6xghau4 + rm /tmp/tmp.eHvqv2FwW2 /tmp/tmp.PRE6xghau4 /tmp/tmp.Uh6OzF9jY5 + return 0 + yq eval $'\n\t\t\t(.spec.template.spec.containers[].image = "docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe") |\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-2742/deploy/operator.yaml + add_arch_to_podspecs - + arch_scheduling_enabled + [[ -n '' ]] + cat - + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.h4E7hKtNyf ++ mktemp + local LAST_ERR=/tmp/tmp.BrZt5akpcx + 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.zpExJRMtea + cat + return + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.zpExJRMtea + 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.zpExJRMtea + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.h4E7hKtNyf deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.BrZt5akpcx + rm /tmp/tmp.h4E7hKtNyf /tmp/tmp.BrZt5akpcx /tmp/tmp.zpExJRMtea + return 0 + sleep 20 ++ get_operator_pod ++ kubectl_bin get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.usf0zQHIAY +++ mktemp ++ local LAST_ERR=/tmp/tmp.aB1dgbXtSt ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=percona-server-mongodb-operator' '-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=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)=-$ ]] ++ 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}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.usf0zQHIAY ++ cat /tmp/tmp.aB1dgbXtSt ++ rm /tmp/tmp.usf0zQHIAY /tmp/tmp.aB1dgbXtSt ++ return 0 + wait_operator_pod percona-server-mongodb-operator-d6688b754-s92q2 + local pod=percona-server-mongodb-operator-d6688b754-s92q2 + set +o xtrace waiting for pod/percona-server-mongodb-operator-d6688b754-s92q2 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}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.jKrD8dw5Sx +++ mktemp ++ local LAST_ERR=/tmp/tmp.BZ8uTdFwy8 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=percona-server-mongodb-operator' '-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=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)=-$ ]] ++ 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}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.jKrD8dw5Sx ++ cat /tmp/tmp.BZ8uTdFwy8 ++ rm /tmp/tmp.jKrD8dw5Sx /tmp/tmp.BZ8uTdFwy8 ++ return 0 + kubectl_bin logs percona-server-mongodb-operator-d6688b754-s92q2 ++ mktemp + local LAST_OUT=/tmp/tmp.PGfIHQ0Cxq ++ mktemp + local LAST_ERR=/tmp/tmp.95r5SEsOQQ + local exit_status=0 + local timeout=4 + local i + args=('logs' 'percona-server-mongodb-operator-d6688b754-s92q2') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ logs == \- ]] + [[ logs =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ percona-server-mongodb-operator-d6688b754-s92q2 == \- ]] + [[ percona-server-mongodb-operator-d6688b754-s92q2 =~ ^(-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 percona-server-mongodb-operator-d6688b754-s92q2 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.PGfIHQ0Cxq + cat /tmp/tmp.95r5SEsOQQ + rm /tmp/tmp.PGfIHQ0Cxq /tmp/tmp.95r5SEsOQQ + return 0 2026-11-24T09:16:02.520Z INFO setup Manager starting up {"gitCommit": "cf134fefe3b251937747923cc1a37f3d6e0fa43f", "gitBranch": "PR-2742-cf134fefe", "buildTime": "", "goVersion": "go1.27.4", "os": "linux", "arch": "amd64"} + desc 'start client' + set +o xtrace ----------------------------------------------------------------------------------- start client ----------------------------------------------------------------------------------- + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/client.yml ++ mktemp + local LAST_OUT=/tmp/tmp.FAYLZ2SJg1 ++ mktemp + local LAST_ERR=/tmp/tmp.1z9C5BeQ6C + local exit_status=0 + local timeout=4 + local i + args=('apply' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/client.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-2742/e2e-tests/conf/client.yml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/client.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-2742/e2e-tests/conf/client.yml + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.FAYLZ2SJg1 deployment.apps/psmdb-client created + cat /tmp/tmp.1z9C5BeQ6C + rm /tmp/tmp.FAYLZ2SJg1 /tmp/tmp.1z9C5BeQ6C + return 0 + desc 'copy secrets from main to replica namespace and create all of them' + set +o xtrace ----------------------------------------------------------------------------------- copy secrets from main to replica namespace and create all of them ----------------------------------------------------------------------------------- + yq eval $'\n\t\tdel(.metadata) |\n\t\t(.metadata.name = "cross-site-sharded-replica-secrets")' - + kubectl get secret cross-site-sharded-main-secrets -o yaml -n cross-site-sharded-8852 + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.uiC0fJhtpM ++ mktemp + local LAST_ERR=/tmp/tmp.7ibiVPGeWn + 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.LrGfNy9bJo + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.LrGfNy9bJo + 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.LrGfNy9bJo + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.uiC0fJhtpM secret/cross-site-sharded-replica-secrets created + cat /tmp/tmp.7ibiVPGeWn + rm /tmp/tmp.uiC0fJhtpM /tmp/tmp.7ibiVPGeWn /tmp/tmp.LrGfNy9bJo + return 0 + kubectl_bin get secret cross-site-sharded-main-ssl-internal -o yaml -n cross-site-sharded-8852 + yq eval $'\n\t\tdel(.metadata) |\n\t\tdel(.status) |\n\t\t(.metadata.name = "cross-site-sharded-replica-ssl-internal")' - + kubectl_bin apply -f - ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.gvGx42nAt0 ++ mktemp + local LAST_OUT=/tmp/tmp.vxHQznQxbL ++ mktemp + local LAST_ERR=/tmp/tmp.Bryzczsqab + local exit_status=0 + local timeout=4 + local i + args=('get' 'secret' 'cross-site-sharded-main-ssl-internal' '-o' 'yaml' '-n' 'cross-site-sharded-8852') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ get == \- ]] + [[ get =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ secret == \- ]] + [[ secret =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cross-site-sharded-main-ssl-internal == \- ]] + [[ cross-site-sharded-main-ssl-internal =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -o == \- ]] + [[ -o =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ yaml == \- ]] + [[ yaml =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -n == \- ]] + [[ -n =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cross-site-sharded-8852 == \- ]] + [[ cross-site-sharded-8852 =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + local LAST_ERR=/tmp/tmp.8DPg7Dk4Bj + [[ -n '' ]] + local exit_status=0 + arch_scheduling_enabled + [[ -n '' ]] + local timeout=4 + local attempt + local i + local delay + 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)$ ]] ++ seq 0 9 ++ mktemp + for attempt in $(seq 0 9) + set +e + kubectl get secret cross-site-sharded-main-ssl-internal -o yaml -n cross-site-sharded-8852 + stdin_manifest=/tmp/tmp.U52J6sweOV + cat + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.gvGx42nAt0 + cat /tmp/tmp.Bryzczsqab + rm /tmp/tmp.gvGx42nAt0 /tmp/tmp.Bryzczsqab + return 0 + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.U52J6sweOV + 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.U52J6sweOV + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.vxHQznQxbL secret/cross-site-sharded-replica-ssl-internal created + cat /tmp/tmp.8DPg7Dk4Bj + rm /tmp/tmp.vxHQznQxbL /tmp/tmp.8DPg7Dk4Bj /tmp/tmp.U52J6sweOV + return 0 + kubectl_bin get secret cross-site-sharded-main-ssl -o yaml -n cross-site-sharded-8852 + yq eval $'\n\t\tdel(.metadata) |\n\t\tdel(.status) |\n\t\t(.metadata.name = "cross-site-sharded-replica-ssl")' - + kubectl_bin apply -f - ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.GHhKYjDKHW ++ mktemp + local LAST_OUT=/tmp/tmp.kfrfXp5ZAO + local LAST_ERR=/tmp/tmp.96w9jXdGwN + 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 ++ mktemp + local LAST_ERR=/tmp/tmp.BuGBUemrud + local exit_status=0 + local timeout=4 + local i + args=('get' 'secret' 'cross-site-sharded-main-ssl' '-o' 'yaml' '-n' 'cross-site-sharded-8852') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ get == \- ]] + [[ get =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ secret == \- ]] + [[ secret =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cross-site-sharded-main-ssl == \- ]] + stdin_manifest=/tmp/tmp.dtPW9KavNZ + [[ cross-site-sharded-main-ssl =~ ^(-f|--filename)=-$ ]] + cat + for i in "${!args[@]}" + [[ -o == \- ]] + [[ -o =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ yaml == \- ]] + [[ yaml =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -n == \- ]] + [[ -n =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cross-site-sharded-8852 == \- ]] + [[ cross-site-sharded-8852 =~ ^(-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 secret cross-site-sharded-main-ssl -o yaml -n cross-site-sharded-8852 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.kfrfXp5ZAO + cat /tmp/tmp.BuGBUemrud + rm /tmp/tmp.kfrfXp5ZAO /tmp/tmp.BuGBUemrud + return 0 + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.dtPW9KavNZ + 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.dtPW9KavNZ + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.GHhKYjDKHW secret/cross-site-sharded-replica-ssl created + cat /tmp/tmp.96w9jXdGwN + rm /tmp/tmp.GHhKYjDKHW /tmp/tmp.96w9jXdGwN /tmp/tmp.dtPW9KavNZ + return 0 + sleep 30 + desc 'create replica PSMDB cluster ' + set +o xtrace ----------------------------------------------------------------------------------- create replica PSMDB cluster ----------------------------------------------------------------------------------- + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/conf/cross-site-sharded-replica.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/conf/cross-site-sharded-replica.yml + kubectl_bin apply -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/conf/cross-site-sharded-replica.yml ++ mktemp + 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"' + yq eval '(.spec | select(has("initImage"))).initImage = "docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe"' + yq eval '(.spec | select(has("backup"))).backup.image = "docker.io/perconalab/percona-server-mongodb-operator:main-backup"' + local LAST_OUT=/tmp/tmp.OXLestBIWR + yq eval '(.spec | select(has("search"))).search.image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongot"' + [[ -n docker.io/perconalab/fluentbit:main-logcollector ]] ++ mktemp + IMAGE_LOGCOLLECTOR=docker.io/perconalab/fluentbit:main-logcollector + yq eval '(.spec | select(has("logcollector"))).logcollector.image = strenv(IMAGE_LOGCOLLECTOR)' + /usr/sbin/sed -e s/NAME_SPACE/cross-site-sharded-8852/g + add_arch_to_psmdb - + yq eval '.spec.upgradeOptions.apply="Never"' + arch_scheduling_enabled + [[ -n '' ]] + cat - + local LAST_ERR=/tmp/tmp.2nJeb1FiRS + 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.riMFQB1w8o + cat + return + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.riMFQB1w8o + 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.riMFQB1w8o + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.OXLestBIWR perconaservermongodb.psmdb.percona.com/cross-site-sharded-replica created + cat /tmp/tmp.2nJeb1FiRS + rm /tmp/tmp.OXLestBIWR /tmp/tmp.2nJeb1FiRS /tmp/tmp.riMFQB1w8o + return 0 + wait_for_running cross-site-sharded-replica-rs0 3 false + local name=cross-site-sharded-replica-rs0 + let last_pod=2 + local check_cluster_readiness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=cross-site-sharded-replica ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod cross-site-sharded-replica-rs0-0 + local pod=cross-site-sharded-replica-rs0-0 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs0-0 to be ready..............OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod cross-site-sharded-replica-rs0-1 + local pod=cross-site-sharded-replica-rs0-1 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs0-1 to be ready.............OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.ovlSe7L50o +++ mktemp ++ local LAST_ERR=/tmp/tmp.XNNcLKhVHa ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.ovlSe7L50o ++ cat /tmp/tmp.XNNcLKhVHa ++ rm /tmp/tmp.ovlSe7L50o /tmp/tmp.XNNcLKhVHa ++ return 0 + [[ false == true ]] + wait_pod cross-site-sharded-replica-rs0-2 + local pod=cross-site-sharded-replica-rs0-2 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs0-2 to be ready.............OK ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.pfod0Y7dVO +++ mktemp ++ local LAST_ERR=/tmp/tmp.UxxwBBe8v2 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.pfod0Y7dVO ++ cat /tmp/tmp.UxxwBBe8v2 ++ rm /tmp/tmp.pfod0Y7dVO /tmp/tmp.UxxwBBe8v2 ++ return 0 + [[ false == true ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.0vhkOAuyMm +++ mktemp ++ local LAST_ERR=/tmp/tmp.fYwtFvECa8 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.0vhkOAuyMm ++ cat /tmp/tmp.fYwtFvECa8 ++ rm /tmp/tmp.0vhkOAuyMm /tmp/tmp.fYwtFvECa8 ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + wait_for_running cross-site-sharded-replica-rs1 3 false + local name=cross-site-sharded-replica-rs1 + let last_pod=2 + local check_cluster_readiness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs1 + local cluster_name=cross-site-sharded-replica ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod cross-site-sharded-replica-rs1-0 + local pod=cross-site-sharded-replica-rs1-0 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs1-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod cross-site-sharded-replica-rs1-1 + local pod=cross-site-sharded-replica-rs1-1 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs1-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.ArZy9CtejZ +++ mktemp ++ local LAST_ERR=/tmp/tmp.8xaiKpqypf ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.ArZy9CtejZ ++ cat /tmp/tmp.8xaiKpqypf ++ rm /tmp/tmp.ArZy9CtejZ /tmp/tmp.8xaiKpqypf ++ return 0 + [[ false == true ]] + wait_pod cross-site-sharded-replica-rs1-2 + local pod=cross-site-sharded-replica-rs1-2 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs1-2 to be ready.OK ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.5xkWd22cM9 +++ mktemp ++ local LAST_ERR=/tmp/tmp.0pQ0r3eDpm ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.5xkWd22cM9 ++ cat /tmp/tmp.0pQ0r3eDpm ++ rm /tmp/tmp.5xkWd22cM9 /tmp/tmp.0pQ0r3eDpm ++ return 0 + [[ false == true ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.u8HZPwe5tH +++ mktemp ++ local LAST_ERR=/tmp/tmp.Pqb7rbgcod ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.u8HZPwe5tH ++ cat /tmp/tmp.Pqb7rbgcod ++ rm /tmp/tmp.u8HZPwe5tH /tmp/tmp.Pqb7rbgcod ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + wait_for_running cross-site-sharded-replica-cfg 3 false + local name=cross-site-sharded-replica-cfg + let last_pod=2 + local check_cluster_readiness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=cross-site-sharded-replica ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod cross-site-sharded-replica-cfg-0 + local pod=cross-site-sharded-replica-cfg-0 + set +o xtrace waiting for pod/cross-site-sharded-replica-cfg-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod cross-site-sharded-replica-cfg-1 + local pod=cross-site-sharded-replica-cfg-1 + set +o xtrace waiting for pod/cross-site-sharded-replica-cfg-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Nkjwtz6h3d +++ mktemp ++ local LAST_ERR=/tmp/tmp.mKlhgXGlqq ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.Nkjwtz6h3d ++ cat /tmp/tmp.mKlhgXGlqq ++ rm /tmp/tmp.Nkjwtz6h3d /tmp/tmp.mKlhgXGlqq ++ return 0 + [[ '' == true ]] + wait_pod cross-site-sharded-replica-cfg-2 + local pod=cross-site-sharded-replica-cfg-2 + set +o xtrace waiting for pod/cross-site-sharded-replica-cfg-2 to be ready.OK ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.7EH6a1Qima +++ mktemp ++ local LAST_ERR=/tmp/tmp.hy2KiDmOvT ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.7EH6a1Qima ++ cat /tmp/tmp.hy2KiDmOvT ++ rm /tmp/tmp.7EH6a1Qima /tmp/tmp.hy2KiDmOvT ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.7xINIvWJ8y +++ mktemp ++ local LAST_ERR=/tmp/tmp.79uOGhVmft ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.7xINIvWJ8y ++ cat /tmp/tmp.79uOGhVmft ++ rm /tmp/tmp.7xINIvWJ8y /tmp/tmp.79uOGhVmft ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] ++ get_service_ip cross-site-sharded-replica-cfg-0 cfg ++ local service=cross-site-sharded-replica-cfg-0 ++ local server_type=cfg +++ kubectl_bin get psmdb/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.ZOfzCvmwG7 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.SUVAHBwRNp +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'psmdb/cross-site-sharded-replica' '-o' 'jsonpath={.spec.replsets[].expose.enabled}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ psmdb/cross-site-sharded-replica == \- ]] +++ [[ psmdb/cross-site-sharded-replica =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.replsets[].expose.enabled} == \- ]] +++ [[ jsonpath={.spec.replsets[].expose.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/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.ZOfzCvmwG7 +++ cat /tmp/tmp.SUVAHBwRNp +++ rm /tmp/tmp.ZOfzCvmwG7 /tmp/tmp.SUVAHBwRNp +++ return 0 ++ '[' true '!=' true ']' ++ grep -q NotFound ++ kubectl_bin get service/cross-site-sharded-replica-cfg-0 -o 'jsonpath={.spec.type}' +++ kubectl_bin get service/cross-site-sharded-replica-cfg-0 -o 'jsonpath={.spec.type}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.7js8zBwcn1 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.lwhWI4FP1h +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'service/cross-site-sharded-replica-cfg-0' '-o' 'jsonpath={.spec.type}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ service/cross-site-sharded-replica-cfg-0 == \- ]] +++ [[ service/cross-site-sharded-replica-cfg-0 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.type} == \- ]] +++ [[ jsonpath={.spec.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 service/cross-site-sharded-replica-cfg-0 -o 'jsonpath={.spec.type}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.7js8zBwcn1 +++ cat /tmp/tmp.lwhWI4FP1h +++ rm /tmp/tmp.7js8zBwcn1 /tmp/tmp.lwhWI4FP1h +++ return 0 ++ service_type=ClusterIP ++ '[' ClusterIP = ClusterIP ']' ++ kubectl_bin get service/cross-site-sharded-replica-cfg-0 -o 'jsonpath={.spec.clusterIP}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.gUSop3ZUrK +++ mktemp ++ local LAST_ERR=/tmp/tmp.IngXgEeu76 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'service/cross-site-sharded-replica-cfg-0' '-o' 'jsonpath={.spec.clusterIP}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ service/cross-site-sharded-replica-cfg-0 == \- ]] ++ [[ service/cross-site-sharded-replica-cfg-0 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.clusterIP} == \- ]] ++ [[ jsonpath={.spec.clusterIP} =~ ^(-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 service/cross-site-sharded-replica-cfg-0 -o 'jsonpath={.spec.clusterIP}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.gUSop3ZUrK ++ cat /tmp/tmp.IngXgEeu76 ++ rm /tmp/tmp.gUSop3ZUrK /tmp/tmp.IngXgEeu76 ++ return 0 ++ return + replica_cfg_0_endpoint=34.118.234.197 ++ get_service_ip cross-site-sharded-replica-cfg-1 cfg ++ local service=cross-site-sharded-replica-cfg-1 ++ local server_type=cfg +++ kubectl_bin get psmdb/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.W2HHoeQL1Q ++++ mktemp +++ local LAST_ERR=/tmp/tmp.95Ju4aHwy4 +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'psmdb/cross-site-sharded-replica' '-o' 'jsonpath={.spec.replsets[].expose.enabled}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ psmdb/cross-site-sharded-replica == \- ]] +++ [[ psmdb/cross-site-sharded-replica =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.replsets[].expose.enabled} == \- ]] +++ [[ jsonpath={.spec.replsets[].expose.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/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.W2HHoeQL1Q +++ cat /tmp/tmp.95Ju4aHwy4 +++ rm /tmp/tmp.W2HHoeQL1Q /tmp/tmp.95Ju4aHwy4 +++ return 0 ++ '[' true '!=' true ']' ++ kubectl_bin get service/cross-site-sharded-replica-cfg-1 -o 'jsonpath={.spec.type}' ++ grep -q NotFound +++ kubectl_bin get service/cross-site-sharded-replica-cfg-1 -o 'jsonpath={.spec.type}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.ajJwLfx6fr ++++ mktemp +++ local LAST_ERR=/tmp/tmp.sr0z0iTwAE +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'service/cross-site-sharded-replica-cfg-1' '-o' 'jsonpath={.spec.type}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ service/cross-site-sharded-replica-cfg-1 == \- ]] +++ [[ service/cross-site-sharded-replica-cfg-1 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.type} == \- ]] +++ [[ jsonpath={.spec.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 service/cross-site-sharded-replica-cfg-1 -o 'jsonpath={.spec.type}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.ajJwLfx6fr +++ cat /tmp/tmp.sr0z0iTwAE +++ rm /tmp/tmp.ajJwLfx6fr /tmp/tmp.sr0z0iTwAE +++ return 0 ++ service_type=ClusterIP ++ '[' ClusterIP = ClusterIP ']' ++ kubectl_bin get service/cross-site-sharded-replica-cfg-1 -o 'jsonpath={.spec.clusterIP}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.uLQQhlWy11 +++ mktemp ++ local LAST_ERR=/tmp/tmp.J4jystOMvO ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'service/cross-site-sharded-replica-cfg-1' '-o' 'jsonpath={.spec.clusterIP}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ service/cross-site-sharded-replica-cfg-1 == \- ]] ++ [[ service/cross-site-sharded-replica-cfg-1 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.clusterIP} == \- ]] ++ [[ jsonpath={.spec.clusterIP} =~ ^(-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 service/cross-site-sharded-replica-cfg-1 -o 'jsonpath={.spec.clusterIP}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.uLQQhlWy11 ++ cat /tmp/tmp.J4jystOMvO ++ rm /tmp/tmp.uLQQhlWy11 /tmp/tmp.J4jystOMvO ++ return 0 ++ return + replica_cfg_1_endpoint=34.118.228.222 ++ get_service_ip cross-site-sharded-replica-cfg-2 cfg ++ local service=cross-site-sharded-replica-cfg-2 ++ local server_type=cfg +++ kubectl_bin get psmdb/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.OIhAJpG6XG ++++ mktemp +++ local LAST_ERR=/tmp/tmp.NYXyB2dVKm +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'psmdb/cross-site-sharded-replica' '-o' 'jsonpath={.spec.replsets[].expose.enabled}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ psmdb/cross-site-sharded-replica == \- ]] +++ [[ psmdb/cross-site-sharded-replica =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.replsets[].expose.enabled} == \- ]] +++ [[ jsonpath={.spec.replsets[].expose.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/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.OIhAJpG6XG +++ cat /tmp/tmp.NYXyB2dVKm +++ rm /tmp/tmp.OIhAJpG6XG /tmp/tmp.NYXyB2dVKm +++ return 0 ++ '[' true '!=' true ']' ++ kubectl_bin get service/cross-site-sharded-replica-cfg-2 -o 'jsonpath={.spec.type}' ++ grep -q NotFound +++ kubectl_bin get service/cross-site-sharded-replica-cfg-2 -o 'jsonpath={.spec.type}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.gTDyoygu7j ++++ mktemp +++ local LAST_ERR=/tmp/tmp.5U9dUrSyrS +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'service/cross-site-sharded-replica-cfg-2' '-o' 'jsonpath={.spec.type}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ service/cross-site-sharded-replica-cfg-2 == \- ]] +++ [[ service/cross-site-sharded-replica-cfg-2 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.type} == \- ]] +++ [[ jsonpath={.spec.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 service/cross-site-sharded-replica-cfg-2 -o 'jsonpath={.spec.type}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.gTDyoygu7j +++ cat /tmp/tmp.5U9dUrSyrS +++ rm /tmp/tmp.gTDyoygu7j /tmp/tmp.5U9dUrSyrS +++ return 0 ++ service_type=ClusterIP ++ '[' ClusterIP = ClusterIP ']' ++ kubectl_bin get service/cross-site-sharded-replica-cfg-2 -o 'jsonpath={.spec.clusterIP}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.71VOcGFKvq +++ mktemp ++ local LAST_ERR=/tmp/tmp.vew5duUh8P ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'service/cross-site-sharded-replica-cfg-2' '-o' 'jsonpath={.spec.clusterIP}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ service/cross-site-sharded-replica-cfg-2 == \- ]] ++ [[ service/cross-site-sharded-replica-cfg-2 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.clusterIP} == \- ]] ++ [[ jsonpath={.spec.clusterIP} =~ ^(-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 service/cross-site-sharded-replica-cfg-2 -o 'jsonpath={.spec.clusterIP}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.71VOcGFKvq ++ cat /tmp/tmp.vew5duUh8P ++ rm /tmp/tmp.71VOcGFKvq /tmp/tmp.vew5duUh8P ++ return 0 ++ return + replica_cfg_2_endpoint=34.118.230.27 ++ get_service_ip cross-site-sharded-replica-rs0-0 ++ local service=cross-site-sharded-replica-rs0-0 ++ local server_type=rs0 +++ kubectl_bin get psmdb/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.XTxkq1Ui3t ++++ mktemp +++ local LAST_ERR=/tmp/tmp.xYJdnjdJhA +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'psmdb/cross-site-sharded-replica' '-o' 'jsonpath={.spec.replsets[].expose.enabled}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ psmdb/cross-site-sharded-replica == \- ]] +++ [[ psmdb/cross-site-sharded-replica =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.replsets[].expose.enabled} == \- ]] +++ [[ jsonpath={.spec.replsets[].expose.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/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.XTxkq1Ui3t +++ cat /tmp/tmp.xYJdnjdJhA +++ rm /tmp/tmp.XTxkq1Ui3t /tmp/tmp.xYJdnjdJhA +++ return 0 ++ '[' true '!=' true ']' ++ kubectl_bin get service/cross-site-sharded-replica-rs0-0 -o 'jsonpath={.spec.type}' ++ grep -q NotFound +++ kubectl_bin get service/cross-site-sharded-replica-rs0-0 -o 'jsonpath={.spec.type}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.OCR07i1lNC ++++ mktemp +++ local LAST_ERR=/tmp/tmp.OqdjBFSkca +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'service/cross-site-sharded-replica-rs0-0' '-o' 'jsonpath={.spec.type}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ service/cross-site-sharded-replica-rs0-0 == \- ]] +++ [[ service/cross-site-sharded-replica-rs0-0 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.type} == \- ]] +++ [[ jsonpath={.spec.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 service/cross-site-sharded-replica-rs0-0 -o 'jsonpath={.spec.type}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.OCR07i1lNC +++ cat /tmp/tmp.OqdjBFSkca +++ rm /tmp/tmp.OCR07i1lNC /tmp/tmp.OqdjBFSkca +++ return 0 ++ service_type=ClusterIP ++ '[' ClusterIP = ClusterIP ']' ++ kubectl_bin get service/cross-site-sharded-replica-rs0-0 -o 'jsonpath={.spec.clusterIP}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.yZ0TsjO93w +++ mktemp ++ local LAST_ERR=/tmp/tmp.Zpy3gSztIH ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'service/cross-site-sharded-replica-rs0-0' '-o' 'jsonpath={.spec.clusterIP}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ service/cross-site-sharded-replica-rs0-0 == \- ]] ++ [[ service/cross-site-sharded-replica-rs0-0 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.clusterIP} == \- ]] ++ [[ jsonpath={.spec.clusterIP} =~ ^(-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 service/cross-site-sharded-replica-rs0-0 -o 'jsonpath={.spec.clusterIP}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.yZ0TsjO93w ++ cat /tmp/tmp.Zpy3gSztIH ++ rm /tmp/tmp.yZ0TsjO93w /tmp/tmp.Zpy3gSztIH ++ return 0 ++ return + replica_rs0_0_endpoint=34.118.225.204 ++ get_service_ip cross-site-sharded-replica-rs0-1 ++ local service=cross-site-sharded-replica-rs0-1 ++ local server_type=rs0 +++ kubectl_bin get psmdb/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.V6msKpiiQL ++++ mktemp +++ local LAST_ERR=/tmp/tmp.ZnmxcQAKQL +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'psmdb/cross-site-sharded-replica' '-o' 'jsonpath={.spec.replsets[].expose.enabled}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ psmdb/cross-site-sharded-replica == \- ]] +++ [[ psmdb/cross-site-sharded-replica =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.replsets[].expose.enabled} == \- ]] +++ [[ jsonpath={.spec.replsets[].expose.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/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.V6msKpiiQL +++ cat /tmp/tmp.ZnmxcQAKQL +++ rm /tmp/tmp.V6msKpiiQL /tmp/tmp.ZnmxcQAKQL +++ return 0 ++ '[' true '!=' true ']' ++ kubectl_bin get service/cross-site-sharded-replica-rs0-1 -o 'jsonpath={.spec.type}' ++ grep -q NotFound +++ kubectl_bin get service/cross-site-sharded-replica-rs0-1 -o 'jsonpath={.spec.type}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.XhwDoT2Hin ++++ mktemp +++ local LAST_ERR=/tmp/tmp.h43X8Jleh9 +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'service/cross-site-sharded-replica-rs0-1' '-o' 'jsonpath={.spec.type}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ service/cross-site-sharded-replica-rs0-1 == \- ]] +++ [[ service/cross-site-sharded-replica-rs0-1 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.type} == \- ]] +++ [[ jsonpath={.spec.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 service/cross-site-sharded-replica-rs0-1 -o 'jsonpath={.spec.type}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.XhwDoT2Hin +++ cat /tmp/tmp.h43X8Jleh9 +++ rm /tmp/tmp.XhwDoT2Hin /tmp/tmp.h43X8Jleh9 +++ return 0 ++ service_type=ClusterIP ++ '[' ClusterIP = ClusterIP ']' ++ kubectl_bin get service/cross-site-sharded-replica-rs0-1 -o 'jsonpath={.spec.clusterIP}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.j7Uo3csO4y +++ mktemp ++ local LAST_ERR=/tmp/tmp.l54aNpFgBd ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'service/cross-site-sharded-replica-rs0-1' '-o' 'jsonpath={.spec.clusterIP}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ service/cross-site-sharded-replica-rs0-1 == \- ]] ++ [[ service/cross-site-sharded-replica-rs0-1 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.clusterIP} == \- ]] ++ [[ jsonpath={.spec.clusterIP} =~ ^(-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 service/cross-site-sharded-replica-rs0-1 -o 'jsonpath={.spec.clusterIP}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.j7Uo3csO4y ++ cat /tmp/tmp.l54aNpFgBd ++ rm /tmp/tmp.j7Uo3csO4y /tmp/tmp.l54aNpFgBd ++ return 0 ++ return + replica_rs0_1_endpoint=34.118.232.62 ++ get_service_ip cross-site-sharded-replica-rs0-2 ++ local service=cross-site-sharded-replica-rs0-2 ++ local server_type=rs0 +++ kubectl_bin get psmdb/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.rS56SntNeD ++++ mktemp +++ local LAST_ERR=/tmp/tmp.yZ92JSO2kz +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'psmdb/cross-site-sharded-replica' '-o' 'jsonpath={.spec.replsets[].expose.enabled}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ psmdb/cross-site-sharded-replica == \- ]] +++ [[ psmdb/cross-site-sharded-replica =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.replsets[].expose.enabled} == \- ]] +++ [[ jsonpath={.spec.replsets[].expose.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/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.rS56SntNeD +++ cat /tmp/tmp.yZ92JSO2kz +++ rm /tmp/tmp.rS56SntNeD /tmp/tmp.yZ92JSO2kz +++ return 0 ++ '[' true '!=' true ']' ++ kubectl_bin get service/cross-site-sharded-replica-rs0-2 -o 'jsonpath={.spec.type}' ++ grep -q NotFound +++ kubectl_bin get service/cross-site-sharded-replica-rs0-2 -o 'jsonpath={.spec.type}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.9EL9f5iBUw ++++ mktemp +++ local LAST_ERR=/tmp/tmp.lWlaZEAmDE +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'service/cross-site-sharded-replica-rs0-2' '-o' 'jsonpath={.spec.type}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ service/cross-site-sharded-replica-rs0-2 == \- ]] +++ [[ service/cross-site-sharded-replica-rs0-2 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.type} == \- ]] +++ [[ jsonpath={.spec.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 service/cross-site-sharded-replica-rs0-2 -o 'jsonpath={.spec.type}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.9EL9f5iBUw +++ cat /tmp/tmp.lWlaZEAmDE +++ rm /tmp/tmp.9EL9f5iBUw /tmp/tmp.lWlaZEAmDE +++ return 0 ++ service_type=ClusterIP ++ '[' ClusterIP = ClusterIP ']' ++ kubectl_bin get service/cross-site-sharded-replica-rs0-2 -o 'jsonpath={.spec.clusterIP}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.pH2QzP8qbu +++ mktemp ++ local LAST_ERR=/tmp/tmp.q0Y1pFkR28 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'service/cross-site-sharded-replica-rs0-2' '-o' 'jsonpath={.spec.clusterIP}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ service/cross-site-sharded-replica-rs0-2 == \- ]] ++ [[ service/cross-site-sharded-replica-rs0-2 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.clusterIP} == \- ]] ++ [[ jsonpath={.spec.clusterIP} =~ ^(-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 service/cross-site-sharded-replica-rs0-2 -o 'jsonpath={.spec.clusterIP}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.pH2QzP8qbu ++ cat /tmp/tmp.q0Y1pFkR28 ++ rm /tmp/tmp.pH2QzP8qbu /tmp/tmp.q0Y1pFkR28 ++ return 0 ++ return + replica_rs0_2_endpoint=34.118.232.152 ++ get_service_ip cross-site-sharded-replica-rs1-0 rs1 ++ local service=cross-site-sharded-replica-rs1-0 ++ local server_type=rs1 +++ kubectl_bin get psmdb/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.LuYERj3dgk ++++ mktemp +++ local LAST_ERR=/tmp/tmp.03l51RFA2Z +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'psmdb/cross-site-sharded-replica' '-o' 'jsonpath={.spec.replsets[].expose.enabled}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ psmdb/cross-site-sharded-replica == \- ]] +++ [[ psmdb/cross-site-sharded-replica =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.replsets[].expose.enabled} == \- ]] +++ [[ jsonpath={.spec.replsets[].expose.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/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.LuYERj3dgk +++ cat /tmp/tmp.03l51RFA2Z +++ rm /tmp/tmp.LuYERj3dgk /tmp/tmp.03l51RFA2Z +++ return 0 ++ '[' true '!=' true ']' ++ kubectl_bin get service/cross-site-sharded-replica-rs1-0 -o 'jsonpath={.spec.type}' ++ grep -q NotFound +++ kubectl_bin get service/cross-site-sharded-replica-rs1-0 -o 'jsonpath={.spec.type}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.bZqJOASQvf ++++ mktemp +++ local LAST_ERR=/tmp/tmp.NJVGnTOJvF +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'service/cross-site-sharded-replica-rs1-0' '-o' 'jsonpath={.spec.type}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ service/cross-site-sharded-replica-rs1-0 == \- ]] +++ [[ service/cross-site-sharded-replica-rs1-0 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.type} == \- ]] +++ [[ jsonpath={.spec.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 service/cross-site-sharded-replica-rs1-0 -o 'jsonpath={.spec.type}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.bZqJOASQvf +++ cat /tmp/tmp.NJVGnTOJvF +++ rm /tmp/tmp.bZqJOASQvf /tmp/tmp.NJVGnTOJvF +++ return 0 ++ service_type=ClusterIP ++ '[' ClusterIP = ClusterIP ']' ++ kubectl_bin get service/cross-site-sharded-replica-rs1-0 -o 'jsonpath={.spec.clusterIP}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.fydHetOaR6 +++ mktemp ++ local LAST_ERR=/tmp/tmp.BfQqfe47Ri ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'service/cross-site-sharded-replica-rs1-0' '-o' 'jsonpath={.spec.clusterIP}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ service/cross-site-sharded-replica-rs1-0 == \- ]] ++ [[ service/cross-site-sharded-replica-rs1-0 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.clusterIP} == \- ]] ++ [[ jsonpath={.spec.clusterIP} =~ ^(-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 service/cross-site-sharded-replica-rs1-0 -o 'jsonpath={.spec.clusterIP}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.fydHetOaR6 ++ cat /tmp/tmp.BfQqfe47Ri ++ rm /tmp/tmp.fydHetOaR6 /tmp/tmp.BfQqfe47Ri ++ return 0 ++ return + replica_rs1_0_endpoint=34.118.239.22 ++ get_service_ip cross-site-sharded-replica-rs1-1 rs1 ++ local service=cross-site-sharded-replica-rs1-1 ++ local server_type=rs1 +++ kubectl_bin get psmdb/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.UWvLm6tzx1 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.G1jWgnFOT0 +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'psmdb/cross-site-sharded-replica' '-o' 'jsonpath={.spec.replsets[].expose.enabled}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ psmdb/cross-site-sharded-replica == \- ]] +++ [[ psmdb/cross-site-sharded-replica =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.replsets[].expose.enabled} == \- ]] +++ [[ jsonpath={.spec.replsets[].expose.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/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.UWvLm6tzx1 +++ cat /tmp/tmp.G1jWgnFOT0 +++ rm /tmp/tmp.UWvLm6tzx1 /tmp/tmp.G1jWgnFOT0 +++ return 0 ++ '[' true '!=' true ']' ++ grep -q NotFound ++ kubectl_bin get service/cross-site-sharded-replica-rs1-1 -o 'jsonpath={.spec.type}' +++ kubectl_bin get service/cross-site-sharded-replica-rs1-1 -o 'jsonpath={.spec.type}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.L2rnroUwCG ++++ mktemp +++ local LAST_ERR=/tmp/tmp.Ye9Wfo3X3i +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'service/cross-site-sharded-replica-rs1-1' '-o' 'jsonpath={.spec.type}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ service/cross-site-sharded-replica-rs1-1 == \- ]] +++ [[ service/cross-site-sharded-replica-rs1-1 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.type} == \- ]] +++ [[ jsonpath={.spec.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 service/cross-site-sharded-replica-rs1-1 -o 'jsonpath={.spec.type}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.L2rnroUwCG +++ cat /tmp/tmp.Ye9Wfo3X3i +++ rm /tmp/tmp.L2rnroUwCG /tmp/tmp.Ye9Wfo3X3i +++ return 0 ++ service_type=ClusterIP ++ '[' ClusterIP = ClusterIP ']' ++ kubectl_bin get service/cross-site-sharded-replica-rs1-1 -o 'jsonpath={.spec.clusterIP}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.FTMbMZe7Go +++ mktemp ++ local LAST_ERR=/tmp/tmp.UqYGyPLMBz ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'service/cross-site-sharded-replica-rs1-1' '-o' 'jsonpath={.spec.clusterIP}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ service/cross-site-sharded-replica-rs1-1 == \- ]] ++ [[ service/cross-site-sharded-replica-rs1-1 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.clusterIP} == \- ]] ++ [[ jsonpath={.spec.clusterIP} =~ ^(-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 service/cross-site-sharded-replica-rs1-1 -o 'jsonpath={.spec.clusterIP}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.FTMbMZe7Go ++ cat /tmp/tmp.UqYGyPLMBz ++ rm /tmp/tmp.FTMbMZe7Go /tmp/tmp.UqYGyPLMBz ++ return 0 ++ return + replica_rs1_1_endpoint=34.118.227.228 ++ get_service_ip cross-site-sharded-replica-rs1-2 rs1 ++ local service=cross-site-sharded-replica-rs1-2 ++ local server_type=rs1 +++ kubectl_bin get psmdb/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.xaUEOdszjQ ++++ mktemp +++ local LAST_ERR=/tmp/tmp.rD6TyuH7DY +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'psmdb/cross-site-sharded-replica' '-o' 'jsonpath={.spec.replsets[].expose.enabled}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ psmdb/cross-site-sharded-replica == \- ]] +++ [[ psmdb/cross-site-sharded-replica =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.replsets[].expose.enabled} == \- ]] +++ [[ jsonpath={.spec.replsets[].expose.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/cross-site-sharded-replica -o 'jsonpath={.spec.replsets[].expose.enabled}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.xaUEOdszjQ +++ cat /tmp/tmp.rD6TyuH7DY +++ rm /tmp/tmp.xaUEOdszjQ /tmp/tmp.rD6TyuH7DY +++ return 0 ++ '[' true '!=' true ']' ++ grep -q NotFound ++ kubectl_bin get service/cross-site-sharded-replica-rs1-2 -o 'jsonpath={.spec.type}' +++ kubectl_bin get service/cross-site-sharded-replica-rs1-2 -o 'jsonpath={.spec.type}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.La9YVghChy ++++ mktemp +++ local LAST_ERR=/tmp/tmp.xbxHt6Swm4 +++ local exit_status=0 +++ local timeout=4 +++ local i +++ args=('get' 'service/cross-site-sharded-replica-rs1-2' '-o' 'jsonpath={.spec.type}') +++ local args +++ transformed_files=() +++ local transformed_files +++ local stdin_manifest +++ for i in "${!args[@]}" +++ [[ get == \- ]] +++ [[ get =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ service/cross-site-sharded-replica-rs1-2 == \- ]] +++ [[ service/cross-site-sharded-replica-rs1-2 =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ -o == \- ]] +++ [[ -o =~ ^(-f|--filename)=-$ ]] +++ for i in "${!args[@]}" +++ [[ jsonpath={.spec.type} == \- ]] +++ [[ jsonpath={.spec.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 service/cross-site-sharded-replica-rs1-2 -o 'jsonpath={.spec.type}' +++ exit_status=0 +++ set -e +++ [[ 0 == 0 ]] +++ break +++ cat /tmp/tmp.La9YVghChy +++ cat /tmp/tmp.xbxHt6Swm4 +++ rm /tmp/tmp.La9YVghChy /tmp/tmp.xbxHt6Swm4 +++ return 0 ++ service_type=ClusterIP ++ '[' ClusterIP = ClusterIP ']' ++ kubectl_bin get service/cross-site-sharded-replica-rs1-2 -o 'jsonpath={.spec.clusterIP}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.qT6yte0AIZ +++ mktemp ++ local LAST_ERR=/tmp/tmp.Vj1dCYnzMq ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'service/cross-site-sharded-replica-rs1-2' '-o' 'jsonpath={.spec.clusterIP}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ service/cross-site-sharded-replica-rs1-2 == \- ]] ++ [[ service/cross-site-sharded-replica-rs1-2 =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.clusterIP} == \- ]] ++ [[ jsonpath={.spec.clusterIP} =~ ^(-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 service/cross-site-sharded-replica-rs1-2 -o 'jsonpath={.spec.clusterIP}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.qT6yte0AIZ ++ cat /tmp/tmp.Vj1dCYnzMq ++ rm /tmp/tmp.qT6yte0AIZ /tmp/tmp.Vj1dCYnzMq ++ return 0 ++ return + replica_rs1_2_endpoint=34.118.233.94 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.UtPfajscov +++ mktemp ++ local LAST_ERR=/tmp/tmp.Hr0PFPEINY ++ 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.UtPfajscov ++ cat /tmp/tmp.Hr0PFPEINY ++ rm /tmp/tmp.UtPfajscov /tmp/tmp.Hr0PFPEINY ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-8852 ++ mktemp + local LAST_OUT=/tmp/tmp.ByfhLQl5cQ ++ mktemp + local LAST_ERR=/tmp/tmp.s28VAHSu4A + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5' '--namespace=cross-site-sharded-8852') + 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-2742-cf134fefe-2-cluster5 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --namespace=cross-site-sharded-8852 == \- ]] + [[ --namespace=cross-site-sharded-8852 =~ ^(-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-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-8852 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.ByfhLQl5cQ Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5" modified. + cat /tmp/tmp.s28VAHSu4A + rm /tmp/tmp.ByfhLQl5cQ /tmp/tmp.s28VAHSu4A + return 0 + kubectl_bin patch psmdb cross-site-sharded-main --type=merge --patch $'{\n\t\t\t"spec": {"replsets":[\n\t\t\t {"affinity":{"antiAffinityTopologyKey": "none"},"arbiter":{"affinity":{"antiAffinityTopologyKey": "none"},"enabled":false,"size":1},"expose":{"enabled":true,"type":"ClusterIp"},"externalNodes":[{"host":"34.118.225.204","priority":0,"votes":0},{"host":"34.118.232.62","port":27017,"priority":1,"votes":1},{"host":"34.118.232.152", "port":27017,"priority":1,"votes":1}],"name":"rs0","nonvoting":{"affinity":{"antiAffinityTopologyKey":"none"},"enabled":false,"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"1Gi"}}}}},"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"3Gi"}}}}},\n\t\t\t {"affinity":{"antiAffinityTopologyKey": "none"},"arbiter":{"affinity":{"antiAffinityTopologyKey": "none"},"enabled":false,"size":1},"expose":{"enabled":true,"type":"ClusterIp"},"externalNodes":[{"host":"34.118.239.22","priority":0,"votes":0},{"host":"34.118.227.228","port":27017,"priority":1,"votes":1},{"host":"34.118.233.94", "port":27017,"priority":1,"votes":1}],"name":"rs1","nonvoting":{"affinity":{"antiAffinityTopologyKey":"none"},"enabled":false,"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"1Gi"}}}}},"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"3Gi"}}}}}\n\t\t\t ],\n\t\t\t "sharding":{"configsvrReplSet":{ "externalNodes": [{"host":"34.118.234.197","priority":1,"votes":1 },{"host":"34.118.228.222", "priority":1,"votes":1},{"host":"34.118.230.27","priority":0,"votes":0}]}}\n\t\t\t }\n\t\t}' ++ mktemp + local LAST_OUT=/tmp/tmp.0JGAgYi46b ++ mktemp + local LAST_ERR=/tmp/tmp.XRXJzxMJ6s + local exit_status=0 + local timeout=4 + local i + args=('patch' 'psmdb' 'cross-site-sharded-main' '--type=merge' '--patch' '{ "spec": {"replsets":[ {"affinity":{"antiAffinityTopologyKey": "none"},"arbiter":{"affinity":{"antiAffinityTopologyKey": "none"},"enabled":false,"size":1},"expose":{"enabled":true,"type":"ClusterIp"},"externalNodes":[{"host":"34.118.225.204","priority":0,"votes":0},{"host":"34.118.232.62","port":27017,"priority":1,"votes":1},{"host":"34.118.232.152", "port":27017,"priority":1,"votes":1}],"name":"rs0","nonvoting":{"affinity":{"antiAffinityTopologyKey":"none"},"enabled":false,"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"1Gi"}}}}},"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"3Gi"}}}}}, {"affinity":{"antiAffinityTopologyKey": "none"},"arbiter":{"affinity":{"antiAffinityTopologyKey": "none"},"enabled":false,"size":1},"expose":{"enabled":true,"type":"ClusterIp"},"externalNodes":[{"host":"34.118.239.22","priority":0,"votes":0},{"host":"34.118.227.228","port":27017,"priority":1,"votes":1},{"host":"34.118.233.94", "port":27017,"priority":1,"votes":1}],"name":"rs1","nonvoting":{"affinity":{"antiAffinityTopologyKey":"none"},"enabled":false,"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"1Gi"}}}}},"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"3Gi"}}}}} ], "sharding":{"configsvrReplSet":{ "externalNodes": [{"host":"34.118.234.197","priority":1,"votes":1 },{"host":"34.118.228.222", "priority":1,"votes":1},{"host":"34.118.230.27","priority":0,"votes":0}]}} } }') + 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[@]}" + [[ cross-site-sharded-main == \- ]] + [[ cross-site-sharded-main =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --type=merge == \- ]] + [[ --type=merge =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --patch == \- ]] + [[ --patch =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ { "spec": {"replsets":[ {"affinity":{"antiAffinityTopologyKey": "none"},"arbiter":{"affinity":{"antiAffinityTopologyKey": "none"},"enabled":false,"size":1},"expose":{"enabled":true,"type":"ClusterIp"},"externalNodes":[{"host":"34.118.225.204","priority":0,"votes":0},{"host":"34.118.232.62","port":27017,"priority":1,"votes":1},{"host":"34.118.232.152", "port":27017,"priority":1,"votes":1}],"name":"rs0","nonvoting":{"affinity":{"antiAffinityTopologyKey":"none"},"enabled":false,"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"1Gi"}}}}},"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"3Gi"}}}}}, {"affinity":{"antiAffinityTopologyKey": "none"},"arbiter":{"affinity":{"antiAffinityTopologyKey": "none"},"enabled":false,"size":1},"expose":{"enabled":true,"type":"ClusterIp"},"externalNodes":[{"host":"34.118.239.22","priority":0,"votes":0},{"host":"34.118.227.228","port":27017,"priority":1,"votes":1},{"host":"34.118.233.94", "port":27017,"priority":1,"votes":1}],"name":"rs1","nonvoting":{"affinity":{"antiAffinityTopologyKey":"none"},"enabled":false,"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"1Gi"}}}}},"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"3Gi"}}}}} ], "sharding":{"configsvrReplSet":{ "externalNodes": [{"host":"34.118.234.197","priority":1,"votes":1 },{"host":"34.118.228.222", "priority":1,"votes":1},{"host":"34.118.230.27","priority":0,"votes":0}]}} } } == \- ]] + [[ { "spec": {"replsets":[ {"affinity":{"antiAffinityTopologyKey": "none"},"arbiter":{"affinity":{"antiAffinityTopologyKey": "none"},"enabled":false,"size":1},"expose":{"enabled":true,"type":"ClusterIp"},"externalNodes":[{"host":"34.118.225.204","priority":0,"votes":0},{"host":"34.118.232.62","port":27017,"priority":1,"votes":1},{"host":"34.118.232.152", "port":27017,"priority":1,"votes":1}],"name":"rs0","nonvoting":{"affinity":{"antiAffinityTopologyKey":"none"},"enabled":false,"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"1Gi"}}}}},"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"3Gi"}}}}}, {"affinity":{"antiAffinityTopologyKey": "none"},"arbiter":{"affinity":{"antiAffinityTopologyKey": "none"},"enabled":false,"size":1},"expose":{"enabled":true,"type":"ClusterIp"},"externalNodes":[{"host":"34.118.239.22","priority":0,"votes":0},{"host":"34.118.227.228","port":27017,"priority":1,"votes":1},{"host":"34.118.233.94", "port":27017,"priority":1,"votes":1}],"name":"rs1","nonvoting":{"affinity":{"antiAffinityTopologyKey":"none"},"enabled":false,"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"1Gi"}}}}},"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"3Gi"}}}}} ], "sharding":{"configsvrReplSet":{ "externalNodes": [{"host":"34.118.234.197","priority":1,"votes":1 },{"host":"34.118.228.222", "priority":1,"votes":1},{"host":"34.118.230.27","priority":0,"votes":0}]}} } } =~ ^(-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 cross-site-sharded-main --type=merge --patch $'{\n\t\t\t"spec": {"replsets":[\n\t\t\t {"affinity":{"antiAffinityTopologyKey": "none"},"arbiter":{"affinity":{"antiAffinityTopologyKey": "none"},"enabled":false,"size":1},"expose":{"enabled":true,"type":"ClusterIp"},"externalNodes":[{"host":"34.118.225.204","priority":0,"votes":0},{"host":"34.118.232.62","port":27017,"priority":1,"votes":1},{"host":"34.118.232.152", "port":27017,"priority":1,"votes":1}],"name":"rs0","nonvoting":{"affinity":{"antiAffinityTopologyKey":"none"},"enabled":false,"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"1Gi"}}}}},"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"3Gi"}}}}},\n\t\t\t {"affinity":{"antiAffinityTopologyKey": "none"},"arbiter":{"affinity":{"antiAffinityTopologyKey": "none"},"enabled":false,"size":1},"expose":{"enabled":true,"type":"ClusterIp"},"externalNodes":[{"host":"34.118.239.22","priority":0,"votes":0},{"host":"34.118.227.228","port":27017,"priority":1,"votes":1},{"host":"34.118.233.94", "port":27017,"priority":1,"votes":1}],"name":"rs1","nonvoting":{"affinity":{"antiAffinityTopologyKey":"none"},"enabled":false,"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"1Gi"}}}}},"podDisruptionBudget":{"maxUnavailable":1},"resources":{"limits":{"cpu":"300m","memory":"0.5G"},"requests":{"cpu":"300m","memory":"0.5G"}},"size":3,"volumeSpec":{"persistentVolumeClaim":{"resources":{"requests":{"storage":"3Gi"}}}}}\n\t\t\t ],\n\t\t\t "sharding":{"configsvrReplSet":{ "externalNodes": [{"host":"34.118.234.197","priority":1,"votes":1 },{"host":"34.118.228.222", "priority":1,"votes":1},{"host":"34.118.230.27","priority":0,"votes":0}]}}\n\t\t\t }\n\t\t}' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.0JGAgYi46b perconaservermongodb.psmdb.percona.com/cross-site-sharded-main patched + cat /tmp/tmp.XRXJzxMJ6s + rm /tmp/tmp.0JGAgYi46b /tmp/tmp.XRXJzxMJ6s + return 0 + arch_scheduling_enabled + [[ -n '' ]] + wait_for_members 34.118.234.197 cfg 6 + local endpoint=34.118.234.197 + local rsName=cfg + local target_count=6 + local nodes_count=0 + [[ 0 == 6 ]] ++ run_mongos 'rs.conf().members.length' clusterAdmin:clusterAdmin123456@34.118.234.197 mongodb :27017 ++ local 'command=rs.conf().members.length' ++ local uri=clusterAdmin:clusterAdmin123456@34.118.234.197 ++ local driver=mongodb ++ local suffix=:27017 ++ local mongo_flag= ++ local port=27017 ++ local mongo_bin=mongo ++ grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' ++ /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' +++ echo :27017 +++ awk -F: '{print $2}' ++ suffix_port=27017 ++ [[ -z 27017 ]] +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.7GySFXFf0q ++++ mktemp +++ local LAST_ERR=/tmp/tmp.5VOYAsSFFX +++ 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.7GySFXFf0q +++ cat /tmp/tmp.5VOYAsSFFX +++ rm /tmp/tmp.7GySFXFf0q /tmp/tmp.5VOYAsSFFX +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.15FZ5cPjP4 +++ mktemp ++ local LAST_ERR=/tmp/tmp.nyAHZtV8ny ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.15FZ5cPjP4 ++ cat /tmp/tmp.nyAHZtV8ny ++ rm /tmp/tmp.15FZ5cPjP4 /tmp/tmp.nyAHZtV8ny ++ return 0 + nodes_count=5 + echo -n 'waiting for all members to be configured in cfg' waiting for all members to be configured in cfg+ let retry+=1 + '[' 1 -ge 15 ']' + echo . . + sleep 10 + [[ 5 == 6 ]] ++ run_mongos 'rs.conf().members.length' clusterAdmin:clusterAdmin123456@34.118.234.197 mongodb :27017 ++ grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' ++ local 'command=rs.conf().members.length' ++ /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' ++ local uri=clusterAdmin:clusterAdmin123456@34.118.234.197 ++ local driver=mongodb ++ local suffix=:27017 ++ local mongo_flag= ++ local port=27017 ++ local mongo_bin=mongo +++ echo :27017 +++ awk -F: '{print $2}' ++ suffix_port=27017 ++ [[ -z 27017 ]] +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.ETH8I9DzdF ++++ mktemp +++ local LAST_ERR=/tmp/tmp.ODrJrvYSFr +++ 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.ETH8I9DzdF +++ cat /tmp/tmp.ODrJrvYSFr +++ rm /tmp/tmp.ETH8I9DzdF /tmp/tmp.ODrJrvYSFr +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.5RqUR5cC0c +++ mktemp ++ local LAST_ERR=/tmp/tmp.wEy1Aivx9A ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.5RqUR5cC0c ++ cat /tmp/tmp.wEy1Aivx9A ++ rm /tmp/tmp.5RqUR5cC0c /tmp/tmp.wEy1Aivx9A ++ return 0 + nodes_count=5 + echo -n 'waiting for all members to be configured in cfg' waiting for all members to be configured in cfg+ let retry+=1 + '[' 2 -ge 15 ']' + echo . . + sleep 10 + [[ 5 == 6 ]] ++ run_mongos 'rs.conf().members.length' clusterAdmin:clusterAdmin123456@34.118.234.197 mongodb :27017 ++ local 'command=rs.conf().members.length' ++ local uri=clusterAdmin:clusterAdmin123456@34.118.234.197 ++ local driver=mongodb ++ local suffix=:27017 ++ grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' ++ local mongo_flag= ++ local port=27017 ++ local mongo_bin=mongo ++ /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' +++ echo :27017 +++ awk -F: '{print $2}' ++ suffix_port=27017 ++ [[ -z 27017 ]] +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.4hcs3T6ZGo ++++ mktemp +++ local LAST_ERR=/tmp/tmp.0Hqy6eTH3y +++ 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.4hcs3T6ZGo +++ cat /tmp/tmp.0Hqy6eTH3y +++ rm /tmp/tmp.4hcs3T6ZGo /tmp/tmp.0Hqy6eTH3y +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.eB47BQEDwH +++ mktemp ++ local LAST_ERR=/tmp/tmp.zHdpInA1hv ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.eB47BQEDwH ++ cat /tmp/tmp.zHdpInA1hv ++ rm /tmp/tmp.eB47BQEDwH /tmp/tmp.zHdpInA1hv ++ return 0 + nodes_count=5 + echo -n 'waiting for all members to be configured in cfg' waiting for all members to be configured in cfg+ let retry+=1 + '[' 3 -ge 15 ']' + echo . . + sleep 10 + [[ 5 == 6 ]] ++ run_mongos 'rs.conf().members.length' clusterAdmin:clusterAdmin123456@34.118.234.197 mongodb :27017 ++ local 'command=rs.conf().members.length' ++ local uri=clusterAdmin:clusterAdmin123456@34.118.234.197 ++ local driver=mongodb ++ grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' ++ local suffix=:27017 ++ local mongo_flag= ++ local port=27017 ++ local mongo_bin=mongo ++ /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' +++ awk -F: '{print $2}' +++ echo :27017 ++ suffix_port=27017 ++ [[ -z 27017 ]] +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.WgbA0NNPZB ++++ mktemp +++ local LAST_ERR=/tmp/tmp.AAOJ5tlUpL +++ 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.WgbA0NNPZB +++ cat /tmp/tmp.AAOJ5tlUpL +++ rm /tmp/tmp.WgbA0NNPZB /tmp/tmp.AAOJ5tlUpL +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.tHUNZb7fCK +++ mktemp ++ local LAST_ERR=/tmp/tmp.b3dJ0dMopw ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.tHUNZb7fCK ++ cat /tmp/tmp.b3dJ0dMopw ++ rm /tmp/tmp.tHUNZb7fCK /tmp/tmp.b3dJ0dMopw ++ return 0 + nodes_count=5 + echo -n 'waiting for all members to be configured in cfg' waiting for all members to be configured in cfg+ let retry+=1 + '[' 4 -ge 15 ']' + echo . . + sleep 10 + [[ 5 == 6 ]] ++ run_mongos 'rs.conf().members.length' clusterAdmin:clusterAdmin123456@34.118.234.197 mongodb :27017 ++ grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' ++ /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' ++ local 'command=rs.conf().members.length' ++ local uri=clusterAdmin:clusterAdmin123456@34.118.234.197 ++ local driver=mongodb ++ local suffix=:27017 ++ local mongo_flag= ++ local port=27017 ++ local mongo_bin=mongo +++ echo :27017 +++ awk -F: '{print $2}' ++ suffix_port=27017 ++ [[ -z 27017 ]] +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.b9jWugHnFm ++++ mktemp +++ local LAST_ERR=/tmp/tmp.CFAePItfXD +++ 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.b9jWugHnFm +++ cat /tmp/tmp.CFAePItfXD +++ rm /tmp/tmp.b9jWugHnFm /tmp/tmp.CFAePItfXD +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.EIXVWdowRA +++ mktemp ++ local LAST_ERR=/tmp/tmp.TmJv3sDCZt ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.EIXVWdowRA ++ cat /tmp/tmp.TmJv3sDCZt ++ rm /tmp/tmp.EIXVWdowRA /tmp/tmp.TmJv3sDCZt ++ return 0 + nodes_count=5 + echo -n 'waiting for all members to be configured in cfg' waiting for all members to be configured in cfg+ let retry+=1 + '[' 5 -ge 15 ']' + echo . . + sleep 10 + [[ 5 == 6 ]] ++ run_mongos 'rs.conf().members.length' clusterAdmin:clusterAdmin123456@34.118.234.197 mongodb :27017 ++ local 'command=rs.conf().members.length' ++ local uri=clusterAdmin:clusterAdmin123456@34.118.234.197 ++ local driver=mongodb ++ local suffix=:27017 ++ local mongo_flag= ++ local port=27017 ++ grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' ++ local mongo_bin=mongo ++ /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' +++ echo :27017 +++ awk -F: '{print $2}' ++ suffix_port=27017 ++ [[ -z 27017 ]] +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.SZbAlqkycx ++++ mktemp +++ local LAST_ERR=/tmp/tmp.mAclBlF8el +++ 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.SZbAlqkycx +++ cat /tmp/tmp.mAclBlF8el +++ rm /tmp/tmp.SZbAlqkycx /tmp/tmp.mAclBlF8el +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.4kmznWxYcS +++ mktemp ++ local LAST_ERR=/tmp/tmp.IQ9kOOGe6e ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.4kmznWxYcS ++ cat /tmp/tmp.IQ9kOOGe6e ++ rm /tmp/tmp.4kmznWxYcS /tmp/tmp.IQ9kOOGe6e ++ return 0 + nodes_count=5 + echo -n 'waiting for all members to be configured in cfg' waiting for all members to be configured in cfg+ let retry+=1 + '[' 6 -ge 15 ']' + echo . . + sleep 10 + [[ 5 == 6 ]] ++ run_mongos 'rs.conf().members.length' clusterAdmin:clusterAdmin123456@34.118.234.197 mongodb :27017 ++ grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' ++ local 'command=rs.conf().members.length' ++ local uri=clusterAdmin:clusterAdmin123456@34.118.234.197 ++ local driver=mongodb ++ local suffix=:27017 ++ local mongo_flag= ++ local port=27017 ++ local mongo_bin=mongo ++ /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' +++ echo :27017 +++ awk -F: '{print $2}' ++ suffix_port=27017 ++ [[ -z 27017 ]] +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.6BfdHYXnnT ++++ mktemp +++ local LAST_ERR=/tmp/tmp.vQMGeHAiX0 +++ 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.6BfdHYXnnT +++ cat /tmp/tmp.vQMGeHAiX0 +++ rm /tmp/tmp.6BfdHYXnnT /tmp/tmp.vQMGeHAiX0 +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.R25DdRzAqV +++ mktemp ++ local LAST_ERR=/tmp/tmp.r0b7myAeWe ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.R25DdRzAqV ++ cat /tmp/tmp.r0b7myAeWe ++ rm /tmp/tmp.R25DdRzAqV /tmp/tmp.r0b7myAeWe ++ return 0 + nodes_count=5 + echo -n 'waiting for all members to be configured in cfg' waiting for all members to be configured in cfg+ let retry+=1 + '[' 7 -ge 15 ']' + echo . . + sleep 10 + [[ 5 == 6 ]] ++ run_mongos 'rs.conf().members.length' clusterAdmin:clusterAdmin123456@34.118.234.197 mongodb :27017 ++ local 'command=rs.conf().members.length' ++ local uri=clusterAdmin:clusterAdmin123456@34.118.234.197 ++ local driver=mongodb ++ local suffix=:27017 ++ local mongo_flag= ++ local port=27017 ++ local mongo_bin=mongo ++ grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' ++ /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' +++ echo :27017 +++ awk -F: '{print $2}' ++ suffix_port=27017 ++ [[ -z 27017 ]] +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.jagQ2VdZCi ++++ mktemp +++ local LAST_ERR=/tmp/tmp.bRxY3Cs8YD +++ 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.jagQ2VdZCi +++ cat /tmp/tmp.bRxY3Cs8YD +++ rm /tmp/tmp.jagQ2VdZCi /tmp/tmp.bRxY3Cs8YD +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.r0RsRuCGPW +++ mktemp ++ local LAST_ERR=/tmp/tmp.3DGS99J94r ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.r0RsRuCGPW ++ cat /tmp/tmp.3DGS99J94r ++ rm /tmp/tmp.r0RsRuCGPW /tmp/tmp.3DGS99J94r ++ return 0 + nodes_count=5 + echo -n 'waiting for all members to be configured in cfg' waiting for all members to be configured in cfg+ let retry+=1 + '[' 8 -ge 15 ']' + echo . . + sleep 10 + [[ 5 == 6 ]] ++ run_mongos 'rs.conf().members.length' clusterAdmin:clusterAdmin123456@34.118.234.197 mongodb :27017 ++ local 'command=rs.conf().members.length' ++ local uri=clusterAdmin:clusterAdmin123456@34.118.234.197 ++ local driver=mongodb ++ local suffix=:27017 ++ local mongo_flag= ++ local port=27017 ++ local mongo_bin=mongo ++ grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' ++ /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' +++ echo :27017 +++ awk -F: '{print $2}' ++ suffix_port=27017 ++ [[ -z 27017 ]] +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.ZQ0dhpvtXZ ++++ mktemp +++ local LAST_ERR=/tmp/tmp.LdxyyHXkpn +++ 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.ZQ0dhpvtXZ +++ cat /tmp/tmp.LdxyyHXkpn +++ rm /tmp/tmp.ZQ0dhpvtXZ /tmp/tmp.LdxyyHXkpn +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.GuDPmV5hk4 +++ mktemp ++ local LAST_ERR=/tmp/tmp.iFF3IlVCmm ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.GuDPmV5hk4 ++ cat /tmp/tmp.iFF3IlVCmm ++ rm /tmp/tmp.GuDPmV5hk4 /tmp/tmp.iFF3IlVCmm ++ return 0 + nodes_count=6 + echo -n 'waiting for all members to be configured in cfg' waiting for all members to be configured in cfg+ let retry+=1 + '[' 9 -ge 15 ']' + echo . . + sleep 10 + [[ 6 == 6 ]] + wait_for_members 34.118.225.204 rs0 6 + local endpoint=34.118.225.204 + local rsName=rs0 + local target_count=6 + local nodes_count=0 + [[ 0 == 6 ]] ++ run_mongos 'rs.conf().members.length' clusterAdmin:clusterAdmin123456@34.118.225.204 mongodb :27017 ++ local 'command=rs.conf().members.length' ++ local uri=clusterAdmin:clusterAdmin123456@34.118.225.204 ++ local driver=mongodb ++ local suffix=:27017 ++ local mongo_flag= ++ local port=27017 ++ grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' ++ local mongo_bin=mongo ++ /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' +++ awk -F: '{print $2}' +++ echo :27017 ++ suffix_port=27017 ++ [[ -z 27017 ]] +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.jHivfwbwCD ++++ mktemp +++ local LAST_ERR=/tmp/tmp.8UzFWpIR3O +++ 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.jHivfwbwCD +++ cat /tmp/tmp.8UzFWpIR3O +++ rm /tmp/tmp.jHivfwbwCD /tmp/tmp.8UzFWpIR3O +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.225.204:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.EoO1UhHus9 +++ mktemp ++ local LAST_ERR=/tmp/tmp.IkQFiEJyEY ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.225.204:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.225.204:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.225.204:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.225.204:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.EoO1UhHus9 ++ cat /tmp/tmp.IkQFiEJyEY ++ rm /tmp/tmp.EoO1UhHus9 /tmp/tmp.IkQFiEJyEY ++ return 0 + nodes_count=6 + echo -n 'waiting for all members to be configured in rs0' waiting for all members to be configured in rs0+ let retry+=1 + '[' 10 -ge 15 ']' + echo . . + sleep 10 + [[ 6 == 6 ]] + wait_for_members 34.118.239.22 rs1 6 + local endpoint=34.118.239.22 + local rsName=rs1 + local target_count=6 + local nodes_count=0 + [[ 0 == 6 ]] ++ run_mongos 'rs.conf().members.length' clusterAdmin:clusterAdmin123456@34.118.239.22 mongodb :27017 ++ local 'command=rs.conf().members.length' ++ local uri=clusterAdmin:clusterAdmin123456@34.118.239.22 ++ local driver=mongodb ++ local suffix=:27017 ++ local mongo_flag= ++ local port=27017 ++ local mongo_bin=mongo ++ grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' ++ /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' +++ echo :27017 +++ awk -F: '{print $2}' ++ suffix_port=27017 ++ [[ -z 27017 ]] +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.SGLDxiBJBU ++++ mktemp +++ local LAST_ERR=/tmp/tmp.0a6X1hm3BR +++ 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.SGLDxiBJBU +++ cat /tmp/tmp.0a6X1hm3BR +++ rm /tmp/tmp.SGLDxiBJBU /tmp/tmp.0a6X1hm3BR +++ return 0 ++ local client_container=psmdb-client-c8847c4cd-9vzfv ++ kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.239.22:27017/admin ' +++ mktemp ++ local LAST_OUT=/tmp/tmp.t2JElPjI8G +++ mktemp ++ local LAST_ERR=/tmp/tmp.0JZy1uB24R ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.239.22:27017/admin ') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ exec == \- ]] ++ [[ exec =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-client-c8847c4cd-9vzfv == \- ]] ++ [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.239.22:27017/admin == \- ]] ++ [[ export HOME=/tmp; printf 'rs.conf().members.length\n' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.239.22:27017/admin =~ ^(-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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; printf '\''rs.conf().members.length\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.239.22:27017/admin ' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.t2JElPjI8G ++ cat /tmp/tmp.0JZy1uB24R ++ rm /tmp/tmp.t2JElPjI8G /tmp/tmp.0JZy1uB24R ++ return 0 + nodes_count=6 + echo -n 'waiting for all members to be configured in rs1' waiting for all members to be configured in rs1+ let retry+=1 + '[' 11 -ge 15 ']' + echo . . + sleep 10 + [[ 6 == 6 ]] ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.MIXO0j8d9j +++ mktemp ++ local LAST_ERR=/tmp/tmp.RKMPn77dux ++ 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.MIXO0j8d9j ++ cat /tmp/tmp.RKMPn77dux ++ rm /tmp/tmp.MIXO0j8d9j /tmp/tmp.RKMPn77dux ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-replica-23121 ++ mktemp + local LAST_OUT=/tmp/tmp.Prf7nquNVe ++ mktemp + local LAST_ERR=/tmp/tmp.61Xcd9SWEz + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5' '--namespace=cross-site-sharded-replica-23121') + 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-2742-cf134fefe-2-cluster5 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --namespace=cross-site-sharded-replica-23121 == \- ]] + [[ --namespace=cross-site-sharded-replica-23121 =~ ^(-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-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-replica-23121 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.Prf7nquNVe Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5" modified. + cat /tmp/tmp.61Xcd9SWEz + rm /tmp/tmp.Prf7nquNVe /tmp/tmp.61Xcd9SWEz + return 0 + desc 'check if all 3 Pods started' + set +o xtrace ----------------------------------------------------------------------------------- check if all 3 Pods started ----------------------------------------------------------------------------------- + wait_for_running cross-site-sharded-replica-rs0 3 + local name=cross-site-sharded-replica-rs0 + let last_pod=2 + local check_cluster_readiness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=cross-site-sharded-replica ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod cross-site-sharded-replica-rs0-0 + local pod=cross-site-sharded-replica-rs0-0 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs0-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod cross-site-sharded-replica-rs0-1 + local pod=cross-site-sharded-replica-rs0-1 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs0-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.UBU4rlE7oZ +++ mktemp ++ local LAST_ERR=/tmp/tmp.wel8kLNN4A ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.UBU4rlE7oZ ++ cat /tmp/tmp.wel8kLNN4A ++ rm /tmp/tmp.UBU4rlE7oZ /tmp/tmp.wel8kLNN4A ++ return 0 + [[ false == true ]] + wait_pod cross-site-sharded-replica-rs0-2 + local pod=cross-site-sharded-replica-rs0-2 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs0-2 to be ready.OK ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.25ZFtsOgSz +++ mktemp ++ local LAST_ERR=/tmp/tmp.ygxIKXUM1y ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.25ZFtsOgSz ++ cat /tmp/tmp.ygxIKXUM1y ++ rm /tmp/tmp.25ZFtsOgSz /tmp/tmp.ygxIKXUM1y ++ return 0 + [[ false == true ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.FUneUX39XT +++ mktemp ++ local LAST_ERR=/tmp/tmp.Hx7bwJSGRr ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.FUneUX39XT ++ cat /tmp/tmp.Hx7bwJSGRr ++ rm /tmp/tmp.FUneUX39XT /tmp/tmp.Hx7bwJSGRr ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster cross-site-sharded-replica to be ready + wait_for_running cross-site-sharded-replica-cfg 3 false + local name=cross-site-sharded-replica-cfg + let last_pod=2 + local check_cluster_readiness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=cross-site-sharded-replica ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod cross-site-sharded-replica-cfg-0 + local pod=cross-site-sharded-replica-cfg-0 + set +o xtrace waiting for pod/cross-site-sharded-replica-cfg-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod cross-site-sharded-replica-cfg-1 + local pod=cross-site-sharded-replica-cfg-1 + set +o xtrace waiting for pod/cross-site-sharded-replica-cfg-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.QcX2Eeg5dx +++ mktemp ++ local LAST_ERR=/tmp/tmp.oi95LnCYD6 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.QcX2Eeg5dx ++ cat /tmp/tmp.oi95LnCYD6 ++ rm /tmp/tmp.QcX2Eeg5dx /tmp/tmp.oi95LnCYD6 ++ return 0 + [[ '' == true ]] + wait_pod cross-site-sharded-replica-cfg-2 + local pod=cross-site-sharded-replica-cfg-2 + set +o xtrace waiting for pod/cross-site-sharded-replica-cfg-2 to be ready.OK ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.xOiLgP3IV3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.0TBE67GzM4 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.xOiLgP3IV3 ++ cat /tmp/tmp.0TBE67GzM4 ++ rm /tmp/tmp.xOiLgP3IV3 /tmp/tmp.0TBE67GzM4 ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.3MSc7igMzo +++ mktemp ++ local LAST_ERR=/tmp/tmp.pwLWbgb6hW ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.3MSc7igMzo ++ cat /tmp/tmp.pwLWbgb6hW ++ rm /tmp/tmp.3MSc7igMzo /tmp/tmp.pwLWbgb6hW ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + desc 'create user' + set +o xtrace ----------------------------------------------------------------------------------- create user ----------------------------------------------------------------------------------- + run_mongos 'db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})' userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local 'command=db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})' + local uri=userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + 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.rO1ZGsLRk9 +++ mktemp ++ local LAST_ERR=/tmp/tmp.aasln707XR ++ 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.rO1ZGsLRk9 ++ cat /tmp/tmp.aasln707XR ++ rm /tmp/tmp.rO1ZGsLRk9 /tmp/tmp.aasln707XR ++ return 0 + local client_container=psmdb-client-c8847c4cd-v2gkq + kubectl_bin exec psmdb-client-c8847c4cd-v2gkq -- bash -c 'export HOME=/tmp; printf '\''db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.bPky9gMZ3c ++ mktemp + local LAST_ERR=/tmp/tmp.OthxxtFvkW + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-v2gkq' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-c8847c4cd-v2gkq == \- ]] + [[ psmdb-client-c8847c4cd-v2gkq =~ ^(-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:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})\n' | mongo mongodb://userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin == \- ]] + [[ export HOME=/tmp; printf 'db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})\n' | mongo mongodb://userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin =~ ^(-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-c8847c4cd-v2gkq -- bash -c 'export HOME=/tmp; printf '\''db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.bPky9gMZ3c Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("bd54a7e8-487a-4a8f-8ced-c15ec7387187") } Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match Successfully added user: { "user" : "myApp", "roles" : [ { "db" : "myApp", "role" : "readWrite" } ] } bye + cat /tmp/tmp.OthxxtFvkW + rm /tmp/tmp.bPky9gMZ3c /tmp/tmp.OthxxtFvkW + return 0 + sleep 2 + desc 'write data, read from all' + set +o xtrace ----------------------------------------------------------------------------------- write data, read from all ----------------------------------------------------------------------------------- + run_mongos 'use myApp\n db.test.insert({ x: 100500 })' myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local 'command=use myApp\n db.test.insert({ x: 100500 })' + local uri=myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + 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.CfyekVC92M +++ mktemp ++ local LAST_ERR=/tmp/tmp.fI6yb4NZuI ++ 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.CfyekVC92M ++ cat /tmp/tmp.fI6yb4NZuI ++ rm /tmp/tmp.CfyekVC92M /tmp/tmp.fI6yb4NZuI ++ return 0 + local client_container=psmdb-client-c8847c4cd-v2gkq + kubectl_bin exec psmdb-client-c8847c4cd-v2gkq -- bash -c 'export HOME=/tmp; printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.cFBw58OUj1 ++ mktemp + local LAST_ERR=/tmp/tmp.EqY2X10H9a + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-v2gkq' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-c8847c4cd-v2gkq == \- ]] + [[ psmdb-client-c8847c4cd-v2gkq =~ ^(-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 myApp\n db.test.insert({ x: 100500 })\n' | mongo mongodb://myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin == \- ]] + [[ export HOME=/tmp; printf 'use myApp\n db.test.insert({ x: 100500 })\n' | mongo mongodb://myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin =~ ^(-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-c8847c4cd-v2gkq -- bash -c 'export HOME=/tmp; printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.cFBw58OUj1 Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("1209a355-be1b-44d3-ba48-adcc0a775407") } Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.EqY2X10H9a + rm /tmp/tmp.cFBw58OUj1 /tmp/tmp.EqY2X10H9a + return 0 + minikube_sleep + sleep_time=10 + [[ '' == 1 ]] + desc 'Compare data' + set +o xtrace ----------------------------------------------------------------------------------- Compare data ----------------------------------------------------------------------------------- + compare_mongos_cmd find myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local command=find + local uri=myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local postfix= + local suffix= + local database=myApp + local collection=test + local port=27017 + local tls=false + local retries=3 + local retry_delay=10 + [[ false == true ]] + mongos_command=run_mongos + log 'running db.test.command() in myApp' + set +o xtrace [2026-11-24T09:22:51+0000] running db.test.command() in myApp ++ seq 1 3 + for attempt in $(seq 1 "$retries") + run_mongos 'use myApp\n db.test.find()' myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852 mongodb '' '' 27017 + local 'command=use myApp\n db.test.find()' + local uri=myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852 + local driver=mongodb + local suffix=.svc.cluster.local + grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|Started a new thread for the timer service' + local mongo_flag= + local port=27017 + local mongo_bin=mongo + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' ++ 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.UWJ8pJHS2T +++ mktemp ++ local LAST_ERR=/tmp/tmp.4YwOWvJ99S ++ 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.UWJ8pJHS2T ++ cat /tmp/tmp.4YwOWvJ99S ++ rm /tmp/tmp.UWJ8pJHS2T /tmp/tmp.4YwOWvJ99S ++ return 0 + local client_container=psmdb-client-c8847c4cd-v2gkq + kubectl_bin exec psmdb-client-c8847c4cd-v2gkq -- bash -c 'export HOME=/tmp; printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.zN57V55LiF ++ mktemp + local LAST_ERR=/tmp/tmp.dVtZPgfUXe + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-v2gkq' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-c8847c4cd-v2gkq == \- ]] + [[ psmdb-client-c8847c4cd-v2gkq =~ ^(-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 myApp\n db.test.find()\n' | mongo mongodb://myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin == \- ]] + [[ export HOME=/tmp; printf 'use myApp\n db.test.find()\n' | mongo mongodb://myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin =~ ^(-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-c8847c4cd-v2gkq -- bash -c 'export HOME=/tmp; printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@cross-site-sharded-main-mongos.cross-site-sharded-8852.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.zN57V55LiF + cat /tmp/tmp.dVtZPgfUXe + rm /tmp/tmp.zN57V55LiF /tmp/tmp.dVtZPgfUXe + return 0 + compare_mongo_output find '' + local command=find + local postfix= + [[ 0 -ne 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/compare/find.json /tmp/tmp.Ycc3QAC7ta/find + return + desc 'test failover' + set +o xtrace ----------------------------------------------------------------------------------- test failover ----------------------------------------------------------------------------------- ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.1ooW4IcwuL +++ mktemp ++ local LAST_ERR=/tmp/tmp.aGCWuEZTWq ++ 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.1ooW4IcwuL ++ cat /tmp/tmp.aGCWuEZTWq ++ rm /tmp/tmp.1ooW4IcwuL /tmp/tmp.aGCWuEZTWq ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-8852 ++ mktemp + local LAST_OUT=/tmp/tmp.FCsE4KDyZw ++ mktemp + local LAST_ERR=/tmp/tmp.WNkcpxEydJ + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5' '--namespace=cross-site-sharded-8852') + 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-2742-cf134fefe-2-cluster5 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --namespace=cross-site-sharded-8852 == \- ]] + [[ --namespace=cross-site-sharded-8852 =~ ^(-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-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-8852 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.FCsE4KDyZw Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5" modified. + cat /tmp/tmp.WNkcpxEydJ + rm /tmp/tmp.FCsE4KDyZw /tmp/tmp.WNkcpxEydJ + return 0 + kubectl_bin delete psmdb cross-site-sharded-main ++ mktemp + local LAST_OUT=/tmp/tmp.xbQgPmWNd6 ++ mktemp + local LAST_ERR=/tmp/tmp.bdY0JAejpN + local exit_status=0 + local timeout=4 + local i + args=('delete' 'psmdb' 'cross-site-sharded-main') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb == \- ]] + [[ psmdb =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cross-site-sharded-main == \- ]] + [[ cross-site-sharded-main =~ ^(-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 psmdb cross-site-sharded-main + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.xbQgPmWNd6 perconaservermongodb.psmdb.percona.com "cross-site-sharded-main" deleted from cross-site-sharded-8852 namespace + cat /tmp/tmp.bdY0JAejpN + rm /tmp/tmp.xbQgPmWNd6 /tmp/tmp.bdY0JAejpN + return 0 + desc 'run disaster recovery script for replset: cfg' + set +o xtrace ----------------------------------------------------------------------------------- run disaster recovery script for replset: cfg ----------------------------------------------------------------------------------- + run_script_mongos /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js clusterAdmin:clusterAdmin123456@34.118.234.197 mongodb :27017 + local script=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js + local uri=clusterAdmin:clusterAdmin123456@34.118.234.197 + local driver=mongodb + local suffix=:27017 + local mongo_flag= + local mongo_bin=mongo ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.z28ZmPk9I3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.e6QPWdLczD ++ 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.z28ZmPk9I3 ++ cat /tmp/tmp.e6QPWdLczD ++ rm /tmp/tmp.z28ZmPk9I3 /tmp/tmp.e6QPWdLczD ++ return 0 + local client_container=psmdb-client-c8847c4cd-9vzfv ++ basename /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js + name=disaster_recovery.js + kubectl_bin cp /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp ++ mktemp + local LAST_OUT=/tmp/tmp.KIOB2EMWmP ++ mktemp + local LAST_ERR=/tmp/tmp.6iC2KkJROb + local exit_status=0 + local timeout=4 + local i + args=('cp' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js' 'cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/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-2742/e2e-tests/cross-site-sharded/disaster_recovery.js == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp == \- ]] + [[ cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/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-2742/e2e-tests/cross-site-sharded/disaster_recovery.js cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.KIOB2EMWmP + cat /tmp/tmp.6iC2KkJROb + rm /tmp/tmp.KIOB2EMWmP /tmp/tmp.6iC2KkJROb + return 0 + kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin /tmp/disaster_recovery.js' ++ mktemp + local LAST_OUT=/tmp/tmp.BWyfViUfn0 ++ mktemp + local LAST_ERR=/tmp/tmp.TQyyPwX9QN + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin /tmp/disaster_recovery.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-c8847c4cd-9vzfv == \- ]] + [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin /tmp/disaster_recovery.js == \- ]] + [[ export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin /tmp/disaster_recovery.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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.234.197:27017/admin /tmp/disaster_recovery.js' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.BWyfViUfn0 Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://34.118.234.197:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("db624a35-e70c-4468-b0ff-cfede8215105") } Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match + cat /tmp/tmp.TQyyPwX9QN + rm /tmp/tmp.BWyfViUfn0 /tmp/tmp.TQyyPwX9QN + return 0 + desc 'run disaster recovery script for replset: rs0' + set +o xtrace ----------------------------------------------------------------------------------- run disaster recovery script for replset: rs0 ----------------------------------------------------------------------------------- + run_script_mongos /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js clusterAdmin:clusterAdmin123456@34.118.225.204 mongodb :27017 + local script=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js + local uri=clusterAdmin:clusterAdmin123456@34.118.225.204 + local driver=mongodb + local suffix=:27017 + local mongo_flag= + local mongo_bin=mongo ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.S4P5sSdlMk +++ mktemp ++ local LAST_ERR=/tmp/tmp.Wi6DOmYG8x ++ 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.S4P5sSdlMk ++ cat /tmp/tmp.Wi6DOmYG8x ++ rm /tmp/tmp.S4P5sSdlMk /tmp/tmp.Wi6DOmYG8x ++ return 0 + local client_container=psmdb-client-c8847c4cd-9vzfv ++ basename /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js + name=disaster_recovery.js + kubectl_bin cp /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp ++ mktemp + local LAST_OUT=/tmp/tmp.w3xqEiQu5k ++ mktemp + local LAST_ERR=/tmp/tmp.Vvak7juGi2 + local exit_status=0 + local timeout=4 + local i + args=('cp' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js' 'cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/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-2742/e2e-tests/cross-site-sharded/disaster_recovery.js == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp == \- ]] + [[ cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/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-2742/e2e-tests/cross-site-sharded/disaster_recovery.js cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.w3xqEiQu5k + cat /tmp/tmp.Vvak7juGi2 + rm /tmp/tmp.w3xqEiQu5k /tmp/tmp.Vvak7juGi2 + return 0 + kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.225.204:27017/admin /tmp/disaster_recovery.js' ++ mktemp + local LAST_OUT=/tmp/tmp.cPAwT1Hj68 ++ mktemp + local LAST_ERR=/tmp/tmp.qiDnvvdWC4 + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.225.204:27017/admin /tmp/disaster_recovery.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-c8847c4cd-9vzfv == \- ]] + [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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://clusterAdmin:clusterAdmin123456@34.118.225.204:27017/admin /tmp/disaster_recovery.js == \- ]] + [[ export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.225.204:27017/admin /tmp/disaster_recovery.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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.225.204:27017/admin /tmp/disaster_recovery.js' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.cPAwT1Hj68 Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://34.118.225.204:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("66787484-73d2-405e-b01f-f0c36d194bce") } Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match + cat /tmp/tmp.qiDnvvdWC4 + rm /tmp/tmp.cPAwT1Hj68 /tmp/tmp.qiDnvvdWC4 + return 0 + desc 'run disaster recovery script for replset: rs1' + set +o xtrace ----------------------------------------------------------------------------------- run disaster recovery script for replset: rs1 ----------------------------------------------------------------------------------- + run_script_mongos /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js clusterAdmin:clusterAdmin123456@34.118.239.22 mongodb :27017 + local script=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js + local uri=clusterAdmin:clusterAdmin123456@34.118.239.22 + local driver=mongodb + local suffix=:27017 + local mongo_flag= + local mongo_bin=mongo ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.cEGlUsrC9D +++ mktemp ++ local LAST_ERR=/tmp/tmp.sbwxMVtjsk ++ 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.cEGlUsrC9D ++ cat /tmp/tmp.sbwxMVtjsk ++ rm /tmp/tmp.cEGlUsrC9D /tmp/tmp.sbwxMVtjsk ++ return 0 + local client_container=psmdb-client-c8847c4cd-9vzfv ++ basename /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js + name=disaster_recovery.js + kubectl_bin cp /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp ++ mktemp + local LAST_OUT=/tmp/tmp.qsdHO4i4Bb ++ mktemp + local LAST_ERR=/tmp/tmp.Ic0D55QZiG + local exit_status=0 + local timeout=4 + local i + args=('cp' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js' 'cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/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-2742/e2e-tests/cross-site-sharded/disaster_recovery.js == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/disaster_recovery.js =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp == \- ]] + [[ cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/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-2742/e2e-tests/cross-site-sharded/disaster_recovery.js cross-site-sharded-8852/psmdb-client-c8847c4cd-9vzfv:/tmp + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.qsdHO4i4Bb + cat /tmp/tmp.Ic0D55QZiG + rm /tmp/tmp.qsdHO4i4Bb /tmp/tmp.Ic0D55QZiG + return 0 + kubectl_bin exec psmdb-client-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.239.22:27017/admin /tmp/disaster_recovery.js' ++ mktemp + local LAST_OUT=/tmp/tmp.xWyweaHsPx ++ mktemp + local LAST_ERR=/tmp/tmp.VU8hvbrBfq + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-9vzfv' '--' 'bash' '-c' 'export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.239.22:27017/admin /tmp/disaster_recovery.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-c8847c4cd-9vzfv == \- ]] + [[ psmdb-client-c8847c4cd-9vzfv =~ ^(-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://clusterAdmin:clusterAdmin123456@34.118.239.22:27017/admin /tmp/disaster_recovery.js == \- ]] + [[ export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.239.22:27017/admin /tmp/disaster_recovery.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-c8847c4cd-9vzfv -- bash -c 'export HOME=/tmp; mongo mongodb://clusterAdmin:clusterAdmin123456@34.118.239.22:27017/admin /tmp/disaster_recovery.js' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.xWyweaHsPx Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://34.118.239.22:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("e1cf621d-9a6d-4713-8865-15d441de2cc5") } Percona Server for MongoDB server version: v8.3.17-5 WARNING: shell and server versions do not match + cat /tmp/tmp.VU8hvbrBfq + rm /tmp/tmp.xWyweaHsPx /tmp/tmp.VU8hvbrBfq + return 0 + desc 'make replica cluster managed' + set +o xtrace ----------------------------------------------------------------------------------- make replica cluster managed ----------------------------------------------------------------------------------- ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.2AQI4DSpLF +++ mktemp ++ local LAST_ERR=/tmp/tmp.yTRmdH9ZSO ++ 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.2AQI4DSpLF ++ cat /tmp/tmp.yTRmdH9ZSO ++ rm /tmp/tmp.2AQI4DSpLF /tmp/tmp.yTRmdH9ZSO ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-replica-23121 ++ mktemp + local LAST_OUT=/tmp/tmp.bpZ4KxL5V6 ++ mktemp + local LAST_ERR=/tmp/tmp.X9ANWzjGbM + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5' '--namespace=cross-site-sharded-replica-23121') + 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-2742-cf134fefe-2-cluster5 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --namespace=cross-site-sharded-replica-23121 == \- ]] + [[ --namespace=cross-site-sharded-replica-23121 =~ ^(-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-2742-cf134fefe-2-cluster5 --namespace=cross-site-sharded-replica-23121 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.bpZ4KxL5V6 Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster5" modified. + cat /tmp/tmp.X9ANWzjGbM + rm /tmp/tmp.bpZ4KxL5V6 /tmp/tmp.X9ANWzjGbM + return 0 + kubectl_bin patch psmdb cross-site-sharded-replica --type=merge --patch '{"spec":{"unmanaged": false}}' ++ mktemp + local LAST_OUT=/tmp/tmp.XE3pTsOlJ5 ++ mktemp + local LAST_ERR=/tmp/tmp.gmGQ9b8KQf + local exit_status=0 + local timeout=4 + local i + args=('patch' 'psmdb' 'cross-site-sharded-replica' '--type=merge' '--patch' '{"spec":{"unmanaged": false}}') + 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[@]}" + [[ cross-site-sharded-replica == \- ]] + [[ cross-site-sharded-replica =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --type=merge == \- ]] + [[ --type=merge =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --patch == \- ]] + [[ --patch =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ {"spec":{"unmanaged": false}} == \- ]] + [[ {"spec":{"unmanaged": 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 patch psmdb cross-site-sharded-replica --type=merge --patch '{"spec":{"unmanaged": false}}' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.XE3pTsOlJ5 perconaservermongodb.psmdb.percona.com/cross-site-sharded-replica patched + cat /tmp/tmp.gmGQ9b8KQf + rm /tmp/tmp.XE3pTsOlJ5 /tmp/tmp.gmGQ9b8KQf + return 0 + wait_for_running cross-site-sharded-replica-rs0 3 + local name=cross-site-sharded-replica-rs0 + let last_pod=2 + local check_cluster_readiness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=cross-site-sharded-replica ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod cross-site-sharded-replica-rs0-0 + local pod=cross-site-sharded-replica-rs0-0 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs0-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod cross-site-sharded-replica-rs0-1 + local pod=cross-site-sharded-replica-rs0-1 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs0-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.d5CA1EG45J +++ mktemp ++ local LAST_ERR=/tmp/tmp.xnV5taUJAk ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.d5CA1EG45J ++ cat /tmp/tmp.xnV5taUJAk ++ rm /tmp/tmp.d5CA1EG45J /tmp/tmp.xnV5taUJAk ++ return 0 + [[ false == true ]] + wait_pod cross-site-sharded-replica-rs0-2 + local pod=cross-site-sharded-replica-rs0-2 + set +o xtrace waiting for pod/cross-site-sharded-replica-rs0-2 to be ready.OK ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.0Sd2Xs6F3v +++ mktemp ++ local LAST_ERR=/tmp/tmp.1Sco4HqtQj ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.0Sd2Xs6F3v ++ cat /tmp/tmp.1Sco4HqtQj ++ rm /tmp/tmp.0Sd2Xs6F3v /tmp/tmp.1Sco4HqtQj ++ return 0 + [[ false == true ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.NfgR2AQCxu +++ mktemp ++ local LAST_ERR=/tmp/tmp.ALlsmqyNUf ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.NfgR2AQCxu ++ cat /tmp/tmp.ALlsmqyNUf ++ rm /tmp/tmp.NfgR2AQCxu /tmp/tmp.ALlsmqyNUf ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster cross-site-sharded-replica to be ready + wait_for_running cross-site-sharded-replica-cfg 3 + local name=cross-site-sharded-replica-cfg + let last_pod=2 + local check_cluster_readiness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=cross-site-sharded-replica ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod cross-site-sharded-replica-cfg-0 + local pod=cross-site-sharded-replica-cfg-0 + set +o xtrace waiting for pod/cross-site-sharded-replica-cfg-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod cross-site-sharded-replica-cfg-1 + local pod=cross-site-sharded-replica-cfg-1 + set +o xtrace waiting for pod/cross-site-sharded-replica-cfg-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.EdWP3SaRNP +++ mktemp ++ local LAST_ERR=/tmp/tmp.2A35rnapAz ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.EdWP3SaRNP ++ cat /tmp/tmp.2A35rnapAz ++ rm /tmp/tmp.EdWP3SaRNP /tmp/tmp.2A35rnapAz ++ return 0 + [[ '' == true ]] + wait_pod cross-site-sharded-replica-cfg-2 + local pod=cross-site-sharded-replica-cfg-2 + set +o xtrace waiting for pod/cross-site-sharded-replica-cfg-2 to be ready.OK ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.azUWCI2S2Z +++ mktemp ++ local LAST_ERR=/tmp/tmp.nX4cUEloNx ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.azUWCI2S2Z ++ cat /tmp/tmp.nX4cUEloNx ++ rm /tmp/tmp.azUWCI2S2Z /tmp/tmp.nX4cUEloNx ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.xx3jVCgZRK +++ mktemp ++ local LAST_ERR=/tmp/tmp.EVKhbcL7YO ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.xx3jVCgZRK ++ cat /tmp/tmp.EVKhbcL7YO ++ rm /tmp/tmp.xx3jVCgZRK /tmp/tmp.EVKhbcL7YO ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster cross-site-sharded-replica to be ready + desc 'check failover status' + set +o xtrace ----------------------------------------------------------------------------------- check failover status ----------------------------------------------------------------------------------- + compare_mongos_cmd find myApp:myPass@cross-site-sharded-replica-mongos.cross-site-sharded-replica-23121 + local command=find + local uri=myApp:myPass@cross-site-sharded-replica-mongos.cross-site-sharded-replica-23121 + local postfix= + local suffix= + local database=myApp + local collection=test + local port=27017 + local tls=false + local retries=3 + local retry_delay=10 + [[ false == true ]] + mongos_command=run_mongos + log 'running db.test.command() in myApp' + set +o xtrace [2026-11-24T09:23:46+0000] running db.test.command() in myApp ++ seq 1 3 + for attempt in $(seq 1 "$retries") + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' + run_mongos 'use myApp\n db.test.find()' myApp:myPass@cross-site-sharded-replica-mongos.cross-site-sharded-replica-23121 mongodb '' '' 27017 + grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|Started a new thread for the timer service' + local 'command=use myApp\n db.test.find()' + local uri=myApp:myPass@cross-site-sharded-replica-mongos.cross-site-sharded-replica-23121 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + 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.WZGOn3TJeF +++ mktemp ++ local LAST_ERR=/tmp/tmp.FU9rBV8vmz ++ 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.WZGOn3TJeF ++ cat /tmp/tmp.FU9rBV8vmz ++ rm /tmp/tmp.WZGOn3TJeF /tmp/tmp.FU9rBV8vmz ++ return 0 + local client_container=psmdb-client-c8847c4cd-v2gkq + kubectl_bin exec psmdb-client-c8847c4cd-v2gkq -- bash -c 'export HOME=/tmp; printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@cross-site-sharded-replica-mongos.cross-site-sharded-replica-23121.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.KwBBl0skmB ++ mktemp + local LAST_ERR=/tmp/tmp.fNm27nyDQb + local exit_status=0 + local timeout=4 + local i + args=('exec' 'psmdb-client-c8847c4cd-v2gkq' '--' 'bash' '-c' 'export HOME=/tmp; printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@cross-site-sharded-replica-mongos.cross-site-sharded-replica-23121.svc.cluster.local:27017/admin ') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-client-c8847c4cd-v2gkq == \- ]] + [[ psmdb-client-c8847c4cd-v2gkq =~ ^(-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 myApp\n db.test.find()\n' | mongo mongodb://myApp:myPass@cross-site-sharded-replica-mongos.cross-site-sharded-replica-23121.svc.cluster.local:27017/admin == \- ]] + [[ export HOME=/tmp; printf 'use myApp\n db.test.find()\n' | mongo mongodb://myApp:myPass@cross-site-sharded-replica-mongos.cross-site-sharded-replica-23121.svc.cluster.local:27017/admin =~ ^(-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-c8847c4cd-v2gkq -- bash -c 'export HOME=/tmp; printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@cross-site-sharded-replica-mongos.cross-site-sharded-replica-23121.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.KwBBl0skmB + cat /tmp/tmp.fNm27nyDQb + rm /tmp/tmp.KwBBl0skmB /tmp/tmp.fNm27nyDQb + return 0 + compare_mongo_output find '' + local command=find + local postfix= + [[ 0 -ne 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/cross-site-sharded/compare/find.json /tmp/tmp.Ycc3QAC7ta/find + return + desc 'Failover check finished successfully' + set +o xtrace ----------------------------------------------------------------------------------- Failover check finished successfully ----------------------------------------------------------------------------------- + wait_cluster_consistency cross-site-sharded-replica + local cluster_name=cross-site-sharded-replica + local wait_time=32 + retry=0 + sleep 7 + echo -n 'waiting for cluster cross-site-sharded-replica to be ready' waiting for cluster cross-site-sharded-replica to be ready++ kubectl_bin get psmdb cross-site-sharded-replica -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.9sW6vtgBLK +++ mktemp ++ local LAST_ERR=/tmp/tmp.jppvsOokyL ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'cross-site-sharded-replica' '-o' 'jsonpath={.status.state}') ++ 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[@]}" ++ [[ cross-site-sharded-replica == \- ]] ++ [[ cross-site-sharded-replica =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.status.state} == \- ]] ++ [[ jsonpath={.status.state} =~ ^(-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 cross-site-sharded-replica -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.9sW6vtgBLK ++ cat /tmp/tmp.jppvsOokyL ++ rm /tmp/tmp.9sW6vtgBLK /tmp/tmp.jppvsOokyL ++ return 0 + [[ ready == ready ]] + echo .OK .OK + destroy cross-site-sharded-8852 true + local namespace=cross-site-sharded-8852 + local ignore_logs=true + [[ 1 == 1 ]] + echo 'SKIP_DELETE=1, not destroying cross-site-sharded-8852' SKIP_DELETE=1, not destroying cross-site-sharded-8852 + return + destroy cross-site-sharded-replica-23121 true + local namespace=cross-site-sharded-replica-23121 + local ignore_logs=true + [[ 1 == 1 ]] + echo 'SKIP_DELETE=1, not destroying cross-site-sharded-replica-23121' SKIP_DELETE=1, not destroying cross-site-sharded-replica-23121 + return + desc 'test passed' + set +o xtrace ----------------------------------------------------------------------------------- test passed ----------------------------------------------------------------------------------- ==================================================================================================== [PASSED] e2e-tests/test_pytest_wrapper.py::test_bash_wrapper ==================================================================================================== [09:23:58.434226] INFO Deleting cert-manager [09:24:14.855578] INFO Cleaning up test environment ------------------------------------------- generated xml file: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/reports/cross-site-sharded.xml ------------------------------------------- ------------------------------------- Generated html report: file:///mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/reports/cross-site-sharded.html -------------------------------------- ==================================================================================== 1 passed in 1018.94s (0:16:58) ====================================================================================