mkdir -p e2e-tests/reports e2e-tests/logs ========================================================================================= test session starts ========================================================================================== platform linux -- Python 3.14.10, pytest-9.1.1, pluggy-1.7.0 -- /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/.venv/bin/python cachedir: .pytest_cache metadata: {'Python': '3.14.10', 'Platform': 'Linux-7.1.10-200.fc44.x86_64-x86_64-with-glibc2.43', 'Packages': {'pytest': '9.1.1', 'pluggy': '1.7.0'}, 'Plugins': {'html': '4.2.0', 'json-report': '1.5.0', 'dependency': '0.6.1', 'metadata': '3.1.1'}, 'CI': 'true', 'BUILD_NUMBER': '9', 'BUILD_ID': '9', 'BUILD_URL': 'https://cloud.cd.percona.com/job/cloud-psmdb-operator/job/PR-2715/9/', 'NODE_NAME': 'hcloud-nialm8wqguv220jl', 'JOB_NAME': 'cloud-psmdb-operator/PR-2715', 'BUILD_TAG': 'jenkins-cloud-psmdb-operator-PR-2715-9', 'EXECUTOR_NUMBER': '0', 'JENKINS_URL': 'https://cloud.cd.percona.com/', 'WORKSPACE': '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715', 'GIT_COMMIT': '27e0b796072fe59ec1fa78fca82dc7491ddb9891', 'GIT_URL': 'https://github.com/percona/percona-server-mongodb-operator.git', 'GIT_BRANCH': 'PR-2715'} rootdir: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715 configfile: pyproject.toml plugins: html-4.2.0, json-report-1.5.0, dependency-0.6.1, metadata-3.1.1 collecting ... collected 1 item e2e-tests/test_pytest_wrapper.py::test_bash_wrapper[clustersync] [05:51:26.497011] WARNING kubectl error: Warning: version difference between client (1.37) and server (1.34) exceeds the supported minor version skew of +/-1 [05:51:27.718279] INFO Environment variables: KUBE_VERSION=1.34 PLATFORM=gke ARCH= EKS= GKE=1 AKS= OPENSHIFT= KIND= MINIKUBE= RANCHER= API=psmdb.percona.com/v1 REGISTRY_NAME=docker.io GIT_COMMIT=27e0b796072fe59ec1fa78fca82dc7491ddb9891 GIT_BRANCH=PR-2715 OPERATOR_VERSION=1.24.0 IMAGE=docker.io/perconalab/percona-server-mongodb-operator:PR-2715-27e0b7960 IMAGE_MONGOD=docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 IMAGE_MONGOD_CHAIN=docker.io/perconalab/percona-server-mongodb-operator:main-mongod7.0 docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 IMAGE_SEARCH=docker.io/perconalab/percona-server-mongodb-operator:main-mongot IMAGE_BACKUP=docker.io/perconalab/percona-server-mongodb-operator:main-backup IMAGE_PMM_CLIENT=docker.io/perconalab/pmm-client:3-dev-latest IMAGE_PMM_SERVER=docker.io/perconalab/pmm-server:3-dev-latest IMAGE_LOGCOLLECTOR=docker.io/perconalab/fluentbit:main-logcollector IMAGE_CLUSTERSYNC=docker.io/percona/percona-clustersync-mongodb:1.0.0 IMAGE_AWS_CLI=docker.io/amazon/aws-cli:2.34.60 CERT_MANAGER_VER=1.21.0 CHAOS_MESH_VER=2.7.1 SEAWEEDFS_VER=4.47.0 PMM_SERVER_VER=9.9.9 CLEAN_NAMESPACE=1 DELETE_CRD_ON_START=1 SKIP_DELETE=0 SKIP_BACKUPS_TO_AWS_GCP_AZURE= UPDATE_COMPARE_FILES=0 Debug logging disabled. + source_cluster=source-cluster + target_cluster=target-cluster + sync_cr=sync + clustersync_source_secret=clustersync-source-creds + sharded_ns=myApp.sharded + desc 'create infra' + set +o xtrace ----------------------------------------------------------------------------------- create infra ----------------------------------------------------------------------------------- + create_infra clustersync-18090 + local ns=clustersync-18090 + echo clustersync-18090 + destroy_cert_manager + [[ -n '' ]] + kubectl_bin delete mutatingwebhookconfiguration cert-manager-webhook --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.T3ju2mDTi0 ++ mktemp + local LAST_ERR=/tmp/tmp.G95va55jNQ + 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.T3ju2mDTi0 + cat /tmp/tmp.G95va55jNQ + rm /tmp/tmp.T3ju2mDTi0 /tmp/tmp.G95va55jNQ + return 0 + kubectl_bin delete validatingwebhookconfiguration cert-manager-webhook --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.vjjC4O8Q45 ++ mktemp + local LAST_ERR=/tmp/tmp.kcFMkPhd1t + 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.vjjC4O8Q45 + cat /tmp/tmp.kcFMkPhd1t + rm /tmp/tmp.vjjC4O8Q45 /tmp/tmp.kcFMkPhd1t + 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.tB1KSOsIpk ++ mktemp + local LAST_ERR=/tmp/tmp.cgitkoTHUa + 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.tB1KSOsIpk + cat /tmp/tmp.cgitkoTHUa + rm /tmp/tmp.tB1KSOsIpk /tmp/tmp.cgitkoTHUa + return 0 + kubectl_bin delete namespace cert-manager --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.C05DQXpFpy ++ mktemp + local LAST_ERR=/tmp/tmp.WI5J02qH9l + 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.C05DQXpFpy + cat /tmp/tmp.WI5J02qH9l + rm /tmp/tmp.C05DQXpFpy /tmp/tmp.WI5J02qH9l + 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.3LARd1OGwq +++ mktemp ++ local LAST_ERR=/tmp/tmp.eTbUWfcpni ++ 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.3LARd1OGwq ++ cat /tmp/tmp.eTbUWfcpni ++ rm /tmp/tmp.3LARd1OGwq /tmp/tmp.eTbUWfcpni ++ return 0 + remaining= ++ kubectl_bin get validatingwebhookconfiguration cert-manager-webhook --ignore-not-found -o name +++ mktemp ++ local LAST_OUT=/tmp/tmp.5uJ1SNWQyM +++ mktemp ++ local LAST_ERR=/tmp/tmp.wpcKYIqWPL ++ 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.5uJ1SNWQyM ++ cat /tmp/tmp.wpcKYIqWPL ++ rm /tmp/tmp.5uJ1SNWQyM /tmp/tmp.wpcKYIqWPL ++ 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.aFfTYico1z +++ mktemp ++ local LAST_ERR=/tmp/tmp.yntIT6KeMk ++ 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.aFfTYico1z ++ cat /tmp/tmp.yntIT6KeMk ++ rm /tmp/tmp.aFfTYico1z /tmp/tmp.yntIT6KeMk ++ return 0 + remaining+= ++ kubectl_bin get namespace cert-manager --ignore-not-found -o name +++ mktemp ++ local LAST_OUT=/tmp/tmp.vIGXTPYU8q +++ mktemp ++ local LAST_ERR=/tmp/tmp.gSNXRV3yex ++ 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.vIGXTPYU8q ++ cat /tmp/tmp.gSNXRV3yex ++ rm /tmp/tmp.vIGXTPYU8q /tmp/tmp.gSNXRV3yex ++ return 0 + remaining+= + [[ -z '' ]] + return 0 + [[ 1 == 1 ]] + delete_crd + desc 'get and delete old CRDs and RBAC' + set +o xtrace ----------------------------------------------------------------------------------- get and delete old CRDs and RBAC ----------------------------------------------------------------------------------- + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.5l4d8pi2T9 ++ mktemp + local LAST_ERR=/tmp/tmp.FYWkryzQyH + local exit_status=0 + local timeout=4 + local i + args=('delete' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml' '--ignore-not-found' '--wait=false') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --wait=false == \- ]] + [[ --wait=false =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.5l4d8pi2T9 + cat /tmp/tmp.FYWkryzQyH + rm /tmp/tmp.5l4d8pi2T9 /tmp/tmp.FYWkryzQyH + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml ++ grep -v '\-\-\-' grep: warning: stray \ before - grep: warning: stray \ before - + for crd_name in $(yq eval '.metadata.name' "${src_dir}/deploy/crd.yaml" | grep -v '\-\-\-') + kubectl get perconaservermongodbbackups.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' 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 '\-\-\-') + kubectl get perconaservermongodbclustersyncs.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + 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 psmdb-operator ']' + rbac_yaml=cw-rbac.yaml + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-rbac.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.BhvjNOH0eD ++ mktemp + local LAST_ERR=/tmp/tmp.Cj3q5PlE2d + local exit_status=0 + local timeout=4 + local i + args=('delete' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-rbac.yaml' '--ignore-not-found' '--wait=false') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-rbac.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-rbac.yaml =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --wait=false == \- ]] + [[ --wait=false =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-rbac.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.BhvjNOH0eD + cat /tmp/tmp.Cj3q5PlE2d + rm /tmp/tmp.BhvjNOH0eD /tmp/tmp.Cj3q5PlE2d + return 0 + check_crd_for_deletion PR-2715 + local git_tag=PR-2715 ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-2715/deploy/crd.yaml ++ yq eval .metadata.name ++ /usr/sbin/sed s/---//g ++ /usr/sbin/sed ':a;N;$!ba;s/\n/ /g' + for crd_name in $(curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/${git_tag}/deploy/crd.yaml | yq eval '.metadata.name' | $sed 's/---//g' | $sed ':a;N;$!ba;s/\n/ /g') ++ kubectl_bin get crd/null -o 'jsonpath={.status.conditions[-1].type}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.lIF6KiG7KO +++ mktemp ++ local LAST_ERR=/tmp/tmp.izmi7nDoYm ++ 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.izmi7nDoYm ++ break ++ cat /tmp/tmp.lIF6KiG7KO ++ cat /tmp/tmp.izmi7nDoYm Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.lIF6KiG7KO /tmp/tmp.izmi7nDoYm ++ return 1 + [[ '' == Terminating ]] + '[' -n psmdb-operator ']' + create_namespace psmdb-operator + local namespace=psmdb-operator + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ grep chaos-mesh ++ kubectl api-resources ++ awk '{print $1}' ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ 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 + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + awk '{print$1}' ++ mktemp + [[ -n '' ]] + desc 'cleaned up old namespaces psmdb-operator' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces psmdb-operator ----------------------------------------------------------------------------------- + xargs kubectl delete ns + kubectl_bin delete namespace psmdb-operator --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.txG40lxung ++ mktemp + local LAST_OUT=/tmp/tmp.cY181FRcGf ++ mktemp + local LAST_ERR=/tmp/tmp.9fjF9aJa0u + 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.Gh1neFBbzX + local exit_status=0 + local timeout=4 + local i + args=('delete' 'namespace' 'psmdb-operator' '--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[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl get ns + for attempt in $(seq 0 9) + set +e + kubectl delete namespace psmdb-operator --ignore-not-found + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.txG40lxung + cat /tmp/tmp.9fjF9aJa0u + rm /tmp/tmp.txG40lxung /tmp/tmp.9fjF9aJa0u + return 0 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.cY181FRcGf + cat /tmp/tmp.Gh1neFBbzX + rm /tmp/tmp.cY181FRcGf /tmp/tmp.Gh1neFBbzX + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.PWlAfJ42l3 ++ mktemp + local LAST_ERR=/tmp/tmp.PCKciQmocW + local exit_status=0 + local timeout=4 + local i + args=('wait' '--for=delete' 'namespace' 'psmdb-operator') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ wait == \- ]] + [[ wait =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --for=delete == \- ]] + [[ --for=delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ namespace == \- ]] + [[ namespace =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl wait --for=delete namespace psmdb-operator + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.PWlAfJ42l3 + cat /tmp/tmp.PCKciQmocW + rm /tmp/tmp.PWlAfJ42l3 /tmp/tmp.PCKciQmocW + return 0 + desc 'create namespace psmdb-operator' + set +o xtrace ----------------------------------------------------------------------------------- create namespace psmdb-operator ----------------------------------------------------------------------------------- + kubectl_bin create namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.YEmW45kXa7 ++ mktemp + local LAST_ERR=/tmp/tmp.kXPlY31h23 + local exit_status=0 + local timeout=4 + local i + args=('create' 'namespace' 'psmdb-operator') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ create == \- ]] + [[ create =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ namespace == \- ]] + [[ namespace =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl create namespace psmdb-operator + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.YEmW45kXa7 namespace/psmdb-operator created + cat /tmp/tmp.kXPlY31h23 + rm /tmp/tmp.YEmW45kXa7 /tmp/tmp.kXPlY31h23 + return 0 + set_kube_ctx psmdb-operator + local namespace=psmdb-operator ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.JH1fQ48hnH +++ mktemp ++ local LAST_ERR=/tmp/tmp.ZL6AIsDDwL ++ 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.JH1fQ48hnH ++ cat /tmp/tmp.ZL6AIsDDwL ++ rm /tmp/tmp.JH1fQ48hnH /tmp/tmp.ZL6AIsDDwL ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.N7GRRyN0tN ++ mktemp + local LAST_ERR=/tmp/tmp.gnL1pZ97TO + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4' '--namespace=psmdb-operator') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ config == \- ]] + [[ config =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ set-context == \- ]] + [[ set-context =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --namespace=psmdb-operator == \- ]] + [[ --namespace=psmdb-operator =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4 --namespace=psmdb-operator + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.N7GRRyN0tN Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4" modified. + cat /tmp/tmp.gnL1pZ97TO + rm /tmp/tmp.N7GRRyN0tN /tmp/tmp.gnL1pZ97TO + return 0 + deploy_operator + desc 'start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2715-27e0b7960' + set +o xtrace ----------------------------------------------------------------------------------- start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2715-27e0b7960 ----------------------------------------------------------------------------------- + local cr_file + '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.i9M3DpLtcN ++ mktemp + local LAST_ERR=/tmp/tmp.1xDqJ0zFRC + local exit_status=0 + local timeout=4 + local i + args=('apply' '--server-side' '--force-conflicts' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ apply == \- ]] + [[ apply =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --server-side == \- ]] + [[ --server-side =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --force-conflicts == \- ]] + [[ --force-conflicts =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/crd.yaml + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.i9M3DpLtcN 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.1xDqJ0zFRC + rm /tmp/tmp.i9M3DpLtcN /tmp/tmp.1xDqJ0zFRC + return 0 + '[' -n psmdb-operator ']' + apply_rbac cw-rbac + local operator_namespace=psmdb-operator + local rbac=cw-rbac + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-rbac.yaml + sed -e 's^namespace: .*^namespace: psmdb-operator^' + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.esn7A4xhEW ++ mktemp + local LAST_ERR=/tmp/tmp.qtmBKqAzMC + local exit_status=0 + local timeout=4 + local i + args=('apply' '-n' 'psmdb-operator' '-f' '-') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ apply == \- ]] + [[ apply =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -n == \- ]] + [[ -n =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ - == \- ]] + [[ 4 -gt 0 ]] + [[ -f =~ ^(-f|--filename)$ ]] ++ mktemp + stdin_manifest=/tmp/tmp.kAjosmiTu7 + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.kAjosmiTu7 + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl apply -n psmdb-operator -f /tmp/tmp.kAjosmiTu7 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.esn7A4xhEW clusterrole.rbac.authorization.k8s.io/percona-server-mongodb-operator created serviceaccount/percona-server-mongodb-operator created clusterrolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator created + cat /tmp/tmp.qtmBKqAzMC + rm /tmp/tmp.esn7A4xhEW /tmp/tmp.qtmBKqAzMC /tmp/tmp.kAjosmiTu7 + return 0 + yq eval $'\n\t\t\t(.spec.template.spec.containers[].image = "docker.io/perconalab/percona-server-mongodb-operator:PR-2715-27e0b7960") |\n\t\t\t((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") |\n\t\t\t((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/deploy/cw-operator.yaml + add_arch_to_podspecs - + arch_scheduling_enabled + [[ -n '' ]] + cat - + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.LYBYxNzJnB ++ mktemp + local LAST_ERR=/tmp/tmp.V6u2CGIUFb + local exit_status=0 + local timeout=4 + local i + args=('apply' '-n' 'psmdb-operator' '-f' '-') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ apply == \- ]] + [[ apply =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -n == \- ]] + [[ -n =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ - == \- ]] + [[ 4 -gt 0 ]] + [[ -f =~ ^(-f|--filename)$ ]] ++ mktemp + stdin_manifest=/tmp/tmp.Eq9gd33l7j + cat + return + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.Eq9gd33l7j + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl apply -n psmdb-operator -f /tmp/tmp.Eq9gd33l7j + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.LYBYxNzJnB deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.V6u2CGIUFb + rm /tmp/tmp.LYBYxNzJnB /tmp/tmp.V6u2CGIUFb /tmp/tmp.Eq9gd33l7j + return 0 + sleep 20 ++ get_operator_pod ++ kubectl_bin get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator +++ mktemp ++ local LAST_OUT=/tmp/tmp.fpCBoUDH57 +++ mktemp ++ local LAST_ERR=/tmp/tmp.wu1F76TC4y ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=percona-server-mongodb-operator' '-o' 'jsonpath={.items[].metadata.name}' '-n' 'psmdb-operator') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ pods == \- ]] ++ [[ pods =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --selector=name=percona-server-mongodb-operator == \- ]] ++ [[ --selector=name=percona-server-mongodb-operator =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.items[].metadata.name} == \- ]] ++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -n == \- ]] ++ [[ -n =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-operator == \- ]] ++ [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.fpCBoUDH57 ++ cat /tmp/tmp.wu1F76TC4y ++ rm /tmp/tmp.fpCBoUDH57 /tmp/tmp.wu1F76TC4y ++ return 0 + wait_operator_pod percona-server-mongodb-operator-b57dc4869-hh8t6 + local pod=percona-server-mongodb-operator-b57dc4869-hh8t6 + set +o xtrace waiting for pod/percona-server-mongodb-operator-b57dc4869-hh8t6 to be ready.OK + echo 'Print operator info from log' Print operator info from log + grep 'Manager starting up' ++ get_operator_pod ++ kubectl_bin get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator +++ mktemp ++ local LAST_OUT=/tmp/tmp.B46xfEiUsQ +++ mktemp ++ local LAST_ERR=/tmp/tmp.mg4Gp1NS9H ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'pods' '--selector=name=percona-server-mongodb-operator' '-o' 'jsonpath={.items[].metadata.name}' '-n' 'psmdb-operator') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ pods == \- ]] ++ [[ pods =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ --selector=name=percona-server-mongodb-operator == \- ]] ++ [[ --selector=name=percona-server-mongodb-operator =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.items[].metadata.name} == \- ]] ++ [[ jsonpath={.items[].metadata.name} =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -n == \- ]] ++ [[ -n =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb-operator == \- ]] ++ [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.B46xfEiUsQ ++ cat /tmp/tmp.mg4Gp1NS9H ++ rm /tmp/tmp.B46xfEiUsQ /tmp/tmp.mg4Gp1NS9H ++ return 0 + kubectl_bin logs -n psmdb-operator percona-server-mongodb-operator-b57dc4869-hh8t6 ++ mktemp + local LAST_OUT=/tmp/tmp.HqWQgY3Wi7 ++ mktemp + local LAST_ERR=/tmp/tmp.4oU7jGt21T + local exit_status=0 + local timeout=4 + local i + args=('logs' '-n' 'psmdb-operator' 'percona-server-mongodb-operator-b57dc4869-hh8t6') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ logs == \- ]] + [[ logs =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -n == \- ]] + [[ -n =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-operator == \- ]] + [[ psmdb-operator =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ percona-server-mongodb-operator-b57dc4869-hh8t6 == \- ]] + [[ percona-server-mongodb-operator-b57dc4869-hh8t6 =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl logs -n psmdb-operator percona-server-mongodb-operator-b57dc4869-hh8t6 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.HqWQgY3Wi7 + cat /tmp/tmp.4oU7jGt21T + rm /tmp/tmp.HqWQgY3Wi7 /tmp/tmp.4oU7jGt21T + return 0 2026-11-23T05:52:28.133Z INFO setup Manager starting up {"gitCommit": "27e0b796072fe59ec1fa78fca82dc7491ddb9891", "gitBranch": "PR-2715-27e0b7960", "buildTime": "", "goVersion": "go1.27.4", "os": "linux", "arch": "amd64"} + create_namespace clustersync-18090 + local namespace=clustersync-18090 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ awk '{print $1}' ++ kubectl api-resources ++ grep chaos-mesh ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ awk '{print $1}' ++ grep chaos-mesh + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ awk '{print $1}' ++ grep chaos-mesh + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + local 'ns_filter=^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + [[ -n '' ]] + kubectl_bin get ns + [[ -n '' ]] + desc 'cleaned up old namespaces clustersync-18090' + set +o xtrace + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' ----------------------------------------------------------------------------------- cleaned up old namespaces clustersync-18090 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace clustersync-18090 --ignore-not-found + awk '{print$1}' + xargs kubectl delete ns ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.3eMLVJmxkE ++ mktemp + local LAST_OUT=/tmp/tmp.Jusxskn7NY + local LAST_ERR=/tmp/tmp.HCJsZMRzJv + local exit_status=0 + local timeout=4 + local i + args=('delete' 'namespace' 'clustersync-18090' '--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[@]}" + [[ clustersync-18090 == \- ]] + [[ clustersync-18090 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] ++ mktemp + local attempt + local delay ++ seq 0 9 + local LAST_ERR=/tmp/tmp.lNcCLEK1hl + 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 + for attempt in $(seq 0 9) + set +e + kubectl delete namespace clustersync-18090 --ignore-not-found + for attempt in $(seq 0 9) + set +e + kubectl get ns + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.Jusxskn7NY + cat /tmp/tmp.lNcCLEK1hl + rm /tmp/tmp.Jusxskn7NY /tmp/tmp.lNcCLEK1hl + return 0 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.3eMLVJmxkE + cat /tmp/tmp.HCJsZMRzJv + rm /tmp/tmp.3eMLVJmxkE /tmp/tmp.HCJsZMRzJv + return 0 + kubectl_bin wait --for=delete namespace clustersync-18090 ++ mktemp + local LAST_OUT=/tmp/tmp.NP2EZdlg6D ++ mktemp + local LAST_ERR=/tmp/tmp.LXNHyUVaoO + local exit_status=0 + local timeout=4 + local i + args=('wait' '--for=delete' 'namespace' 'clustersync-18090') + 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[@]}" + [[ clustersync-18090 == \- ]] + [[ clustersync-18090 =~ ^(-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 clustersync-18090 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.NP2EZdlg6D + cat /tmp/tmp.LXNHyUVaoO + rm /tmp/tmp.NP2EZdlg6D /tmp/tmp.LXNHyUVaoO + return 0 + desc 'create namespace clustersync-18090' + set +o xtrace ----------------------------------------------------------------------------------- create namespace clustersync-18090 ----------------------------------------------------------------------------------- + kubectl_bin create namespace clustersync-18090 ++ mktemp + local LAST_OUT=/tmp/tmp.uNbglVEuHX ++ mktemp + local LAST_ERR=/tmp/tmp.Al7OHa0Wj9 + local exit_status=0 + local timeout=4 + local i + args=('create' 'namespace' 'clustersync-18090') + 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[@]}" + [[ clustersync-18090 == \- ]] + [[ clustersync-18090 =~ ^(-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 clustersync-18090 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.uNbglVEuHX namespace/clustersync-18090 created + cat /tmp/tmp.Al7OHa0Wj9 + rm /tmp/tmp.uNbglVEuHX /tmp/tmp.Al7OHa0Wj9 + return 0 + set_kube_ctx clustersync-18090 + local namespace=clustersync-18090 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.qEoZTQztdR +++ mktemp ++ local LAST_ERR=/tmp/tmp.73l6Qs7P4h ++ 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.qEoZTQztdR ++ cat /tmp/tmp.73l6Qs7P4h ++ rm /tmp/tmp.qEoZTQztdR /tmp/tmp.73l6Qs7P4h ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4 --namespace=clustersync-18090 ++ mktemp + local LAST_OUT=/tmp/tmp.sHHkgrpL11 ++ mktemp + local LAST_ERR=/tmp/tmp.8rZi5ZBsCu + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4' '--namespace=clustersync-18090') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ config == \- ]] + [[ config =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ set-context == \- ]] + [[ set-context =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --namespace=clustersync-18090 == \- ]] + [[ --namespace=clustersync-18090 =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4 --namespace=clustersync-18090 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.sHHkgrpL11 Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2715-27e0b7960-9-cluster4" modified. + cat /tmp/tmp.8rZi5ZBsCu + rm /tmp/tmp.sHHkgrpL11 /tmp/tmp.8rZi5ZBsCu + return 0 + desc 'deploy local-s3 (storage for target-cluster backups)' + set +o xtrace ----------------------------------------------------------------------------------- deploy local-s3 (storage for target-cluster backups) ----------------------------------------------------------------------------------- + deploy_s3_storage + local cert_secret= + local fullname=s3-storage + desc 'install SeaweedFS: s3-storage' + set +o xtrace ----------------------------------------------------------------------------------- install SeaweedFS: s3-storage ----------------------------------------------------------------------------------- + helm uninstall s3-storage + : + helm repo remove seaweedfs "seaweedfs" has been removed from your repositories + helm repo add seaweedfs https://seaweedfs.github.io/seaweedfs/helm "seaweedfs" has been added to your repositories + local endpoint=http://s3-storage-all-in-one:8333 + seaweedfs_args=('--version' '4.47.0' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/seaweedfs-values.yaml' '--set' 'allInOne.data.type=persistentVolumeClaim' '--set' 'allInOne.data.size=2G' '--set' 'fullnameOverride=s3-storage' '--set-string' 's3.credentials.admin.accessKey=some-access-key' '--set-string' 's3.credentials.admin.secretKey=some-secret-key' '--set-string' 'global.seaweedfs.serviceAccountName=s3-storage-sa') + local seaweedfs_args + arch_scheduling_enabled + [[ -n '' ]] + [[ -n '' ]] + retry 10 60 helm install s3-storage --version 4.47.0 -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/seaweedfs-values.yaml --set allInOne.data.type=persistentVolumeClaim --set allInOne.data.size=2G --set fullnameOverride=s3-storage --set-string s3.credentials.admin.accessKey=some-access-key --set-string s3.credentials.admin.secretKey=some-secret-key --set-string global.seaweedfs.serviceAccountName=s3-storage-sa seaweedfs/seaweedfs + local max=10 + local delay=60 + shift 2 + local n=1 + helm install s3-storage --version 4.47.0 -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/seaweedfs-values.yaml --set allInOne.data.type=persistentVolumeClaim --set allInOne.data.size=2G --set fullnameOverride=s3-storage --set-string s3.credentials.admin.accessKey=some-access-key --set-string s3.credentials.admin.secretKey=some-secret-key --set-string global.seaweedfs.serviceAccountName=s3-storage-sa seaweedfs/seaweedfs NAME: s3-storage LAST DEPLOYED: Mon Nov 23 05:53:02 2026 NAMESPACE: clustersync-18090 STATUS: deployed REVISION: 1 TEST SUITE: None + kubectl_bin rollout status deployment/s3-storage-all-in-one --timeout=300s ++ mktemp + local LAST_OUT=/tmp/tmp.kwlhZDDFI8 ++ mktemp + local LAST_ERR=/tmp/tmp.jiuyCUEzmQ + local exit_status=0 + local timeout=4 + local i + args=('rollout' 'status' 'deployment/s3-storage-all-in-one' '--timeout=300s') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ rollout == \- ]] + [[ rollout =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ status == \- ]] + [[ status =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ deployment/s3-storage-all-in-one == \- ]] + [[ deployment/s3-storage-all-in-one =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --timeout=300s == \- ]] + [[ --timeout=300s =~ ^(-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 rollout status deployment/s3-storage-all-in-one --timeout=300s + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.kwlhZDDFI8 Waiting for deployment "s3-storage-all-in-one" rollout to finish: 0 of 1 updated replicas are available... deployment "s3-storage-all-in-one" successfully rolled out + cat /tmp/tmp.jiuyCUEzmQ + rm /tmp/tmp.kwlhZDDFI8 /tmp/tmp.jiuyCUEzmQ + return 0 + '[' -n psmdb-operator ']' + kubectl_bin create svc -n psmdb-operator externalname s3-storage-all-in-one --external-name=s3-storage-all-in-one.clustersync-18090.svc.cluster.local --tcp=8333 --tcp=8443 service/s3-storage-all-in-one created + create_s3_bucket operator-testing http://s3-storage-all-in-one:8333 + local bucket=operator-testing + local endpoint=http://s3-storage-all-in-one:8333 + retry 12 10 aws_cli_s3 http://s3-storage-all-in-one:8333 s3 mb s3://operator-testing + local max=12 + local delay=10 + shift 2 + local n=1 + aws_cli_s3 http://s3-storage-all-in-one:8333 s3 mb s3://operator-testing + local endpoint=http://s3-storage-all-in-one:8333 + shift + kubectl_bin run -i --rm aws-cli --image=docker.io/amazon/aws-cli:2.34.60 --restart=Never --env=AWS_ACCESS_KEY_ID=some-access-key --env=AWS_SECRET_ACCESS_KEY=some-secret-key --env=AWS_DEFAULT_REGION=us-east-1 -- --no-verify-ssl --endpoint-url http://s3-storage-all-in-one:8333 s3 mb s3://operator-testing ++ mktemp + local LAST_OUT=/tmp/tmp.n4dSnjEp7q ++ mktemp + local LAST_ERR=/tmp/tmp.ywWMXlhfX8 + local exit_status=0 + local timeout=4 + local i + args=('run' '-i' '--rm' 'aws-cli' '--image=docker.io/amazon/aws-cli:2.34.60' '--restart=Never' '--env=AWS_ACCESS_KEY_ID=some-access-key' '--env=AWS_SECRET_ACCESS_KEY=some-secret-key' '--env=AWS_DEFAULT_REGION=us-east-1' '--' '--no-verify-ssl' '--endpoint-url' 'http://s3-storage-all-in-one:8333' 's3' 'mb' 's3://operator-testing') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ run == \- ]] + [[ run =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -i == \- ]] + [[ -i =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --rm == \- ]] + [[ --rm =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ aws-cli == \- ]] + [[ aws-cli =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --image=docker.io/amazon/aws-cli:2.34.60 == \- ]] + [[ --image=docker.io/amazon/aws-cli:2.34.60 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --restart=Never == \- ]] + [[ --restart=Never =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --env=AWS_ACCESS_KEY_ID=some-access-key == \- ]] + [[ --env=AWS_ACCESS_KEY_ID=some-access-key =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --env=AWS_SECRET_ACCESS_KEY=some-secret-key == \- ]] + [[ --env=AWS_SECRET_ACCESS_KEY=some-secret-key =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --env=AWS_DEFAULT_REGION=us-east-1 == \- ]] + [[ --env=AWS_DEFAULT_REGION=us-east-1 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --no-verify-ssl == \- ]] + [[ --no-verify-ssl =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --endpoint-url == \- ]] + [[ --endpoint-url =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ http://s3-storage-all-in-one:8333 == \- ]] + [[ http://s3-storage-all-in-one:8333 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ s3 == \- ]] + [[ s3 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mb == \- ]] + [[ mb =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ s3://operator-testing == \- ]] + [[ s3://operator-testing =~ ^(-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 run -i --rm aws-cli --image=docker.io/amazon/aws-cli:2.34.60 --restart=Never --env=AWS_ACCESS_KEY_ID=some-access-key --env=AWS_SECRET_ACCESS_KEY=some-secret-key --env=AWS_DEFAULT_REGION=us-east-1 -- --no-verify-ssl --endpoint-url http://s3-storage-all-in-one:8333 s3 mb s3://operator-testing + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.n4dSnjEp7q pod "aws-cli" deleted from clustersync-18090 namespace + cat /tmp/tmp.ywWMXlhfX8 Warning: BCID failed open: BCID suppressed until 2026-11-23 08:49:38.807084448 +0000 UTC m=+10880.470603522 All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt. If you don't see a command prompt, try pressing enter. + rm /tmp/tmp.n4dSnjEp7q /tmp/tmp.ywWMXlhfX8 + return 0 + desc 'apply users secrets, local-s3 secret and start client' + set +o xtrace ----------------------------------------------------------------------------------- apply users secrets, local-s3 secret and start client ----------------------------------------------------------------------------------- + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/s3-secret.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/client.yml ++ mktemp + local LAST_OUT=/tmp/tmp.vJxGAeJUwC ++ mktemp + local LAST_ERR=/tmp/tmp.IQ9JlNLKZu + local exit_status=0 + local timeout=4 + local i + args=('apply' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/secrets.yml' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/s3-secret.yml' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/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-2715/e2e-tests/clustersync/conf/secrets.yml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/secrets.yml =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/s3-secret.yml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/s3-secret.yml =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/client.yml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/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-2715/e2e-tests/clustersync/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/s3-secret.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/conf/client.yml + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.vJxGAeJUwC secret/source-users created secret/target-users created secret/clustersync-source-creds created secret/s3-secret created deployment.apps/psmdb-client created + cat /tmp/tmp.IQ9JlNLKZu + rm /tmp/tmp.vJxGAeJUwC /tmp/tmp.IQ9JlNLKZu + return 0 + desc 'deploy source-cluster' + set +o xtrace ----------------------------------------------------------------------------------- deploy source-cluster ----------------------------------------------------------------------------------- + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/source-cluster.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/source-cluster.yml + kubectl_bin apply -f - ++ mktemp + yq eval '(.spec | select(.image == null)).image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3"' + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/source-cluster.yml + yq eval '(.spec | select(has("pmm"))).pmm.image = "docker.io/perconalab/pmm-client:3-dev-latest"' + local LAST_OUT=/tmp/tmp.2lebXrRZ34 ++ mktemp + yq eval '(.spec | select(has("search"))).search.image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongot"' + [[ -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)' + /usr/sbin/sed -e s/NAME_SPACE/clustersync-18090/g + yq eval '(.spec | select(has("backup"))).backup.image = "docker.io/perconalab/percona-server-mongodb-operator:main-backup"' + add_arch_to_psmdb - + arch_scheduling_enabled + [[ -n '' ]] + cat - + yq eval '.spec.upgradeOptions.apply="Never"' + yq eval '(.spec | select(has("initImage"))).initImage = "docker.io/perconalab/percona-server-mongodb-operator:PR-2715-27e0b7960"' + local LAST_ERR=/tmp/tmp.gTAzkk0uAP + 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.0ekJXLmuaw + cat + return + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.0ekJXLmuaw + 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.0ekJXLmuaw + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.2lebXrRZ34 perconaservermongodb.psmdb.percona.com/source-cluster created + cat /tmp/tmp.gTAzkk0uAP + rm /tmp/tmp.2lebXrRZ34 /tmp/tmp.gTAzkk0uAP /tmp/tmp.0ekJXLmuaw + return 0 + desc 'deploy target-cluster' + set +o xtrace ----------------------------------------------------------------------------------- deploy target-cluster ----------------------------------------------------------------------------------- + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/target-cluster.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/target-cluster.yml + kubectl_bin apply -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/target-cluster.yml + yq eval '(.spec | select(.image == null)).image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3"' ++ mktemp + 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-2715-27e0b7960"' + yq eval '(.spec | select(has("backup"))).backup.image = "docker.io/perconalab/percona-server-mongodb-operator:main-backup"' + local LAST_OUT=/tmp/tmp.o12uHBRHMz ++ mktemp + /usr/sbin/sed -e s/NAME_SPACE/clustersync-18090/g + yq eval '(.spec | select(has("search"))).search.image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongot"' + local LAST_ERR=/tmp/tmp.meW0DrpOX7 + local exit_status=0 + yq eval '.spec.upgradeOptions.apply="Never"' + add_arch_to_psmdb - + [[ -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)' + arch_scheduling_enabled + [[ -n '' ]] + cat - + 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.T5vvcG0aqZ + cat + return + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.T5vvcG0aqZ + 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.T5vvcG0aqZ + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.o12uHBRHMz perconaservermongodb.psmdb.percona.com/target-cluster created + cat /tmp/tmp.meW0DrpOX7 + rm /tmp/tmp.o12uHBRHMz /tmp/tmp.meW0DrpOX7 /tmp/tmp.T5vvcG0aqZ + return 0 + desc 'wait for source-cluster ready' + set +o xtrace ----------------------------------------------------------------------------------- wait for source-cluster ready ----------------------------------------------------------------------------------- + wait_for_running source-cluster-rs0 1 + local name=source-cluster-rs0 + let last_pod=0 + : + local check_cluster_readiness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=source-cluster ++ seq 0 0 + for i in $(seq 0 $last_pod) + [[ 0 -eq 0 ]] ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Pf6OyH7QY9 +++ mktemp ++ local LAST_ERR=/tmp/tmp.VlCf0qBzac ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'source-cluster' '-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[@]}" ++ [[ source-cluster == \- ]] ++ [[ source-cluster =~ ^(-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 source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.Pf6OyH7QY9 ++ cat /tmp/tmp.VlCf0qBzac ++ rm /tmp/tmp.Pf6OyH7QY9 /tmp/tmp.VlCf0qBzac ++ return 0 + [[ '' == true ]] + wait_pod source-cluster-rs0-0 + local pod=source-cluster-rs0-0 + set +o xtrace waiting for pod/source-cluster-rs0-0 to be ready....................OK ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.HhDxYZtC68 +++ mktemp ++ local LAST_ERR=/tmp/tmp.KlRdtRiYXQ ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'source-cluster' '-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[@]}" ++ [[ source-cluster == \- ]] ++ [[ source-cluster =~ ^(-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 source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.HhDxYZtC68 ++ cat /tmp/tmp.KlRdtRiYXQ ++ rm /tmp/tmp.HhDxYZtC68 /tmp/tmp.KlRdtRiYXQ ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.XSFKl52gw5 +++ mktemp ++ local LAST_ERR=/tmp/tmp.PLhKwJGdY1 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'source-cluster' '-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[@]}" ++ [[ source-cluster == \- ]] ++ [[ source-cluster =~ ^(-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 source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.XSFKl52gw5 ++ cat /tmp/tmp.PLhKwJGdY1 ++ rm /tmp/tmp.XSFKl52gw5 /tmp/tmp.PLhKwJGdY1 ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster source-cluster to be ready............................................................................................... + wait_for_running source-cluster-cfg 1 false + local name=source-cluster-cfg + let last_pod=0 + : + local check_cluster_readiness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=source-cluster ++ seq 0 0 + for i in $(seq 0 $last_pod) + [[ 0 -eq 0 ]] ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.AtNIxu7hxu +++ mktemp ++ local LAST_ERR=/tmp/tmp.5Ei7BkY851 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'source-cluster' '-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[@]}" ++ [[ source-cluster == \- ]] ++ [[ source-cluster =~ ^(-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 source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.AtNIxu7hxu ++ cat /tmp/tmp.5Ei7BkY851 ++ rm /tmp/tmp.AtNIxu7hxu /tmp/tmp.5Ei7BkY851 ++ return 0 + [[ '' == true ]] + wait_pod source-cluster-cfg-0 + local pod=source-cluster-cfg-0 + set +o xtrace waiting for pod/source-cluster-cfg-0 to be ready.OK ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.NJcfwG3CnZ +++ mktemp ++ local LAST_ERR=/tmp/tmp.uT4fbptkgw ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'source-cluster' '-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[@]}" ++ [[ source-cluster == \- ]] ++ [[ source-cluster =~ ^(-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 source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.NJcfwG3CnZ ++ cat /tmp/tmp.uT4fbptkgw ++ rm /tmp/tmp.NJcfwG3CnZ /tmp/tmp.uT4fbptkgw ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Bd7QRJ60Sd +++ mktemp ++ local LAST_ERR=/tmp/tmp.vlW3k5n8Je ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'source-cluster' '-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[@]}" ++ [[ source-cluster == \- ]] ++ [[ source-cluster =~ ^(-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 source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.Bd7QRJ60Sd ++ cat /tmp/tmp.vlW3k5n8Je ++ rm /tmp/tmp.Bd7QRJ60Sd /tmp/tmp.vlW3k5n8Je ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + wait_for_running source-cluster-mongos 1 false + local name=source-cluster-mongos + let last_pod=0 + : + local check_cluster_readiness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=mongos + local cluster_name=source-cluster ++ seq 0 0 + for i in $(seq 0 $last_pod) + [[ 0 -eq 0 ]] ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Y11xOzIbRC +++ mktemp ++ local LAST_ERR=/tmp/tmp.SrrvTL5WDS ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'source-cluster' '-o' 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ source-cluster == \- ]] ++ [[ source-cluster =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.Y11xOzIbRC ++ cat /tmp/tmp.SrrvTL5WDS ++ rm /tmp/tmp.Y11xOzIbRC /tmp/tmp.SrrvTL5WDS ++ return 0 + [[ '' == true ]] + wait_pod source-cluster-mongos-0 + local pod=source-cluster-mongos-0 + set +o xtrace waiting for pod/source-cluster-mongos-0 to be ready.OK ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Uly6ChZY5E +++ mktemp ++ local LAST_ERR=/tmp/tmp.tBo6iD9qkl ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'source-cluster' '-o' 'jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ source-cluster == \- ]] ++ [[ source-cluster =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.Uly6ChZY5E ++ cat /tmp/tmp.tBo6iD9qkl ++ rm /tmp/tmp.Uly6ChZY5E /tmp/tmp.tBo6iD9qkl ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.I1nWgJEIMJ +++ mktemp ++ local LAST_ERR=/tmp/tmp.2nJRRZNL0n ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'source-cluster' '-o' 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ source-cluster == \- ]] ++ [[ source-cluster =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.I1nWgJEIMJ ++ cat /tmp/tmp.2nJRRZNL0n ++ rm /tmp/tmp.I1nWgJEIMJ /tmp/tmp.2nJRRZNL0n ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + wait_cluster_consistency source-cluster + local cluster_name=source-cluster + local wait_time=32 + retry=0 + sleep 7 + echo -n 'waiting for cluster source-cluster to be ready' waiting for cluster source-cluster to be ready++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.HAVcRbPJCC +++ mktemp ++ local LAST_ERR=/tmp/tmp.CdjGq3FL0n ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'source-cluster' '-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[@]}" ++ [[ source-cluster == \- ]] ++ [[ source-cluster =~ ^(-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 source-cluster -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.HAVcRbPJCC ++ cat /tmp/tmp.CdjGq3FL0n ++ rm /tmp/tmp.HAVcRbPJCC /tmp/tmp.CdjGq3FL0n ++ return 0 + [[ ready == ready ]] + echo .OK .OK + desc 'wait for target-cluster ready (which has 2 shards vs source'\''s 1 shard)' + set +o xtrace ----------------------------------------------------------------------------------- wait for target-cluster ready (which has 2 shards vs source's 1 shard) ----------------------------------------------------------------------------------- + wait_for_running target-cluster-rs0 1 + local name=target-cluster-rs0 + let last_pod=0 + : + local check_cluster_readiness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=target-cluster ++ seq 0 0 + for i in $(seq 0 $last_pod) + [[ 0 -eq 0 ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.G1TOXBtuwE +++ mktemp ++ local LAST_ERR=/tmp/tmp.pSGKUjr2H5 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-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[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-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 target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.G1TOXBtuwE ++ cat /tmp/tmp.pSGKUjr2H5 ++ rm /tmp/tmp.G1TOXBtuwE /tmp/tmp.pSGKUjr2H5 ++ return 0 + [[ '' == true ]] + wait_pod target-cluster-rs0-0 + local pod=target-cluster-rs0-0 + set +o xtrace waiting for pod/target-cluster-rs0-0 to be ready.OK ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.YZkfyxur9g +++ mktemp ++ local LAST_ERR=/tmp/tmp.NOuXA3TEsp ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-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[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-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 target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.YZkfyxur9g ++ cat /tmp/tmp.NOuXA3TEsp ++ rm /tmp/tmp.YZkfyxur9g /tmp/tmp.NOuXA3TEsp ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.T5hP7eHyPK +++ mktemp ++ local LAST_ERR=/tmp/tmp.cbRz8StHOk ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-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[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-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 target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.T5hP7eHyPK ++ cat /tmp/tmp.cbRz8StHOk ++ rm /tmp/tmp.T5hP7eHyPK /tmp/tmp.cbRz8StHOk ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster target-cluster to be ready + wait_for_running target-cluster-rs1 1 false + local name=target-cluster-rs1 + let last_pod=0 + : + local check_cluster_readiness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs1 + local cluster_name=target-cluster ++ seq 0 0 + for i in $(seq 0 $last_pod) + [[ 0 -eq 0 ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.FZcaA1prCW +++ mktemp ++ local LAST_ERR=/tmp/tmp.7iLcJd4E7v ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-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[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-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 target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.FZcaA1prCW ++ cat /tmp/tmp.7iLcJd4E7v ++ rm /tmp/tmp.FZcaA1prCW /tmp/tmp.7iLcJd4E7v ++ return 0 + [[ '' == true ]] + wait_pod target-cluster-rs1-0 + local pod=target-cluster-rs1-0 + set +o xtrace waiting for pod/target-cluster-rs1-0 to be ready.OK ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.vvKq4Pgz8C +++ mktemp ++ local LAST_ERR=/tmp/tmp.BV7tSYOVh4 ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-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[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-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 target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.vvKq4Pgz8C ++ cat /tmp/tmp.BV7tSYOVh4 ++ rm /tmp/tmp.vvKq4Pgz8C /tmp/tmp.BV7tSYOVh4 ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.7JxbPXHRJ9 +++ mktemp ++ local LAST_ERR=/tmp/tmp.RNRPiyvqOw ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-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[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-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 target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.7JxbPXHRJ9 ++ cat /tmp/tmp.RNRPiyvqOw ++ rm /tmp/tmp.7JxbPXHRJ9 /tmp/tmp.RNRPiyvqOw ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + wait_for_running target-cluster-cfg 1 false + local name=target-cluster-cfg + let last_pod=0 + : + local check_cluster_readiness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=target-cluster ++ seq 0 0 + for i in $(seq 0 $last_pod) + [[ 0 -eq 0 ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.e1BOa1fbGj +++ mktemp ++ local LAST_ERR=/tmp/tmp.a07EU6QL2d ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-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[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-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 target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.e1BOa1fbGj ++ cat /tmp/tmp.a07EU6QL2d ++ rm /tmp/tmp.e1BOa1fbGj /tmp/tmp.a07EU6QL2d ++ return 0 + [[ '' == true ]] + wait_pod target-cluster-cfg-0 + local pod=target-cluster-cfg-0 + set +o xtrace waiting for pod/target-cluster-cfg-0 to be ready.OK ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.WLhgy4p5LL +++ mktemp ++ local LAST_ERR=/tmp/tmp.ID9EbMFtgT ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-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[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-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 target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.WLhgy4p5LL ++ cat /tmp/tmp.ID9EbMFtgT ++ rm /tmp/tmp.WLhgy4p5LL /tmp/tmp.ID9EbMFtgT ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.eImpjt4ZJ8 +++ mktemp ++ local LAST_ERR=/tmp/tmp.XF70tT3lLq ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-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[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-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 target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.eImpjt4ZJ8 ++ cat /tmp/tmp.XF70tT3lLq ++ rm /tmp/tmp.eImpjt4ZJ8 /tmp/tmp.XF70tT3lLq ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + wait_for_running target-cluster-mongos 1 false + local name=target-cluster-mongos + let last_pod=0 + : + local check_cluster_readiness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=mongos + local cluster_name=target-cluster ++ seq 0 0 + for i in $(seq 0 $last_pod) + [[ 0 -eq 0 ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.JIhbZgWkRe +++ mktemp ++ local LAST_ERR=/tmp/tmp.fmbutoLawk ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-o' 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.JIhbZgWkRe ++ cat /tmp/tmp.fmbutoLawk ++ rm /tmp/tmp.JIhbZgWkRe /tmp/tmp.fmbutoLawk ++ return 0 + [[ '' == true ]] + wait_pod target-cluster-mongos-0 + local pod=target-cluster-mongos-0 + set +o xtrace waiting for pod/target-cluster-mongos-0 to be ready.OK ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.B7SOETijd2 +++ mktemp ++ local LAST_ERR=/tmp/tmp.Euv71OZJLI ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-o' 'jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.B7SOETijd2 ++ cat /tmp/tmp.Euv71OZJLI ++ rm /tmp/tmp.B7SOETijd2 /tmp/tmp.Euv71OZJLI ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.p0lUzdqmJw +++ mktemp ++ local LAST_ERR=/tmp/tmp.ipA3HzgimA ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-o' 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}') ++ local args ++ transformed_files=() ++ local transformed_files ++ local stdin_manifest ++ for i in "${!args[@]}" ++ [[ get == \- ]] ++ [[ get =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ psmdb == \- ]] ++ [[ psmdb =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ -o == \- ]] ++ [[ -o =~ ^(-f|--filename)=-$ ]] ++ for i in "${!args[@]}" ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled} == \- ]] ++ [[ jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled} =~ ^(-f|--filename)=-$ ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ arch_scheduling_enabled ++ [[ -n '' ]] ++ local attempt ++ local delay +++ seq 0 9 ++ for attempt in $(seq 0 9) ++ set +e ++ kubectl get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.p0lUzdqmJw ++ cat /tmp/tmp.ipA3HzgimA ++ rm /tmp/tmp.p0lUzdqmJw /tmp/tmp.ipA3HzgimA ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + wait_cluster_consistency target-cluster + local cluster_name=target-cluster + local wait_time=32 + retry=0 + sleep 7 + echo -n 'waiting for cluster target-cluster to be ready' waiting for cluster target-cluster to be ready++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.zOVaCmJYzu +++ mktemp ++ local LAST_ERR=/tmp/tmp.Td8qsMLH0P ++ local exit_status=0 ++ local timeout=4 ++ local i ++ args=('get' 'psmdb' 'target-cluster' '-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[@]}" ++ [[ target-cluster == \- ]] ++ [[ target-cluster =~ ^(-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 target-cluster -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ [[ 0 == 0 ]] ++ break ++ cat /tmp/tmp.zOVaCmJYzu ++ cat /tmp/tmp.Td8qsMLH0P ++ rm /tmp/tmp.zOVaCmJYzu /tmp/tmp.Td8qsMLH0P ++ return 0 + [[ ready == ready ]] + echo .OK .OK + desc 'read PCSM source credentials from secret/clustersync-source-creds' + set +o xtrace ----------------------------------------------------------------------------------- read PCSM source credentials from secret/clustersync-source-creds ----------------------------------------------------------------------------------- ++ getSecretData clustersync-source-creds username ++ local secretName=clustersync-source-creds ++ local dataKey=username +++ kubectl get secrets/clustersync-source-creds '--template={{.data.username}}' +++ base64 -d ++ local data=source ++ echo source + source_user=source ++ getSecretData clustersync-source-creds password ++ local secretName=clustersync-source-creds ++ local dataKey=password +++ kubectl get secrets/clustersync-source-creds '--template={{.data.password}}' +++ base64 -d ++ local data=mys3cretpAss ++ echo mys3cretpAss + source_pass=mys3cretpAss + desc 'create '\''source'\'' user on source-cluster (for PCSM)' + set +o xtrace ----------------------------------------------------------------------------------- create 'source' user on source-cluster (for PCSM) ----------------------------------------------------------------------------------- + mongosh_on_mongos source-cluster userAdmin userAdmin123456 'db.getSiblingDB('\''admin'\'').createUser({user:'\''source'\'',pwd:'\''mys3cretpAss'\'',roles:[{role:'\''backup'\'',db:'\''admin'\''},{role:'\''clusterMonitor'\'',db:'\''admin'\''},{role:'\''readAnyDatabase'\'',db:'\''admin'\''}]})' + local cluster=source-cluster + local user=userAdmin + local pass=userAdmin123456 + local 'script=db.getSiblingDB('\''admin'\'').createUser({user:'\''source'\'',pwd:'\''mys3cretpAss'\'',roles:[{role:'\''backup'\'',db:'\''admin'\''},{role:'\''clusterMonitor'\'',db:'\''admin'\''},{role:'\''readAnyDatabase'\'',db:'\''admin'\''}]})' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB('\''admin'\'').createUser({user:'\''source'\'',pwd:'\''mys3cretpAss'\'',roles:[{role:'\''backup'\'',db:'\''admin'\''},{role:'\''clusterMonitor'\'',db:'\''admin'\''},{role:'\''readAnyDatabase'\'',db:'\''admin'\''}]})' ++ mktemp + local LAST_OUT=/tmp/tmp.yEjmWryk24 ++ mktemp + local LAST_ERR=/tmp/tmp.NxBmHRn3bP + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'db.getSiblingDB('\''admin'\'').createUser({user:'\''source'\'',pwd:'\''mys3cretpAss'\'',roles:[{role:'\''backup'\'',db:'\''admin'\''},{role:'\''clusterMonitor'\'',db:'\''admin'\''},{role:'\''readAnyDatabase'\'',db:'\''admin'\''}]})') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ db.getSiblingDB('admin').createUser({user:'source',pwd:'mys3cretpAss',roles:[{role:'backup',db:'admin'},{role:'clusterMonitor',db:'admin'},{role:'readAnyDatabase',db:'admin'}]}) == \- ]] + [[ db.getSiblingDB('admin').createUser({user:'source',pwd:'mys3cretpAss',roles:[{role:'backup',db:'admin'},{role:'clusterMonitor',db:'admin'},{role:'readAnyDatabase',db:'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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB('\''admin'\'').createUser({user:'\''source'\'',pwd:'\''mys3cretpAss'\'',roles:[{role:'\''backup'\'',db:'\''admin'\''},{role:'\''clusterMonitor'\'',db:'\''admin'\''},{role:'\''readAnyDatabase'\'',db:'\''admin'\''}]})' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.yEjmWryk24 { ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1795413600, i: 1 }), signature: { hash: Binary.createFromBase64('Bew4hLj+r+cj/2f1uslukwqyyAU=', 0), keyId: Long('7711241569512194056') } }, operationTime: Timestamp({ t: 1795413600, i: 1 }) } + cat /tmp/tmp.NxBmHRn3bP + rm /tmp/tmp.yEjmWryk24 /tmp/tmp.NxBmHRn3bP + return 0 + desc 'verify '\''source'\'' user authenticates' + set +o xtrace ----------------------------------------------------------------------------------- verify 'source' user authenticates ----------------------------------------------------------------------------------- + mongosh_on_mongos source-cluster source mys3cretpAss 'db.runCommand({connectionStatus: 1}).authInfo' + local cluster=source-cluster + local user=source + local pass=mys3cretpAss + local 'script=db.runCommand({connectionStatus: 1}).authInfo' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://source:mys3cretpAss@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.runCommand({connectionStatus: 1}).authInfo' ++ mktemp + local LAST_OUT=/tmp/tmp.TUz0mx8fNm ++ mktemp + local LAST_ERR=/tmp/tmp.BgAbyKXH7U + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://source:mys3cretpAss@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'db.runCommand({connectionStatus: 1}).authInfo') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://source:mys3cretpAss@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://source:mys3cretpAss@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ db.runCommand({connectionStatus: 1}).authInfo == \- ]] + [[ db.runCommand({connectionStatus: 1}).authInfo =~ ^(-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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://source:mys3cretpAss@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.runCommand({connectionStatus: 1}).authInfo' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.TUz0mx8fNm { authenticatedUsers: [ { user: 'source', db: 'admin' } ], authenticatedUserRoles: [ { role: 'backup', db: 'admin' }, { role: 'clusterMonitor', db: 'admin' }, { role: 'readAnyDatabase', db: 'admin' } ] } + cat /tmp/tmp.BgAbyKXH7U + rm /tmp/tmp.TUz0mx8fNm /tmp/tmp.BgAbyKXH7U + return 0 + desc 'create '\''myApp'\'' user on source-cluster (workload writer/reader)' + set +o xtrace ----------------------------------------------------------------------------------- create 'myApp' user on source-cluster (workload writer/reader) ----------------------------------------------------------------------------------- + mongosh_on_mongos source-cluster userAdmin userAdmin123456 'db.getSiblingDB('\''admin'\'').createUser({user:'\''myApp'\'',pwd:'\''myPass'\'',roles:[{db:'\''myApp'\'',role:'\''readWrite'\''}]})' + local cluster=source-cluster + local user=userAdmin + local pass=userAdmin123456 + local 'script=db.getSiblingDB('\''admin'\'').createUser({user:'\''myApp'\'',pwd:'\''myPass'\'',roles:[{db:'\''myApp'\'',role:'\''readWrite'\''}]})' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB('\''admin'\'').createUser({user:'\''myApp'\'',pwd:'\''myPass'\'',roles:[{db:'\''myApp'\'',role:'\''readWrite'\''}]})' ++ mktemp + local LAST_OUT=/tmp/tmp.Wpt5pFMtiQ ++ mktemp + local LAST_ERR=/tmp/tmp.TCNlgZzgWS + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'db.getSiblingDB('\''admin'\'').createUser({user:'\''myApp'\'',pwd:'\''myPass'\'',roles:[{db:'\''myApp'\'',role:'\''readWrite'\''}]})') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ db.getSiblingDB('admin').createUser({user:'myApp',pwd:'myPass',roles:[{db:'myApp',role:'readWrite'}]}) == \- ]] + [[ db.getSiblingDB('admin').createUser({user:'myApp',pwd:'myPass',roles:[{db:'myApp',role:'readWrite'}]}) =~ ^(-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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB('\''admin'\'').createUser({user:'\''myApp'\'',pwd:'\''myPass'\'',roles:[{db:'\''myApp'\'',role:'\''readWrite'\''}]})' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.Wpt5pFMtiQ { ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1795413615, i: 1 }), signature: { hash: Binary.createFromBase64('WaUXJAIyhOF5KtbdLCOXOYiB0Xc=', 0), keyId: Long('7711241569512194056') } }, operationTime: Timestamp({ t: 1795413615, i: 1 }) } + cat /tmp/tmp.TCNlgZzgWS + rm /tmp/tmp.Wpt5pFMtiQ /tmp/tmp.TCNlgZzgWS + return 0 + desc 'create '\''myApp'\'' user on target-cluster (verification reader)' + set +o xtrace ----------------------------------------------------------------------------------- create 'myApp' user on target-cluster (verification reader) ----------------------------------------------------------------------------------- + mongosh_on_mongos target-cluster userAdmin userAdmin123456 'db.getSiblingDB('\''admin'\'').createUser({user:'\''myApp'\'',pwd:'\''myPass'\'',roles:[{db:'\''myApp'\'',role:'\''readWrite'\''}]})' + local cluster=target-cluster + local user=userAdmin + local pass=userAdmin123456 + local 'script=db.getSiblingDB('\''admin'\'').createUser({user:'\''myApp'\'',pwd:'\''myPass'\'',roles:[{db:'\''myApp'\'',role:'\''readWrite'\''}]})' + kubectl_bin exec target-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB('\''admin'\'').createUser({user:'\''myApp'\'',pwd:'\''myPass'\'',roles:[{db:'\''myApp'\'',role:'\''readWrite'\''}]})' ++ mktemp + local LAST_OUT=/tmp/tmp.bOTDUyxWhd ++ mktemp + local LAST_ERR=/tmp/tmp.6RJIkUjTdB + local exit_status=0 + local timeout=4 + local i + args=('exec' 'target-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'db.getSiblingDB('\''admin'\'').createUser({user:'\''myApp'\'',pwd:'\''myPass'\'',roles:[{db:'\''myApp'\'',role:'\''readWrite'\''}]})') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ target-cluster-mongos-0 == \- ]] + [[ target-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ db.getSiblingDB('admin').createUser({user:'myApp',pwd:'myPass',roles:[{db:'myApp',role:'readWrite'}]}) == \- ]] + [[ db.getSiblingDB('admin').createUser({user:'myApp',pwd:'myPass',roles:[{db:'myApp',role:'readWrite'}]}) =~ ^(-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 target-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://userAdmin:userAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB('\''admin'\'').createUser({user:'\''myApp'\'',pwd:'\''myPass'\'',roles:[{db:'\''myApp'\'',role:'\''readWrite'\''}]})' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.bOTDUyxWhd { ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1795413624, i: 1 }), signature: { hash: Binary.createFromBase64('ccVin4IFv5WqCKQA81cUi6ETPAs=', 0), keyId: Long('7711241865864937479') } }, operationTime: Timestamp({ t: 1795413624, i: 1 }) } + cat /tmp/tmp.6RJIkUjTdB + rm /tmp/tmp.bOTDUyxWhd /tmp/tmp.6RJIkUjTdB + return 0 + desc 'write initial data to source-cluster' + set +o xtrace ----------------------------------------------------------------------------------- write initial data to source-cluster ----------------------------------------------------------------------------------- + mongosh_on_mongos source-cluster myApp myPass 'db.getSiblingDB("myApp").test.insertOne({x: 100500})' + local cluster=source-cluster + local user=myApp + local pass=myPass + local 'script=db.getSiblingDB("myApp").test.insertOne({x: 100500})' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100500})' ++ mktemp + local LAST_OUT=/tmp/tmp.SVtIf5N9Vi ++ mktemp + local LAST_ERR=/tmp/tmp.AQ60PvBxpt + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'db.getSiblingDB("myApp").test.insertOne({x: 100500})') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ db.getSiblingDB("myApp").test.insertOne({x: 100500}) == \- ]] + [[ db.getSiblingDB("myApp").test.insertOne({x: 100500}) =~ ^(-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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100500})' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.SVtIf5N9Vi { acknowledged: true, insertedId: ObjectId('6b03d6803fdf22569e10a442') } + cat /tmp/tmp.AQ60PvBxpt + rm /tmp/tmp.SVtIf5N9Vi /tmp/tmp.AQ60PvBxpt + return 0 + desc 'shard myApp.sharded on source-cluster and fill it' + set +o xtrace ----------------------------------------------------------------------------------- shard myApp.sharded on source-cluster and fill it ----------------------------------------------------------------------------------- + shard_source_collection + mongosh_on_mongos source-cluster clusterAdmin clusterAdmin123456 'sh.enableSharding("myApp"); sh.shardCollection("myApp.sharded", {k: "hashed"})' + local cluster=source-cluster + local user=clusterAdmin + local pass=clusterAdmin123456 + local 'script=sh.enableSharding("myApp"); sh.shardCollection("myApp.sharded", {k: "hashed"})' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://clusterAdmin:clusterAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'sh.enableSharding("myApp"); sh.shardCollection("myApp.sharded", {k: "hashed"})' ++ mktemp + local LAST_OUT=/tmp/tmp.wLHwKxmpZf ++ mktemp + local LAST_ERR=/tmp/tmp.w2IsfiTXmP + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://clusterAdmin:clusterAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'sh.enableSharding("myApp"); sh.shardCollection("myApp.sharded", {k: "hashed"})') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://clusterAdmin:clusterAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://clusterAdmin:clusterAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ sh.enableSharding("myApp"); sh.shardCollection("myApp.sharded", {k: "hashed"}) == \- ]] + [[ sh.enableSharding("myApp"); sh.shardCollection("myApp.sharded", {k: "hashed"}) =~ ^(-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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://clusterAdmin:clusterAdmin123456@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'sh.enableSharding("myApp"); sh.shardCollection("myApp.sharded", {k: "hashed"})' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.wLHwKxmpZf { collectionsharded: 'myApp.sharded', ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1795413640, i: 320 }), signature: { hash: Binary.createFromBase64('8whf4cPCMSS/8aZb8Wr3vby1HWM=', 0), keyId: Long('7711241569512194056') } }, operationTime: Timestamp({ t: 1795413640, i: 319 }) } + cat /tmp/tmp.w2IsfiTXmP + rm /tmp/tmp.wLHwKxmpZf /tmp/tmp.w2IsfiTXmP + return 0 + mongosh_on_mongos source-cluster myApp myPass 'const docs = []; for (let i = 0; i < 300; i++) { docs.push({k: i, payload: "payload-" + i}) }; db.getSiblingDB("myApp").sharded.insertMany(docs)' + local cluster=source-cluster + local user=myApp + local pass=myPass + local 'script=const docs = []; for (let i = 0; i < 300; i++) { docs.push({k: i, payload: "payload-" + i}) }; db.getSiblingDB("myApp").sharded.insertMany(docs)' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'const docs = []; for (let i = 0; i < 300; i++) { docs.push({k: i, payload: "payload-" + i}) }; db.getSiblingDB("myApp").sharded.insertMany(docs)' ++ mktemp + local LAST_OUT=/tmp/tmp.7d6uTrIbuU ++ mktemp + local LAST_ERR=/tmp/tmp.ZIumdgUTDM + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'const docs = []; for (let i = 0; i < 300; i++) { docs.push({k: i, payload: "payload-" + i}) }; db.getSiblingDB("myApp").sharded.insertMany(docs)') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ const docs = []; for (let i = 0; i < 300; i++) { docs.push({k: i, payload: "payload-" + i}) }; db.getSiblingDB("myApp").sharded.insertMany(docs) == \- ]] + [[ const docs = []; for (let i = 0; i < 300; i++) { docs.push({k: i, payload: "payload-" + i}) }; db.getSiblingDB("myApp").sharded.insertMany(docs) =~ ^(-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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'const docs = []; for (let i = 0; i < 300; i++) { docs.push({k: i, payload: "payload-" + i}) }; db.getSiblingDB("myApp").sharded.insertMany(docs)' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.7d6uTrIbuU { acknowledged: true, insertedIds: { '0': ObjectId('6b03d68fafe170fca7258f3c'), '1': ObjectId('6b03d68fafe170fca7258f3d'), '2': ObjectId('6b03d68fafe170fca7258f3e'), '3': ObjectId('6b03d68fafe170fca7258f3f'), '4': ObjectId('6b03d68fafe170fca7258f40'), '5': ObjectId('6b03d68fafe170fca7258f41'), '6': ObjectId('6b03d68fafe170fca7258f42'), '7': ObjectId('6b03d68fafe170fca7258f43'), '8': ObjectId('6b03d68fafe170fca7258f44'), '9': ObjectId('6b03d68fafe170fca7258f45'), '10': ObjectId('6b03d68fafe170fca7258f46'), '11': ObjectId('6b03d68fafe170fca7258f47'), '12': ObjectId('6b03d68fafe170fca7258f48'), '13': ObjectId('6b03d68fafe170fca7258f49'), '14': ObjectId('6b03d68fafe170fca7258f4a'), '15': ObjectId('6b03d68fafe170fca7258f4b'), '16': ObjectId('6b03d68fafe170fca7258f4c'), '17': ObjectId('6b03d68fafe170fca7258f4d'), '18': ObjectId('6b03d68fafe170fca7258f4e'), '19': ObjectId('6b03d68fafe170fca7258f4f'), '20': ObjectId('6b03d68fafe170fca7258f50'), '21': ObjectId('6b03d68fafe170fca7258f51'), '22': ObjectId('6b03d68fafe170fca7258f52'), '23': ObjectId('6b03d68fafe170fca7258f53'), '24': ObjectId('6b03d68fafe170fca7258f54'), '25': ObjectId('6b03d68fafe170fca7258f55'), '26': ObjectId('6b03d68fafe170fca7258f56'), '27': ObjectId('6b03d68fafe170fca7258f57'), '28': ObjectId('6b03d68fafe170fca7258f58'), '29': ObjectId('6b03d68fafe170fca7258f59'), '30': ObjectId('6b03d68fafe170fca7258f5a'), '31': ObjectId('6b03d68fafe170fca7258f5b'), '32': ObjectId('6b03d68fafe170fca7258f5c'), '33': ObjectId('6b03d68fafe170fca7258f5d'), '34': ObjectId('6b03d68fafe170fca7258f5e'), '35': ObjectId('6b03d68fafe170fca7258f5f'), '36': ObjectId('6b03d68fafe170fca7258f60'), '37': ObjectId('6b03d68fafe170fca7258f61'), '38': ObjectId('6b03d68fafe170fca7258f62'), '39': ObjectId('6b03d68fafe170fca7258f63'), '40': ObjectId('6b03d68fafe170fca7258f64'), '41': ObjectId('6b03d68fafe170fca7258f65'), '42': ObjectId('6b03d68fafe170fca7258f66'), '43': ObjectId('6b03d68fafe170fca7258f67'), '44': ObjectId('6b03d68fafe170fca7258f68'), '45': ObjectId('6b03d68fafe170fca7258f69'), '46': ObjectId('6b03d68fafe170fca7258f6a'), '47': ObjectId('6b03d68fafe170fca7258f6b'), '48': ObjectId('6b03d68fafe170fca7258f6c'), '49': ObjectId('6b03d68fafe170fca7258f6d'), '50': ObjectId('6b03d68fafe170fca7258f6e'), '51': ObjectId('6b03d68fafe170fca7258f6f'), '52': ObjectId('6b03d68fafe170fca7258f70'), '53': ObjectId('6b03d68fafe170fca7258f71'), '54': ObjectId('6b03d68fafe170fca7258f72'), '55': ObjectId('6b03d68fafe170fca7258f73'), '56': ObjectId('6b03d68fafe170fca7258f74'), '57': ObjectId('6b03d68fafe170fca7258f75'), '58': ObjectId('6b03d68fafe170fca7258f76'), '59': ObjectId('6b03d68fafe170fca7258f77'), '60': ObjectId('6b03d68fafe170fca7258f78'), '61': ObjectId('6b03d68fafe170fca7258f79'), '62': ObjectId('6b03d68fafe170fca7258f7a'), '63': ObjectId('6b03d68fafe170fca7258f7b'), '64': ObjectId('6b03d68fafe170fca7258f7c'), '65': ObjectId('6b03d68fafe170fca7258f7d'), '66': ObjectId('6b03d68fafe170fca7258f7e'), '67': ObjectId('6b03d68fafe170fca7258f7f'), '68': ObjectId('6b03d68fafe170fca7258f80'), '69': ObjectId('6b03d68fafe170fca7258f81'), '70': ObjectId('6b03d68fafe170fca7258f82'), '71': ObjectId('6b03d68fafe170fca7258f83'), '72': ObjectId('6b03d68fafe170fca7258f84'), '73': ObjectId('6b03d68fafe170fca7258f85'), '74': ObjectId('6b03d68fafe170fca7258f86'), '75': ObjectId('6b03d68fafe170fca7258f87'), '76': ObjectId('6b03d68fafe170fca7258f88'), '77': ObjectId('6b03d68fafe170fca7258f89'), '78': ObjectId('6b03d68fafe170fca7258f8a'), '79': ObjectId('6b03d68fafe170fca7258f8b'), '80': ObjectId('6b03d68fafe170fca7258f8c'), '81': ObjectId('6b03d68fafe170fca7258f8d'), '82': ObjectId('6b03d68fafe170fca7258f8e'), '83': ObjectId('6b03d68fafe170fca7258f8f'), '84': ObjectId('6b03d68fafe170fca7258f90'), '85': ObjectId('6b03d68fafe170fca7258f91'), '86': ObjectId('6b03d68fafe170fca7258f92'), '87': ObjectId('6b03d68fafe170fca7258f93'), '88': ObjectId('6b03d68fafe170fca7258f94'), '89': ObjectId('6b03d68fafe170fca7258f95'), '90': ObjectId('6b03d68fafe170fca7258f96'), '91': ObjectId('6b03d68fafe170fca7258f97'), '92': ObjectId('6b03d68fafe170fca7258f98'), '93': ObjectId('6b03d68fafe170fca7258f99'), '94': ObjectId('6b03d68fafe170fca7258f9a'), '95': ObjectId('6b03d68fafe170fca7258f9b'), '96': ObjectId('6b03d68fafe170fca7258f9c'), '97': ObjectId('6b03d68fafe170fca7258f9d'), '98': ObjectId('6b03d68fafe170fca7258f9e'), '99': ObjectId('6b03d68fafe170fca7258f9f'), '100': ObjectId('6b03d68fafe170fca7258fa0'), '101': ObjectId('6b03d68fafe170fca7258fa1'), '102': ObjectId('6b03d68fafe170fca7258fa2'), '103': ObjectId('6b03d68fafe170fca7258fa3'), '104': ObjectId('6b03d68fafe170fca7258fa4'), '105': ObjectId('6b03d68fafe170fca7258fa5'), '106': ObjectId('6b03d68fafe170fca7258fa6'), '107': ObjectId('6b03d68fafe170fca7258fa7'), '108': ObjectId('6b03d68fafe170fca7258fa8'), '109': ObjectId('6b03d68fafe170fca7258fa9'), '110': ObjectId('6b03d68fafe170fca7258faa'), '111': ObjectId('6b03d68fafe170fca7258fab'), '112': ObjectId('6b03d68fafe170fca7258fac'), '113': ObjectId('6b03d68fafe170fca7258fad'), '114': ObjectId('6b03d68fafe170fca7258fae'), '115': ObjectId('6b03d68fafe170fca7258faf'), '116': ObjectId('6b03d68fafe170fca7258fb0'), '117': ObjectId('6b03d68fafe170fca7258fb1'), '118': ObjectId('6b03d68fafe170fca7258fb2'), '119': ObjectId('6b03d68fafe170fca7258fb3'), '120': ObjectId('6b03d68fafe170fca7258fb4'), '121': ObjectId('6b03d68fafe170fca7258fb5'), '122': ObjectId('6b03d68fafe170fca7258fb6'), '123': ObjectId('6b03d68fafe170fca7258fb7'), '124': ObjectId('6b03d68fafe170fca7258fb8'), '125': ObjectId('6b03d68fafe170fca7258fb9'), '126': ObjectId('6b03d68fafe170fca7258fba'), '127': ObjectId('6b03d68fafe170fca7258fbb'), '128': ObjectId('6b03d68fafe170fca7258fbc'), '129': ObjectId('6b03d68fafe170fca7258fbd'), '130': ObjectId('6b03d68fafe170fca7258fbe'), '131': ObjectId('6b03d68fafe170fca7258fbf'), '132': ObjectId('6b03d68fafe170fca7258fc0'), '133': ObjectId('6b03d68fafe170fca7258fc1'), '134': ObjectId('6b03d68fafe170fca7258fc2'), '135': ObjectId('6b03d68fafe170fca7258fc3'), '136': ObjectId('6b03d68fafe170fca7258fc4'), '137': ObjectId('6b03d68fafe170fca7258fc5'), '138': ObjectId('6b03d68fafe170fca7258fc6'), '139': ObjectId('6b03d68fafe170fca7258fc7'), '140': ObjectId('6b03d68fafe170fca7258fc8'), '141': ObjectId('6b03d68fafe170fca7258fc9'), '142': ObjectId('6b03d68fafe170fca7258fca'), '143': ObjectId('6b03d68fafe170fca7258fcb'), '144': ObjectId('6b03d68fafe170fca7258fcc'), '145': ObjectId('6b03d68fafe170fca7258fcd'), '146': ObjectId('6b03d68fafe170fca7258fce'), '147': ObjectId('6b03d68fafe170fca7258fcf'), '148': ObjectId('6b03d68fafe170fca7258fd0'), '149': ObjectId('6b03d68fafe170fca7258fd1'), '150': ObjectId('6b03d68fafe170fca7258fd2'), '151': ObjectId('6b03d68fafe170fca7258fd3'), '152': ObjectId('6b03d68fafe170fca7258fd4'), '153': ObjectId('6b03d68fafe170fca7258fd5'), '154': ObjectId('6b03d68fafe170fca7258fd6'), '155': ObjectId('6b03d68fafe170fca7258fd7'), '156': ObjectId('6b03d68fafe170fca7258fd8'), '157': ObjectId('6b03d68fafe170fca7258fd9'), '158': ObjectId('6b03d68fafe170fca7258fda'), '159': ObjectId('6b03d68fafe170fca7258fdb'), '160': ObjectId('6b03d68fafe170fca7258fdc'), '161': ObjectId('6b03d68fafe170fca7258fdd'), '162': ObjectId('6b03d68fafe170fca7258fde'), '163': ObjectId('6b03d68fafe170fca7258fdf'), '164': ObjectId('6b03d68fafe170fca7258fe0'), '165': ObjectId('6b03d68fafe170fca7258fe1'), '166': ObjectId('6b03d68fafe170fca7258fe2'), '167': ObjectId('6b03d68fafe170fca7258fe3'), '168': ObjectId('6b03d68fafe170fca7258fe4'), '169': ObjectId('6b03d68fafe170fca7258fe5'), '170': ObjectId('6b03d68fafe170fca7258fe6'), '171': ObjectId('6b03d68fafe170fca7258fe7'), '172': ObjectId('6b03d68fafe170fca7258fe8'), '173': ObjectId('6b03d68fafe170fca7258fe9'), '174': ObjectId('6b03d68fafe170fca7258fea'), '175': ObjectId('6b03d68fafe170fca7258feb'), '176': ObjectId('6b03d68fafe170fca7258fec'), '177': ObjectId('6b03d68fafe170fca7258fed'), '178': ObjectId('6b03d68fafe170fca7258fee'), '179': ObjectId('6b03d68fafe170fca7258fef'), '180': ObjectId('6b03d68fafe170fca7258ff0'), '181': ObjectId('6b03d68fafe170fca7258ff1'), '182': ObjectId('6b03d68fafe170fca7258ff2'), '183': ObjectId('6b03d68fafe170fca7258ff3'), '184': ObjectId('6b03d68fafe170fca7258ff4'), '185': ObjectId('6b03d68fafe170fca7258ff5'), '186': ObjectId('6b03d68fafe170fca7258ff6'), '187': ObjectId('6b03d68fafe170fca7258ff7'), '188': ObjectId('6b03d68fafe170fca7258ff8'), '189': ObjectId('6b03d68fafe170fca7258ff9'), '190': ObjectId('6b03d68fafe170fca7258ffa'), '191': ObjectId('6b03d68fafe170fca7258ffb'), '192': ObjectId('6b03d68fafe170fca7258ffc'), '193': ObjectId('6b03d68fafe170fca7258ffd'), '194': ObjectId('6b03d68fafe170fca7258ffe'), '195': ObjectId('6b03d68fafe170fca7258fff'), '196': ObjectId('6b03d68fafe170fca7259000'), '197': ObjectId('6b03d68fafe170fca7259001'), '198': ObjectId('6b03d68fafe170fca7259002'), '199': ObjectId('6b03d68fafe170fca7259003'), '200': ObjectId('6b03d68fafe170fca7259004'), '201': ObjectId('6b03d68fafe170fca7259005'), '202': ObjectId('6b03d68fafe170fca7259006'), '203': ObjectId('6b03d68fafe170fca7259007'), '204': ObjectId('6b03d68fafe170fca7259008'), '205': ObjectId('6b03d68fafe170fca7259009'), '206': ObjectId('6b03d68fafe170fca725900a'), '207': ObjectId('6b03d68fafe170fca725900b'), '208': ObjectId('6b03d68fafe170fca725900c'), '209': ObjectId('6b03d68fafe170fca725900d'), '210': ObjectId('6b03d68fafe170fca725900e'), '211': ObjectId('6b03d68fafe170fca725900f'), '212': ObjectId('6b03d68fafe170fca7259010'), '213': ObjectId('6b03d68fafe170fca7259011'), '214': ObjectId('6b03d68fafe170fca7259012'), '215': ObjectId('6b03d68fafe170fca7259013'), '216': ObjectId('6b03d68fafe170fca7259014'), '217': ObjectId('6b03d68fafe170fca7259015'), '218': ObjectId('6b03d68fafe170fca7259016'), '219': ObjectId('6b03d68fafe170fca7259017'), '220': ObjectId('6b03d68fafe170fca7259018'), '221': ObjectId('6b03d68fafe170fca7259019'), '222': ObjectId('6b03d68fafe170fca725901a'), '223': ObjectId('6b03d68fafe170fca725901b'), '224': ObjectId('6b03d68fafe170fca725901c'), '225': ObjectId('6b03d68fafe170fca725901d'), '226': ObjectId('6b03d68fafe170fca725901e'), '227': ObjectId('6b03d68fafe170fca725901f'), '228': ObjectId('6b03d68fafe170fca7259020'), '229': ObjectId('6b03d68fafe170fca7259021'), '230': ObjectId('6b03d68fafe170fca7259022'), '231': ObjectId('6b03d68fafe170fca7259023'), '232': ObjectId('6b03d68fafe170fca7259024'), '233': ObjectId('6b03d68fafe170fca7259025'), '234': ObjectId('6b03d68fafe170fca7259026'), '235': ObjectId('6b03d68fafe170fca7259027'), '236': ObjectId('6b03d68fafe170fca7259028'), '237': ObjectId('6b03d68fafe170fca7259029'), '238': ObjectId('6b03d68fafe170fca725902a'), '239': ObjectId('6b03d68fafe170fca725902b'), '240': ObjectId('6b03d68fafe170fca725902c'), '241': ObjectId('6b03d68fafe170fca725902d'), '242': ObjectId('6b03d68fafe170fca725902e'), '243': ObjectId('6b03d68fafe170fca725902f'), '244': ObjectId('6b03d68fafe170fca7259030'), '245': ObjectId('6b03d68fafe170fca7259031'), '246': ObjectId('6b03d68fafe170fca7259032'), '247': ObjectId('6b03d68fafe170fca7259033'), '248': ObjectId('6b03d68fafe170fca7259034'), '249': ObjectId('6b03d68fafe170fca7259035'), '250': ObjectId('6b03d68fafe170fca7259036'), '251': ObjectId('6b03d68fafe170fca7259037'), '252': ObjectId('6b03d68fafe170fca7259038'), '253': ObjectId('6b03d68fafe170fca7259039'), '254': ObjectId('6b03d68fafe170fca725903a'), '255': ObjectId('6b03d68fafe170fca725903b'), '256': ObjectId('6b03d68fafe170fca725903c'), '257': ObjectId('6b03d68fafe170fca725903d'), '258': ObjectId('6b03d68fafe170fca725903e'), '259': ObjectId('6b03d68fafe170fca725903f'), '260': ObjectId('6b03d68fafe170fca7259040'), '261': ObjectId('6b03d68fafe170fca7259041'), '262': ObjectId('6b03d68fafe170fca7259042'), '263': ObjectId('6b03d68fafe170fca7259043'), '264': ObjectId('6b03d68fafe170fca7259044'), '265': ObjectId('6b03d68fafe170fca7259045'), '266': ObjectId('6b03d68fafe170fca7259046'), '267': ObjectId('6b03d68fafe170fca7259047'), '268': ObjectId('6b03d68fafe170fca7259048'), '269': ObjectId('6b03d68fafe170fca7259049'), '270': ObjectId('6b03d68fafe170fca725904a'), '271': ObjectId('6b03d68fafe170fca725904b'), '272': ObjectId('6b03d68fafe170fca725904c'), '273': ObjectId('6b03d68fafe170fca725904d'), '274': ObjectId('6b03d68fafe170fca725904e'), '275': ObjectId('6b03d68fafe170fca725904f'), '276': ObjectId('6b03d68fafe170fca7259050'), '277': ObjectId('6b03d68fafe170fca7259051'), '278': ObjectId('6b03d68fafe170fca7259052'), '279': ObjectId('6b03d68fafe170fca7259053'), '280': ObjectId('6b03d68fafe170fca7259054'), '281': ObjectId('6b03d68fafe170fca7259055'), '282': ObjectId('6b03d68fafe170fca7259056'), '283': ObjectId('6b03d68fafe170fca7259057'), '284': ObjectId('6b03d68fafe170fca7259058'), '285': ObjectId('6b03d68fafe170fca7259059'), '286': ObjectId('6b03d68fafe170fca725905a'), '287': ObjectId('6b03d68fafe170fca725905b'), '288': ObjectId('6b03d68fafe170fca725905c'), '289': ObjectId('6b03d68fafe170fca725905d'), '290': ObjectId('6b03d68fafe170fca725905e'), '291': ObjectId('6b03d68fafe170fca725905f'), '292': ObjectId('6b03d68fafe170fca7259060'), '293': ObjectId('6b03d68fafe170fca7259061'), '294': ObjectId('6b03d68fafe170fca7259062'), '295': ObjectId('6b03d68fafe170fca7259063'), '296': ObjectId('6b03d68fafe170fca7259064'), '297': ObjectId('6b03d68fafe170fca7259065'), '298': ObjectId('6b03d68fafe170fca7259066'), '299': ObjectId('6b03d68fafe170fca7259067') } } + cat /tmp/tmp.ZIumdgUTDM + rm /tmp/tmp.7d6uTrIbuU /tmp/tmp.ZIumdgUTDM + return 0 + desc 'wait for backup-agent on target-cluster' + set +o xtrace ----------------------------------------------------------------------------------- wait for backup-agent on target-cluster ----------------------------------------------------------------------------------- + wait_backup_agent target-cluster-rs0-0 + local agent_pod=target-cluster-rs0-0 + set +o xtrace waiting for pbm-agent to be ready in target-cluster-rs0-0...2026-11-23T05:58:14.000+0000 I listening for the commands + wait_backup_agent target-cluster-rs1-0 + local agent_pod=target-cluster-rs1-0 + set +o xtrace waiting for pbm-agent to be ready in target-cluster-rs1-0...2026-11-23T05:58:15.000+0000 I listening for the commands + wait_backup_agent target-cluster-cfg-0 + local agent_pod=target-cluster-cfg-0 + set +o xtrace waiting for pbm-agent to be ready in target-cluster-cfg-0...2026-11-23T05:57:08.000+0000 I listening for the commands + desc 'take a backup of target before clustersync starts (used for restore lease tests)' + set +o xtrace ----------------------------------------------------------------------------------- take a backup of target before clustersync starts (used for restore lease tests) ----------------------------------------------------------------------------------- + apply_backup_named initial-backup + local name=initial-backup + yq eval '.metadata.name = "initial-backup"' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/backup-local-s3.yml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.aWb0u6wk1H ++ mktemp + local LAST_ERR=/tmp/tmp.4QOM3MMHjb + 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.xvLKVcxt04 + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.xvLKVcxt04 + 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.xvLKVcxt04 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.aWb0u6wk1H perconaservermongodbbackup.psmdb.percona.com/initial-backup created + cat /tmp/tmp.4QOM3MMHjb + rm /tmp/tmp.aWb0u6wk1H /tmp/tmp.4QOM3MMHjb /tmp/tmp.xvLKVcxt04 + return 0 + wait_backup initial-backup ready + local backup_name=initial-backup + local target_state=ready + set +o xtrace waiting for initial-backup to reach ready state..................OK + desc 'apply ClusterSync CR with mode=running' + set +o xtrace ----------------------------------------------------------------------------------- apply ClusterSync CR with mode=running ----------------------------------------------------------------------------------- + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/clustersync.yml + /usr/sbin/sed -e 's|CLUSTERSYNC_IMAGE|docker.io/percona/percona-clustersync-mongodb:1.0.0|g' -e 's|NAME_SPACE|clustersync-18090|g' + add_arch_to_clustersync - + kubectl_bin apply -f - + arch_scheduling_enabled + [[ -n '' ]] + cat - ++ mktemp + return + local LAST_OUT=/tmp/tmp.PYawBJ9wE4 ++ mktemp + local LAST_ERR=/tmp/tmp.YAqYmhqmEF + 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.3ymtIqVEKN + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.3ymtIqVEKN + 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.3ymtIqVEKN + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.PYawBJ9wE4 perconaservermongodbclustersync.psmdb.percona.com/sync created + cat /tmp/tmp.YAqYmhqmEF + rm /tmp/tmp.PYawBJ9wE4 /tmp/tmp.YAqYmhqmEF /tmp/tmp.3ymtIqVEKN + return 0 + desc 'wait for PCSM deployment to become available' + set +o xtrace ----------------------------------------------------------------------------------- wait for PCSM deployment to become available ----------------------------------------------------------------------------------- + kubectl_bin wait --for=condition=Available --timeout=5m deployment/sync-pcsm ++ mktemp + local LAST_OUT=/tmp/tmp.gfybkCLY39 ++ mktemp + local LAST_ERR=/tmp/tmp.6Eo5jClWkY + local exit_status=0 + local timeout=4 + local i + args=('wait' '--for=condition=Available' '--timeout=5m' 'deployment/sync-pcsm') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ wait == \- ]] + [[ wait =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --for=condition=Available == \- ]] + [[ --for=condition=Available =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --timeout=5m == \- ]] + [[ --timeout=5m =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ deployment/sync-pcsm == \- ]] + [[ deployment/sync-pcsm =~ ^(-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=condition=Available --timeout=5m deployment/sync-pcsm + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.gfybkCLY39 deployment.apps/sync-pcsm condition met + cat /tmp/tmp.6Eo5jClWkY + rm /tmp/tmp.gfybkCLY39 /tmp/tmp.6Eo5jClWkY + return 0 + desc 'wait for PCSM state=running after initial sync' + set +o xtrace ----------------------------------------------------------------------------------- wait for PCSM state=running after initial sync ----------------------------------------------------------------------------------- + wait_pcsm_state running 600 + local expected=running + local timeout=600 + set +o xtrace waiting for pcsm state=running ok (state=running) + return 0 + desc 'verify initial data is replicated to target-cluster' + set +o xtrace ----------------------------------------------------------------------------------- verify initial data is replicated to target-cluster ----------------------------------------------------------------------------------- + wait_target_doc_count 1 300 + sleep 10 + local expected=1 + local timeout=300 + local collection=test + set +o xtrace waiting for target myApp.test count=1 ok (count=1) + return 0 + desc 'verify myApp.sharded is sharded on target-cluster with chunks on both shards' + set +o xtrace ----------------------------------------------------------------------------------- verify myApp.sharded is sharded on target-cluster with chunks on both shards ----------------------------------------------------------------------------------- + wait_target_doc_count 300 600 sharded + sleep 10 + local expected=300 + local timeout=600 + local collection=sharded + set +o xtrace waiting for target myApp.sharded count=300 ok (count=300) + return 0 + assert_target_shard_key '{"k":"hashed"}' + local 'expected={"k":"hashed"}' + set +o xtrace target myApp.sharded shard key ok ({"k":"hashed"}) + wait_target_chunks_spread 2 300 + local min_shards=2 + local timeout=300 + set +o xtrace waiting for myApp.sharded chunks on >=2 shards of target-cluster ok (["rs0","rs1"]) + return 0 + desc 'write data to source, verify it replicates' + set +o xtrace ----------------------------------------------------------------------------------- write data to source, verify it replicates ----------------------------------------------------------------------------------- + mongosh_on_mongos source-cluster myApp myPass 'db.getSiblingDB("myApp").test.insertOne({x: 100501})' + local cluster=source-cluster + local user=myApp + local pass=myPass + local 'script=db.getSiblingDB("myApp").test.insertOne({x: 100501})' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100501})' ++ mktemp + local LAST_OUT=/tmp/tmp.PB3Ri2nQyX ++ mktemp + local LAST_ERR=/tmp/tmp.ZJYQJotrcW + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'db.getSiblingDB("myApp").test.insertOne({x: 100501})') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ db.getSiblingDB("myApp").test.insertOne({x: 100501}) == \- ]] + [[ db.getSiblingDB("myApp").test.insertOne({x: 100501}) =~ ^(-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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100501})' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.PB3Ri2nQyX { acknowledged: true, insertedId: ObjectId('6b03d709d633197e4642989d') } + cat /tmp/tmp.ZJYQJotrcW + rm /tmp/tmp.PB3Ri2nQyX /tmp/tmp.ZJYQJotrcW + return 0 + wait_target_doc_count 2 180 + sleep 10 + local expected=2 + local timeout=180 + local collection=test + set +o xtrace waiting for target myApp.test count=2 ok (count=2) + return 0 + desc 'write more data to source, verify it replicates' + set +o xtrace ----------------------------------------------------------------------------------- write more data to source, verify it replicates ----------------------------------------------------------------------------------- + mongosh_on_mongos source-cluster myApp myPass 'db.getSiblingDB("myApp").test.insertOne({x: 100502})' + local cluster=source-cluster + local user=myApp + local pass=myPass + local 'script=db.getSiblingDB("myApp").test.insertOne({x: 100502})' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100502})' ++ mktemp + local LAST_OUT=/tmp/tmp.8yMlxHe5ll ++ mktemp + local LAST_ERR=/tmp/tmp.XUVVdqfCta + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'db.getSiblingDB("myApp").test.insertOne({x: 100502})') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ db.getSiblingDB("myApp").test.insertOne({x: 100502}) == \- ]] + [[ db.getSiblingDB("myApp").test.insertOne({x: 100502}) =~ ^(-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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100502})' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.8yMlxHe5ll { acknowledged: true, insertedId: ObjectId('6b03d723a71742cc5367cd10') } + cat /tmp/tmp.XUVVdqfCta + rm /tmp/tmp.8yMlxHe5ll /tmp/tmp.XUVVdqfCta + return 0 + wait_target_doc_count 3 180 + sleep 10 + local expected=3 + local timeout=180 + local collection=test + set +o xtrace waiting for target myApp.test count=3 ok (count=3) + return 0 + desc 'transition: running -> paused' + set +o xtrace ----------------------------------------------------------------------------------- transition: running -> paused ----------------------------------------------------------------------------------- + patch_sync_mode paused + local mode=paused + desc 'patch sync mode=paused' + set +o xtrace ----------------------------------------------------------------------------------- patch sync mode=paused ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb-clustersync sync --type=merge -p '{"spec":{"mode":"paused"}}' ++ mktemp + local LAST_OUT=/tmp/tmp.2cmcvIwQwb ++ mktemp + local LAST_ERR=/tmp/tmp.Fm2prycbhL + local exit_status=0 + local timeout=4 + local i + args=('patch' 'psmdb-clustersync' 'sync' '--type=merge' '-p' '{"spec":{"mode":"paused"}}') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ patch == \- ]] + [[ patch =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-clustersync == \- ]] + [[ psmdb-clustersync =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ sync == \- ]] + [[ sync =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --type=merge == \- ]] + [[ --type=merge =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -p == \- ]] + [[ -p =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ {"spec":{"mode":"paused"}} == \- ]] + [[ {"spec":{"mode":"paused"}} =~ ^(-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-clustersync sync --type=merge -p '{"spec":{"mode":"paused"}}' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.2cmcvIwQwb perconaservermongodbclustersync.psmdb.percona.com/sync patched + cat /tmp/tmp.Fm2prycbhL + rm /tmp/tmp.2cmcvIwQwb /tmp/tmp.Fm2prycbhL + return 0 + wait_pcsm_state paused 180 + local expected=paused + local timeout=180 + set +o xtrace waiting for pcsm state=paused ok (state=paused) + return 0 + wait_cr_status_state paused 120 + local expected=paused + local timeout=120 + set +o xtrace waiting for psmdb-clustersync/sync status.state=paused ok + return 0 + desc 'write data while paused, verify that target still has old data count' + set +o xtrace ----------------------------------------------------------------------------------- write data while paused, verify that target still has old data count ----------------------------------------------------------------------------------- + mongosh_on_mongos source-cluster myApp myPass 'db.getSiblingDB("myApp").test.insertOne({x: 100503})' + local cluster=source-cluster + local user=myApp + local pass=myPass + local 'script=db.getSiblingDB("myApp").test.insertOne({x: 100503})' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100503})' ++ mktemp + local LAST_OUT=/tmp/tmp.LmksghY1ze ++ mktemp + local LAST_ERR=/tmp/tmp.fmcwmvIxUE + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'db.getSiblingDB("myApp").test.insertOne({x: 100503})') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ db.getSiblingDB("myApp").test.insertOne({x: 100503}) == \- ]] + [[ db.getSiblingDB("myApp").test.insertOne({x: 100503}) =~ ^(-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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100503})' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.LmksghY1ze { acknowledged: true, insertedId: ObjectId('6b03d7426a19a76ce5876e90') } + cat /tmp/tmp.fmcwmvIxUE + rm /tmp/tmp.LmksghY1ze /tmp/tmp.fmcwmvIxUE + return 0 + wait_target_doc_count 3 180 + sleep 10 + local expected=3 + local timeout=180 + local collection=test + set +o xtrace waiting for target myApp.test count=3 ok (count=3) + return 0 + desc 'transition: paused -> running' + set +o xtrace ----------------------------------------------------------------------------------- transition: paused -> running ----------------------------------------------------------------------------------- + patch_sync_mode running + local mode=running + desc 'patch sync mode=running' + set +o xtrace ----------------------------------------------------------------------------------- patch sync mode=running ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb-clustersync sync --type=merge -p '{"spec":{"mode":"running"}}' ++ mktemp + local LAST_OUT=/tmp/tmp.Bz5uOLByHD ++ mktemp + local LAST_ERR=/tmp/tmp.0r7M6qOvMm + local exit_status=0 + local timeout=4 + local i + args=('patch' 'psmdb-clustersync' 'sync' '--type=merge' '-p' '{"spec":{"mode":"running"}}') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ patch == \- ]] + [[ patch =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-clustersync == \- ]] + [[ psmdb-clustersync =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ sync == \- ]] + [[ sync =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --type=merge == \- ]] + [[ --type=merge =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -p == \- ]] + [[ -p =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ {"spec":{"mode":"running"}} == \- ]] + [[ {"spec":{"mode":"running"}} =~ ^(-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-clustersync sync --type=merge -p '{"spec":{"mode":"running"}}' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.Bz5uOLByHD perconaservermongodbclustersync.psmdb.percona.com/sync patched + cat /tmp/tmp.0r7M6qOvMm + rm /tmp/tmp.Bz5uOLByHD /tmp/tmp.0r7M6qOvMm + return 0 + wait_pcsm_state running 300 + local expected=running + local timeout=300 + set +o xtrace waiting for pcsm state=running ok (state=running) + return 0 + wait_cr_status_state running 120 + local expected=running + local timeout=120 + set +o xtrace waiting for psmdb-clustersync/sync status.state=running ok + return 0 + desc 'write data while running, verify replication and existence of data written when sync was paused' + set +o xtrace ----------------------------------------------------------------------------------- write data while running, verify replication and existence of data written when sync was paused ----------------------------------------------------------------------------------- + mongosh_on_mongos source-cluster myApp myPass 'db.getSiblingDB("myApp").test.insertOne({x: 100504})' + local cluster=source-cluster + local user=myApp + local pass=myPass + local 'script=db.getSiblingDB("myApp").test.insertOne({x: 100504})' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100504})' ++ mktemp + local LAST_OUT=/tmp/tmp.uzVfNE8M7Y ++ mktemp + local LAST_ERR=/tmp/tmp.YgQZq0i44M + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'db.getSiblingDB("myApp").test.insertOne({x: 100504})') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ db.getSiblingDB("myApp").test.insertOne({x: 100504}) == \- ]] + [[ db.getSiblingDB("myApp").test.insertOne({x: 100504}) =~ ^(-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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100504})' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.uzVfNE8M7Y { acknowledged: true, insertedId: ObjectId('6b03d760d2a361061f136648') } + cat /tmp/tmp.YgQZq0i44M + rm /tmp/tmp.uzVfNE8M7Y /tmp/tmp.YgQZq0i44M + return 0 + wait_target_doc_count 5 180 + sleep 10 + local expected=5 + local timeout=180 + local collection=test + set +o xtrace waiting for target myApp.test count=5 ok (count=5) + return 0 + desc 'HA: scale PCSM to 3 instances' + set +o xtrace ----------------------------------------------------------------------------------- HA: scale PCSM to 3 instances ----------------------------------------------------------------------------------- ++ active_instance ++ kubectl_bin get psmdb-clustersync sync -o 'jsonpath={.status.activeInstance}' + active_before_scale=sync-pcsm-6d6d69bf5c-vm6xm + kubectl_bin patch psmdb-clustersync sync --type=merge -p '{"spec":{"size":3}}' ++ mktemp + local LAST_OUT=/tmp/tmp.07myXPAxkV ++ mktemp + local LAST_ERR=/tmp/tmp.KrzoJihxov + local exit_status=0 + local timeout=4 + local i + args=('patch' 'psmdb-clustersync' 'sync' '--type=merge' '-p' '{"spec":{"size":3}}') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ patch == \- ]] + [[ patch =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-clustersync == \- ]] + [[ psmdb-clustersync =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ sync == \- ]] + [[ sync =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --type=merge == \- ]] + [[ --type=merge =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -p == \- ]] + [[ -p =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ {"spec":{"size":3}} == \- ]] + [[ {"spec":{"size":3}} =~ ^(-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-clustersync sync --type=merge -p '{"spec":{"size":3}}' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.07myXPAxkV perconaservermongodbclustersync.psmdb.percona.com/sync patched + cat /tmp/tmp.KrzoJihxov + rm /tmp/tmp.07myXPAxkV /tmp/tmp.KrzoJihxov + return 0 + wait_deployment_ready_replicas sync-pcsm 3 300 + local name=sync-pcsm + local expected=3 + local timeout=300 + set +o xtrace waiting for deployment/sync-pcsm readyReplicas=3... ok + return 0 + kubectl_bin get pdb sync-pcsm ++ mktemp + local LAST_OUT=/tmp/tmp.qFkaEoCE8c ++ mktemp + local LAST_ERR=/tmp/tmp.z3E9k6yVCY + local exit_status=0 + local timeout=4 + local i + args=('get' 'pdb' 'sync-pcsm') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ get == \- ]] + [[ get =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ pdb == \- ]] + [[ pdb =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ sync-pcsm == \- ]] + [[ sync-pcsm =~ ^(-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 pdb sync-pcsm + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.qFkaEoCE8c NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE sync-pcsm N/A 1 1 20s + cat /tmp/tmp.z3E9k6yVCY + rm /tmp/tmp.qFkaEoCE8c /tmp/tmp.z3E9k6yVCY + return 0 + desc 'HA: scaling up must not move the active instance' + set +o xtrace ----------------------------------------------------------------------------------- HA: scaling up must not move the active instance ----------------------------------------------------------------------------------- + [[ -n sync-pcsm-6d6d69bf5c-vm6xm ]] ++ active_instance ++ kubectl_bin get psmdb-clustersync sync -o 'jsonpath={.status.activeInstance}' + [[ sync-pcsm-6d6d69bf5c-vm6xm != sync\-pcsm\-6d6d69bf5c\-vm6xm ]] + desc 'HA: standby instances must become Ready and the CR must report an active instance' + set +o xtrace ----------------------------------------------------------------------------------- HA: standby instances must become Ready and the CR must report an active instance ----------------------------------------------------------------------------------- + wait_active_instance_present 300 + local timeout=300 + set +o xtrace waiting for sync status.activeInstance ok (sync-pcsm-6d6d69bf5c-vm6xm) + return 0 + wait_cr_status_state running 120 + local expected=running + local timeout=120 + set +o xtrace waiting for psmdb-clustersync/sync status.state=running ok + return 0 ++ active_instance ++ kubectl_bin get psmdb-clustersync sync -o 'jsonpath={.status.activeInstance}' + previous_active=sync-pcsm-6d6d69bf5c-vm6xm + echo 'active instance: sync-pcsm-6d6d69bf5c-vm6xm' active instance: sync-pcsm-6d6d69bf5c-vm6xm + desc 'HA: delete the active instance and verify the group fails over' + set +o xtrace ----------------------------------------------------------------------------------- HA: delete the active instance and verify the group fails over ----------------------------------------------------------------------------------- + kubectl_bin delete pod sync-pcsm-6d6d69bf5c-vm6xm --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.cXykefXOx7 ++ mktemp + local LAST_ERR=/tmp/tmp.d1cd7lp1cz + local exit_status=0 + local timeout=4 + local i + args=('delete' 'pod' 'sync-pcsm-6d6d69bf5c-vm6xm' '--wait=false') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ pod == \- ]] + [[ pod =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ sync-pcsm-6d6d69bf5c-vm6xm == \- ]] + [[ sync-pcsm-6d6d69bf5c-vm6xm =~ ^(-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 pod sync-pcsm-6d6d69bf5c-vm6xm --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.cXykefXOx7 pod "sync-pcsm-6d6d69bf5c-vm6xm" deleted from clustersync-18090 namespace + cat /tmp/tmp.d1cd7lp1cz + rm /tmp/tmp.cXykefXOx7 /tmp/tmp.d1cd7lp1cz + return 0 + wait_active_instance_changed sync-pcsm-6d6d69bf5c-vm6xm 300 + local previous=sync-pcsm-6d6d69bf5c-vm6xm + local timeout=300 + set +o xtrace waiting for active instance to move away from sync-pcsm-6d6d69bf5c-vm6xm.. ok (sync-pcsm-6d6d69bf5c-s7tqp) + return 0 + wait_deployment_ready_replicas sync-pcsm 3 300 + local name=sync-pcsm + local expected=3 + local timeout=300 + set +o xtrace waiting for deployment/sync-pcsm readyReplicas=3 ok + return 0 + wait_pcsm_state running 300 + local expected=running + local timeout=300 + set +o xtrace waiting for pcsm state=running ok (state=running) + return 0 + wait_cr_status_state running 120 + local expected=running + local timeout=120 + set +o xtrace waiting for psmdb-clustersync/sync status.state=running ok + return 0 + assert_event_present sync PCSMFailover + local name=sync + local reason=PCSMFailover + set +o xtrace event reason=PCSMFailover present on sync (count=1) + desc 'HA: writes keep replicating across the failover' + set +o xtrace ----------------------------------------------------------------------------------- HA: writes keep replicating across the failover ----------------------------------------------------------------------------------- + mongosh_on_mongos source-cluster myApp myPass 'db.getSiblingDB("myApp").test.insertOne({x: 100506})' + local cluster=source-cluster + local user=myApp + local pass=myPass + local 'script=db.getSiblingDB("myApp").test.insertOne({x: 100506})' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100506})' ++ mktemp + local LAST_OUT=/tmp/tmp.7DwBKOxH2R ++ mktemp + local LAST_ERR=/tmp/tmp.QGcSbTHyl0 + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'db.getSiblingDB("myApp").test.insertOne({x: 100506})') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ db.getSiblingDB("myApp").test.insertOne({x: 100506}) == \- ]] + [[ db.getSiblingDB("myApp").test.insertOne({x: 100506}) =~ ^(-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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100506})' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.7DwBKOxH2R { acknowledged: true, insertedId: ObjectId('6b03d7b99f0acbf27a4fa912') } + cat /tmp/tmp.QGcSbTHyl0 + rm /tmp/tmp.7DwBKOxH2R /tmp/tmp.QGcSbTHyl0 + return 0 + wait_target_doc_count 6 300 + sleep 10 + local expected=6 + local timeout=300 + local collection=test + set +o xtrace waiting for target myApp.test count=6 ok (count=6) + return 0 + desc 'HA: scale back to a single instance and verify the budget is removed' + set +o xtrace ----------------------------------------------------------------------------------- HA: scale back to a single instance and verify the budget is removed ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb-clustersync sync --type=merge -p '{"spec":{"size":1}}' ++ mktemp + local LAST_OUT=/tmp/tmp.3XVPdxgoi0 ++ mktemp + local LAST_ERR=/tmp/tmp.8TMoKWqf6k + local exit_status=0 + local timeout=4 + local i + args=('patch' 'psmdb-clustersync' 'sync' '--type=merge' '-p' '{"spec":{"size":1}}') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ patch == \- ]] + [[ patch =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-clustersync == \- ]] + [[ psmdb-clustersync =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ sync == \- ]] + [[ sync =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --type=merge == \- ]] + [[ --type=merge =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -p == \- ]] + [[ -p =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ {"spec":{"size":1}} == \- ]] + [[ {"spec":{"size":1}} =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl patch psmdb-clustersync sync --type=merge -p '{"spec":{"size":1}}' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.3XVPdxgoi0 perconaservermongodbclustersync.psmdb.percona.com/sync patched + cat /tmp/tmp.8TMoKWqf6k + rm /tmp/tmp.3XVPdxgoi0 /tmp/tmp.8TMoKWqf6k + return 0 + wait_deployment_ready_replicas sync-pcsm 1 300 + local name=sync-pcsm + local expected=1 + local timeout=300 + set +o xtrace waiting for deployment/sync-pcsm readyReplicas=1. ok + return 0 + wait_pdb_absent sync-pcsm 120 + local name=sync-pcsm + local timeout=120 + set +o xtrace waiting for pdb/sync-pcsm to be removed ok + return 0 + wait_pcsm_state running 300 + local expected=running + local timeout=300 + set +o xtrace waiting for pcsm state=running ok (state=running) + return 0 + desc 'lease test: backup CR applied while clustersync is running should stay in waiting' + set +o xtrace ----------------------------------------------------------------------------------- lease test: backup CR applied while clustersync is running should stay in waiting ----------------------------------------------------------------------------------- + apply_backup_named backup-during-sync + local name=backup-during-sync + yq eval '.metadata.name = "backup-during-sync"' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/backup-local-s3.yml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.GiG6FwhxXA ++ mktemp + local LAST_ERR=/tmp/tmp.umlkhJuTG8 + 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.WxtdQyl1FN + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.WxtdQyl1FN + 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.WxtdQyl1FN + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.GiG6FwhxXA perconaservermongodbbackup.psmdb.percona.com/backup-during-sync created + cat /tmp/tmp.umlkhJuTG8 + rm /tmp/tmp.GiG6FwhxXA /tmp/tmp.umlkhJuTG8 /tmp/tmp.WxtdQyl1FN + return 0 + wait_kind_state psmdb-backup backup-during-sync waiting 120 + local kind=psmdb-backup + local name=backup-during-sync + local expected=waiting + local timeout=120 + set +o xtrace waiting for psmdb-backup/backup-during-sync state=waiting ok + return 0 + assert_state_stable psmdb-backup backup-during-sync waiting 30 + local kind=psmdb-backup + local name=backup-during-sync + local expected=waiting + local duration=30 + set +o xtrace asserting psmdb-backup/backup-during-sync stays in state=waiting for 30s...... ok + assert_event_present backup-during-sync ClusterSyncActive + local name=backup-during-sync + local reason=ClusterSyncActive + set +o xtrace event reason=ClusterSyncActive present on backup-during-sync (count=1) + desc 'delete during-sync CRs so they do not race with post-finalize checks' + set +o xtrace ----------------------------------------------------------------------------------- delete during-sync CRs so they do not race with post-finalize checks ----------------------------------------------------------------------------------- + kubectl_bin delete psmdb-backup backup-during-sync --ignore-not-found --wait=true ++ mktemp + local LAST_OUT=/tmp/tmp.ZOEj9qVuki ++ mktemp + local LAST_ERR=/tmp/tmp.9aiHgHQHsj + local exit_status=0 + local timeout=4 + local i + args=('delete' 'psmdb-backup' 'backup-during-sync' '--ignore-not-found' '--wait=true') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-backup == \- ]] + [[ psmdb-backup =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ backup-during-sync == \- ]] + [[ backup-during-sync =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --wait=true == \- ]] + [[ --wait=true =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete psmdb-backup backup-during-sync --ignore-not-found --wait=true + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.ZOEj9qVuki perconaservermongodbbackup.psmdb.percona.com "backup-during-sync" deleted from clustersync-18090 namespace + cat /tmp/tmp.9aiHgHQHsj + rm /tmp/tmp.ZOEj9qVuki /tmp/tmp.9aiHgHQHsj + return 0 + desc 'transition: running -> finalized' + set +o xtrace ----------------------------------------------------------------------------------- transition: running -> finalized ----------------------------------------------------------------------------------- + patch_sync_mode finalized + local mode=finalized + desc 'patch sync mode=finalized' + set +o xtrace ----------------------------------------------------------------------------------- patch sync mode=finalized ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb-clustersync sync --type=merge -p '{"spec":{"mode":"finalized"}}' ++ mktemp + local LAST_OUT=/tmp/tmp.NwoSlejykJ ++ mktemp + local LAST_ERR=/tmp/tmp.UWdjdgMMAY + local exit_status=0 + local timeout=4 + local i + args=('patch' 'psmdb-clustersync' 'sync' '--type=merge' '-p' '{"spec":{"mode":"finalized"}}') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ patch == \- ]] + [[ patch =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ psmdb-clustersync == \- ]] + [[ psmdb-clustersync =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ sync == \- ]] + [[ sync =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --type=merge == \- ]] + [[ --type=merge =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -p == \- ]] + [[ -p =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ {"spec":{"mode":"finalized"}} == \- ]] + [[ {"spec":{"mode":"finalized"}} =~ ^(-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-clustersync sync --type=merge -p '{"spec":{"mode":"finalized"}}' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.NwoSlejykJ perconaservermongodbclustersync.psmdb.percona.com/sync patched + cat /tmp/tmp.UWdjdgMMAY + rm /tmp/tmp.NwoSlejykJ /tmp/tmp.UWdjdgMMAY + return 0 + wait_pcsm_state finalized 300 + local expected=finalized + local timeout=300 + set +o xtrace waiting for pcsm state=finalized ok (state=finalized) + return 0 + wait_cr_status_state finalized 120 + local expected=finalized + local timeout=120 + set +o xtrace waiting for psmdb-clustersync/sync status.state=finalized ok + return 0 + desc 'write data after finalize, verify target count does not increase' + set +o xtrace ----------------------------------------------------------------------------------- write data after finalize, verify target count does not increase ----------------------------------------------------------------------------------- + mongosh_on_mongos source-cluster myApp myPass 'db.getSiblingDB("myApp").test.insertOne({x: 100505})' + local cluster=source-cluster + local user=myApp + local pass=myPass + local 'script=db.getSiblingDB("myApp").test.insertOne({x: 100505})' + kubectl_bin exec source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100505})' ++ mktemp + local LAST_OUT=/tmp/tmp.Sphmpd476E ++ mktemp + local LAST_ERR=/tmp/tmp.ETYy0cJEjD + local exit_status=0 + local timeout=4 + local i + args=('exec' 'source-cluster-mongos-0' '-c' 'mongos' '--' 'env' 'HOME=/data/db' 'mongosh' 'mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin' '--quiet' '--tls' '--tlsCertificateKeyFile' '/tmp/tls.pem' '--tlsCAFile' '/etc/mongodb-ssl/ca.crt' '--tlsAllowInvalidCertificates' '--eval' 'db.getSiblingDB("myApp").test.insertOne({x: 100505})') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ exec == \- ]] + [[ exec =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ source-cluster-mongos-0 == \- ]] + [[ source-cluster-mongos-0 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -c == \- ]] + [[ -c =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongos == \- ]] + [[ mongos =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -- == \- ]] + [[ -- =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ env == \- ]] + [[ env =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ HOME=/data/db == \- ]] + [[ HOME=/data/db =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongosh == \- ]] + [[ mongosh =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin == \- ]] + [[ mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --quiet == \- ]] + [[ --quiet =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tls == \- ]] + [[ --tls =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCertificateKeyFile == \- ]] + [[ --tlsCertificateKeyFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /tmp/tls.pem == \- ]] + [[ /tmp/tls.pem =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsCAFile == \- ]] + [[ --tlsCAFile =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /etc/mongodb-ssl/ca.crt == \- ]] + [[ /etc/mongodb-ssl/ca.crt =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --tlsAllowInvalidCertificates == \- ]] + [[ --tlsAllowInvalidCertificates =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --eval == \- ]] + [[ --eval =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ db.getSiblingDB("myApp").test.insertOne({x: 100505}) == \- ]] + [[ db.getSiblingDB("myApp").test.insertOne({x: 100505}) =~ ^(-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 source-cluster-mongos-0 -c mongos -- env HOME=/data/db mongosh mongodb://myApp:myPass@%2Ftmp%2Fmongodb-27017.sock/admin --quiet --tls --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tlsAllowInvalidCertificates --eval 'db.getSiblingDB("myApp").test.insertOne({x: 100505})' + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.Sphmpd476E { acknowledged: true, insertedId: ObjectId('6b03d80bae50ad29bd949468') } + cat /tmp/tmp.ETYy0cJEjD + rm /tmp/tmp.Sphmpd476E /tmp/tmp.ETYy0cJEjD + return 0 + wait_target_doc_count 6 10 + sleep 10 + local expected=6 + local timeout=10 + local collection=test + set +o xtrace waiting for target myApp.test count=6 ok (count=6) + return 0 + desc 'lease test: backup CR applied after finalize should complete (clustersync lease released)' + set +o xtrace ----------------------------------------------------------------------------------- lease test: backup CR applied after finalize should complete (clustersync lease released) ----------------------------------------------------------------------------------- + apply_backup_named backup-after-finalize + local name=backup-after-finalize + yq eval '.metadata.name = "backup-after-finalize"' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/backup-local-s3.yml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.IYSAtnIn7p ++ mktemp + local LAST_ERR=/tmp/tmp.1w32Rb2M9x + 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.DNVvRFGJsx + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.DNVvRFGJsx + 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.DNVvRFGJsx + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.IYSAtnIn7p perconaservermongodbbackup.psmdb.percona.com/backup-after-finalize created + cat /tmp/tmp.1w32Rb2M9x + rm /tmp/tmp.IYSAtnIn7p /tmp/tmp.1w32Rb2M9x /tmp/tmp.DNVvRFGJsx + return 0 + wait_backup backup-after-finalize ready + local backup_name=backup-after-finalize + local target_state=ready + set +o xtrace waiting for backup-after-finalize to reach ready state..................OK + desc 'lease test: restore CR applied after finalize should complete (clustersync lease released)' + set +o xtrace ----------------------------------------------------------------------------------- lease test: restore CR applied after finalize should complete (clustersync lease released) ----------------------------------------------------------------------------------- + apply_restore_named restore-after-finalize initial-backup + local name=restore-after-finalize + local backup=initial-backup + yq eval '.metadata.name = "restore-after-finalize" | .spec.backupName = "initial-backup"' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/clustersync/conf/restore.yml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.eJVZ3I66Zq ++ mktemp + local LAST_ERR=/tmp/tmp.fVFrttJbJH + 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.4QjAR48SR2 + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.4QjAR48SR2 + 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.4QjAR48SR2 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.eJVZ3I66Zq perconaservermongodbrestore.psmdb.percona.com/restore-after-finalize created + cat /tmp/tmp.fVFrttJbJH + rm /tmp/tmp.eJVZ3I66Zq /tmp/tmp.fVFrttJbJH /tmp/tmp.4QjAR48SR2 + return 0 + wait_kind_state psmdb-restore restore-after-finalize ready 1800 + local kind=psmdb-restore + local name=restore-after-finalize + local expected=ready + local timeout=1800 + set +o xtrace waiting for psmdb-restore/restore-after-finalize state=ready...... ok + return 0 + destroy clustersync-18090 + local namespace=clustersync-18090 + local ignore_logs=true + [[ 1 == 1 ]] + echo 'SKIP_DELETE=1, not destroying clustersync-18090' SKIP_DELETE=1, not destroying clustersync-18090 + return + desc 'test passed' + set +o xtrace ----------------------------------------------------------------------------------- test passed ----------------------------------------------------------------------------------- ==================================================================================================== [PASSED] e2e-tests/test_pytest_wrapper.py::test_bash_wrapper ==================================================================================================== [06:08:40.505028] INFO Deleting cert-manager [06:08:57.216360] INFO Cleaning up test environment ---------------------------------------------- generated xml file: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/reports/clustersync.xml ----------------------------------------------- ----------------------------------------- Generated html report: file:///mnt/jenkins/workspace/cloud-psmdb-operator_PR-2715/e2e-tests/reports/clustersync.html ----------------------------------------- ==================================================================================== 1 passed in 1073.59s (0:17:53) ====================================================================================