mkdir -p e2e-tests/reports e2e-tests/logs ========================================================================================= test session starts ========================================================================================== platform linux -- Python 3.14.10, pytest-9.1.1, pluggy-1.7.0 -- /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/.venv/bin/python cachedir: .pytest_cache metadata: {'Python': '3.14.10', 'Platform': 'Linux-7.1.6-201.fc44.x86_64-x86_64-with-glibc2.43', 'Packages': {'pytest': '9.1.1', 'pluggy': '1.7.0'}, 'Plugins': {'json-report': '1.5.0', 'dependency': '0.6.1', 'html': '4.2.0', 'metadata': '3.1.1'}, 'CI': 'true', 'BUILD_NUMBER': '2', 'BUILD_ID': '2', 'BUILD_URL': 'https://cloud.cd.percona.com/job/cloud-psmdb-operator/job/PR-2742/2/', 'NODE_NAME': 'hcloud-bfkncubytbaldetv', 'JOB_NAME': 'cloud-psmdb-operator/PR-2742', 'BUILD_TAG': 'jenkins-cloud-psmdb-operator-PR-2742-2', 'EXECUTOR_NUMBER': '0', 'JENKINS_URL': 'https://cloud.cd.percona.com/', 'WORKSPACE': '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742', 'GIT_COMMIT': 'cf134fefe3b251937747923cc1a37f3d6e0fa43f', 'GIT_URL': 'https://github.com/percona/percona-server-mongodb-operator.git', 'GIT_BRANCH': 'PR-2742'} rootdir: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742 configfile: pyproject.toml plugins: json-report-1.5.0, dependency-0.6.1, html-4.2.0, metadata-3.1.1 collecting ... collected 1 item e2e-tests/test_pytest_wrapper.py::test_bash_wrapper[clustersync] [09:07:17.406740] WARNING kubectl error: Warning: version difference between client (1.37) and server (1.34) exceeds the supported minor version skew of +/-1 [09:07:18.604368] INFO Environment variables: KUBE_VERSION=1.34 PLATFORM=gke ARCH= EKS= GKE=1 AKS= OPENSHIFT= KIND= MINIKUBE= RANCHER= API=psmdb.percona.com/v1 REGISTRY_NAME=docker.io GIT_COMMIT=cf134fefe3b251937747923cc1a37f3d6e0fa43f GIT_BRANCH=PR-2742 OPERATOR_VERSION=1.24.0 IMAGE=docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe IMAGE_MONGOD=docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 IMAGE_MONGOD_CHAIN=docker.io/perconalab/percona-server-mongodb-operator:main-mongod7.0 docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.3 IMAGE_SEARCH=docker.io/perconalab/percona-server-mongodb-operator:main-mongot IMAGE_BACKUP=docker.io/perconalab/percona-server-mongodb-operator:main-backup IMAGE_PMM_CLIENT=docker.io/perconalab/pmm-client:3-dev-latest IMAGE_PMM_SERVER=docker.io/perconalab/pmm-server:3-dev-latest IMAGE_LOGCOLLECTOR=docker.io/perconalab/fluentbit:main-logcollector IMAGE_CLUSTERSYNC=docker.io/percona/percona-clustersync-mongodb:1.0.0 IMAGE_AWS_CLI=docker.io/amazon/aws-cli:2.34.60 CERT_MANAGER_VER=1.21.0 CHAOS_MESH_VER=2.7.1 SEAWEEDFS_VER=4.47.0 PMM_SERVER_VER=9.9.9 CLEAN_NAMESPACE=1 DELETE_CRD_ON_START=1 SKIP_DELETE=0 SKIP_BACKUPS_TO_AWS_GCP_AZURE= UPDATE_COMPARE_FILES=0 Debug logging disabled. + 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-12730 + local ns=clustersync-12730 + echo clustersync-12730 + destroy_cert_manager + [[ -n '' ]] + kubectl_bin delete mutatingwebhookconfiguration cert-manager-webhook --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.rYLROz0RKq ++ mktemp + local LAST_ERR=/tmp/tmp.QaPIdoxOXZ + 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.rYLROz0RKq + cat /tmp/tmp.QaPIdoxOXZ + rm /tmp/tmp.rYLROz0RKq /tmp/tmp.QaPIdoxOXZ + return 0 + kubectl_bin delete validatingwebhookconfiguration cert-manager-webhook --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.LVRn0cLLva ++ mktemp + local LAST_ERR=/tmp/tmp.QZEIygffZH + 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.LVRn0cLLva + cat /tmp/tmp.QZEIygffZH + rm /tmp/tmp.LVRn0cLLva /tmp/tmp.QZEIygffZH + 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.kASxLHdO5N ++ mktemp + local LAST_ERR=/tmp/tmp.6dbusDGWGH + 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.kASxLHdO5N + cat /tmp/tmp.6dbusDGWGH + rm /tmp/tmp.kASxLHdO5N /tmp/tmp.6dbusDGWGH + return 0 + kubectl_bin delete namespace cert-manager --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.Z0VP1hDmiy ++ mktemp + local LAST_ERR=/tmp/tmp.tokENmh9Yg + 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.Z0VP1hDmiy + cat /tmp/tmp.tokENmh9Yg + rm /tmp/tmp.Z0VP1hDmiy /tmp/tmp.tokENmh9Yg + 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.7cj1usE3Gb +++ mktemp ++ local LAST_ERR=/tmp/tmp.Gl3hVViMJT ++ 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.7cj1usE3Gb ++ cat /tmp/tmp.Gl3hVViMJT ++ rm /tmp/tmp.7cj1usE3Gb /tmp/tmp.Gl3hVViMJT ++ return 0 + remaining= ++ kubectl_bin get validatingwebhookconfiguration cert-manager-webhook --ignore-not-found -o name +++ mktemp ++ local LAST_OUT=/tmp/tmp.OWzpEM6vR4 +++ mktemp ++ local LAST_ERR=/tmp/tmp.nLQgMv87KN ++ 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.OWzpEM6vR4 ++ cat /tmp/tmp.nLQgMv87KN ++ rm /tmp/tmp.OWzpEM6vR4 /tmp/tmp.nLQgMv87KN ++ 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.zlquJYJWnO +++ mktemp ++ local LAST_ERR=/tmp/tmp.M8jD4cy9Mi ++ 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.zlquJYJWnO ++ cat /tmp/tmp.M8jD4cy9Mi ++ rm /tmp/tmp.zlquJYJWnO /tmp/tmp.M8jD4cy9Mi ++ return 0 + remaining+= ++ kubectl_bin get namespace cert-manager --ignore-not-found -o name +++ mktemp ++ local LAST_OUT=/tmp/tmp.V4da48d13k +++ mktemp ++ local LAST_ERR=/tmp/tmp.u0KMg6xDg1 ++ 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.V4da48d13k ++ cat /tmp/tmp.u0KMg6xDg1 ++ rm /tmp/tmp.V4da48d13k /tmp/tmp.u0KMg6xDg1 ++ return 0 + remaining+= + [[ -z '' ]] + return 0 + [[ 1 == 1 ]] + delete_crd + desc 'get and delete old CRDs and RBAC' + set +o xtrace ----------------------------------------------------------------------------------- get and delete old CRDs and RBAC ----------------------------------------------------------------------------------- + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.dzxp5WHHI9 ++ mktemp + local LAST_ERR=/tmp/tmp.b6l3amW6tP + local exit_status=0 + local timeout=4 + local i + args=('delete' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml' '--ignore-not-found' '--wait=false') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ delete == \- ]] + [[ delete =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --wait=false == \- ]] + [[ --wait=false =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.dzxp5WHHI9 + cat /tmp/tmp.b6l3amW6tP + rm /tmp/tmp.dzxp5WHHI9 /tmp/tmp.b6l3amW6tP + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml ++ grep -v '\-\-\-' grep: warning: stray \ before - grep: warning: stray \ before - + for crd_name in $(yq eval '.metadata.name' "${src_dir}/deploy/crd.yaml" | grep -v '\-\-\-') + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' + kubectl get perconaservermongodbbackups.psmdb.percona.com --all-namespaces -o wide 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 '\-\-\-') + grep -v NAMESPACE + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbs" in group "psmdb.percona.com" + kubectl patch perconaservermongodbs.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbs" in group "psmdb.percona.com" + : + kubectl get crd perconaservermongodbs.psmdb.percona.com + local rbac_yaml=rbac.yaml + '[' -n psmdb-operator ']' + rbac_yaml=cw-rbac.yaml + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/cw-rbac.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.P4eX0MXlS1 ++ mktemp + local LAST_ERR=/tmp/tmp.nXWxbawNZ8 + local exit_status=0 + local timeout=4 + local i + args=('delete' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/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-2742/deploy/cw-rbac.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/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-2742/deploy/cw-rbac.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.P4eX0MXlS1 + cat /tmp/tmp.nXWxbawNZ8 + rm /tmp/tmp.P4eX0MXlS1 /tmp/tmp.nXWxbawNZ8 + return 0 + check_crd_for_deletion PR-2742 + local git_tag=PR-2742 ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-2742/deploy/crd.yaml ++ /usr/sbin/sed ':a;N;$!ba;s/\n/ /g' ++ /usr/sbin/sed s/---//g ++ yq eval .metadata.name + 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.fyiJvK9uIU +++ mktemp ++ local LAST_ERR=/tmp/tmp.olVNsRfcX9 ++ 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.olVNsRfcX9 ++ break ++ cat /tmp/tmp.fyiJvK9uIU ++ cat /tmp/tmp.olVNsRfcX9 Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.fyiJvK9uIU /tmp/tmp.olVNsRfcX9 ++ 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 ++ awk '{print $1}' ++ grep chaos-mesh + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ awk '{print $1}' ++ grep chaos-mesh ++ kubectl get clusterrolebinding + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ grep chaos-mesh ++ awk '{print $1}' ++ kubectl get clusterrole + 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 '' ]] + [[ -n '' ]] + kubectl_bin get ns + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' ++ mktemp + awk '{print$1}' + 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.0BbhhuulyZ ++ mktemp + local LAST_ERR=/tmp/tmp.6rkUmYb5xu + 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 + local LAST_OUT=/tmp/tmp.p6NbKic74z ++ seq 0 9 ++ mktemp + for attempt in $(seq 0 9) + set +e + kubectl get ns + local LAST_ERR=/tmp/tmp.QdPCjcxG5Y + 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 delete namespace psmdb-operator --ignore-not-found + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.0BbhhuulyZ + cat /tmp/tmp.6rkUmYb5xu + rm /tmp/tmp.0BbhhuulyZ /tmp/tmp.6rkUmYb5xu + return 0 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.p6NbKic74z + cat /tmp/tmp.QdPCjcxG5Y + rm /tmp/tmp.p6NbKic74z /tmp/tmp.QdPCjcxG5Y + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.SGt4gyopTo ++ mktemp + local LAST_ERR=/tmp/tmp.0W0EFn4g4W + 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.SGt4gyopTo + cat /tmp/tmp.0W0EFn4g4W + rm /tmp/tmp.SGt4gyopTo /tmp/tmp.0W0EFn4g4W + 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.6c8hMj1Glp ++ mktemp + local LAST_ERR=/tmp/tmp.ewdphUKPZC + 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.6c8hMj1Glp namespace/psmdb-operator created + cat /tmp/tmp.ewdphUKPZC + rm /tmp/tmp.6c8hMj1Glp /tmp/tmp.ewdphUKPZC + return 0 + set_kube_ctx psmdb-operator + local namespace=psmdb-operator ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.QO227MnrC2 +++ mktemp ++ local LAST_ERR=/tmp/tmp.4djutcY3sx ++ 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.QO227MnrC2 ++ cat /tmp/tmp.4djutcY3sx ++ rm /tmp/tmp.QO227MnrC2 /tmp/tmp.4djutcY3sx ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster4 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.ayXMTnt3cB ++ mktemp + local LAST_ERR=/tmp/tmp.cQ5AtoCoF3 + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-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-2742-cf134fefe-2-cluster4 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-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-2742-cf134fefe-2-cluster4 --namespace=psmdb-operator + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.ayXMTnt3cB Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster4" modified. + cat /tmp/tmp.cQ5AtoCoF3 + rm /tmp/tmp.ayXMTnt3cB /tmp/tmp.cQ5AtoCoF3 + return 0 + deploy_operator + desc 'start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe' + set +o xtrace ----------------------------------------------------------------------------------- start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe ----------------------------------------------------------------------------------- + local cr_file + '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/clustersync/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.x9XKFf3VD5 ++ mktemp + local LAST_ERR=/tmp/tmp.20zIT35ZCo + local exit_status=0 + local timeout=4 + local i + args=('apply' '--server-side' '--force-conflicts' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ apply == \- ]] + [[ apply =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --server-side == \- ]] + [[ --server-side =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --force-conflicts == \- ]] + [[ --force-conflicts =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/crd.yaml + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.x9XKFf3VD5 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.20zIT35ZCo + rm /tmp/tmp.x9XKFf3VD5 /tmp/tmp.20zIT35ZCo + 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-2742/deploy/cw-rbac.yaml + sed -e 's^namespace: .*^namespace: psmdb-operator^' + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.YFhPCtUN7j ++ mktemp + local LAST_ERR=/tmp/tmp.oisFZEmU8R + 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.yqLS92hCMj + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.yqLS92hCMj + 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.yqLS92hCMj + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.YFhPCtUN7j 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.oisFZEmU8R + rm /tmp/tmp.YFhPCtUN7j /tmp/tmp.oisFZEmU8R /tmp/tmp.yqLS92hCMj + return 0 + yq eval $'\n\t\t\t(.spec.template.spec.containers[].image = "docker.io/perconalab/percona-server-mongodb-operator:PR-2742-cf134fefe") |\n\t\t\t((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") |\n\t\t\t((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/deploy/cw-operator.yaml + add_arch_to_podspecs - + kubectl_bin apply -n psmdb-operator -f - + arch_scheduling_enabled + [[ -n '' ]] + cat - ++ mktemp + return + local LAST_OUT=/tmp/tmp.XBYlVhffgs ++ mktemp + local LAST_ERR=/tmp/tmp.j4ZAreqEPD + 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.ZmBoh0fg6k + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.ZmBoh0fg6k + 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.ZmBoh0fg6k + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.XBYlVhffgs deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.j4ZAreqEPD + rm /tmp/tmp.XBYlVhffgs /tmp/tmp.j4ZAreqEPD /tmp/tmp.ZmBoh0fg6k + 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.YE88yKscGg +++ mktemp ++ local LAST_ERR=/tmp/tmp.kWEwlwrSGn ++ 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.YE88yKscGg ++ cat /tmp/tmp.kWEwlwrSGn ++ rm /tmp/tmp.YE88yKscGg /tmp/tmp.kWEwlwrSGn ++ return 0 + wait_operator_pod percona-server-mongodb-operator-977d8f786-slglb + local pod=percona-server-mongodb-operator-977d8f786-slglb + set +o xtrace waiting for pod/percona-server-mongodb-operator-977d8f786-slglb 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.u41I6qMlIn +++ mktemp ++ local LAST_ERR=/tmp/tmp.F7azWCZxxK ++ 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.u41I6qMlIn ++ cat /tmp/tmp.F7azWCZxxK ++ rm /tmp/tmp.u41I6qMlIn /tmp/tmp.F7azWCZxxK ++ return 0 + kubectl_bin logs -n psmdb-operator percona-server-mongodb-operator-977d8f786-slglb ++ mktemp + local LAST_OUT=/tmp/tmp.Yiq1mXI5Dt ++ mktemp + local LAST_ERR=/tmp/tmp.gfAM4wv2gx + local exit_status=0 + local timeout=4 + local i + args=('logs' '-n' 'psmdb-operator' 'percona-server-mongodb-operator-977d8f786-slglb') + 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-977d8f786-slglb == \- ]] + [[ percona-server-mongodb-operator-977d8f786-slglb =~ ^(-f|--filename)=-$ ]] + 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-977d8f786-slglb + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.Yiq1mXI5Dt + cat /tmp/tmp.gfAM4wv2gx + rm /tmp/tmp.Yiq1mXI5Dt /tmp/tmp.gfAM4wv2gx + return 0 2026-11-24T09:08:22.496Z INFO setup Manager starting up {"gitCommit": "cf134fefe3b251937747923cc1a37f3d6e0fa43f", "gitBranch": "PR-2742-cf134fefe", "buildTime": "", "goVersion": "go1.27.4", "os": "linux", "arch": "amd64"} + create_namespace clustersync-12730 + local namespace=clustersync-12730 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ awk '{print $1}' ++ grep chaos-mesh + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + local 'ns_filter=^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + [[ -n '' ]] + kubectl_bin get ns + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' ++ mktemp + awk '{print$1}' + [[ -n '' ]] + desc 'cleaned up old namespaces clustersync-12730' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces clustersync-12730 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace clustersync-12730 --ignore-not-found + xargs kubectl delete ns + local LAST_OUT=/tmp/tmp.0JqWlD3vZj ++ mktemp ++ mktemp + local LAST_ERR=/tmp/tmp.LYBJb4RbxW + 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 + local LAST_OUT=/tmp/tmp.76EUwiTKRs + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 ++ mktemp + for attempt in $(seq 0 9) + set +e + kubectl get ns + local LAST_ERR=/tmp/tmp.CLginBasiL + local exit_status=0 + local timeout=4 + local i + args=('delete' 'namespace' 'clustersync-12730' '--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-12730 == \- ]] + [[ clustersync-12730 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --ignore-not-found == \- ]] + [[ --ignore-not-found =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl delete namespace clustersync-12730 --ignore-not-found + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.0JqWlD3vZj + cat /tmp/tmp.LYBJb4RbxW + rm /tmp/tmp.0JqWlD3vZj /tmp/tmp.LYBJb4RbxW + return 0 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.76EUwiTKRs + cat /tmp/tmp.CLginBasiL + rm /tmp/tmp.76EUwiTKRs /tmp/tmp.CLginBasiL + return 0 + kubectl_bin wait --for=delete namespace clustersync-12730 ++ mktemp + local LAST_OUT=/tmp/tmp.XsJdsmdYNv ++ mktemp + local LAST_ERR=/tmp/tmp.s9NP7qGaK6 + local exit_status=0 + local timeout=4 + local i + args=('wait' '--for=delete' 'namespace' 'clustersync-12730') + 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-12730 == \- ]] + [[ clustersync-12730 =~ ^(-f|--filename)=-$ ]] + 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-12730 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.XsJdsmdYNv + cat /tmp/tmp.s9NP7qGaK6 + rm /tmp/tmp.XsJdsmdYNv /tmp/tmp.s9NP7qGaK6 + return 0 + desc 'create namespace clustersync-12730' + set +o xtrace ----------------------------------------------------------------------------------- create namespace clustersync-12730 ----------------------------------------------------------------------------------- + kubectl_bin create namespace clustersync-12730 ++ mktemp + local LAST_OUT=/tmp/tmp.6vh9Hy4Gyr ++ mktemp + local LAST_ERR=/tmp/tmp.qaMhTCKkvo + local exit_status=0 + local timeout=4 + local i + args=('create' 'namespace' 'clustersync-12730') + 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-12730 == \- ]] + [[ clustersync-12730 =~ ^(-f|--filename)=-$ ]] + 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-12730 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.6vh9Hy4Gyr namespace/clustersync-12730 created + cat /tmp/tmp.qaMhTCKkvo + rm /tmp/tmp.6vh9Hy4Gyr /tmp/tmp.qaMhTCKkvo + return 0 + set_kube_ctx clustersync-12730 + local namespace=clustersync-12730 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.7Jff7ViWj6 +++ mktemp ++ local LAST_ERR=/tmp/tmp.1ghD1JIfi1 ++ 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.7Jff7ViWj6 ++ cat /tmp/tmp.1ghD1JIfi1 ++ rm /tmp/tmp.7Jff7ViWj6 /tmp/tmp.1ghD1JIfi1 ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster4 --namespace=clustersync-12730 ++ mktemp + local LAST_OUT=/tmp/tmp.TPst8EuCy3 ++ mktemp + local LAST_ERR=/tmp/tmp.CIYF5932VS + local exit_status=0 + local timeout=4 + local i + args=('config' 'set-context' 'gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster4' '--namespace=clustersync-12730') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ config == \- ]] + [[ config =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ set-context == \- ]] + [[ set-context =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster4 == \- ]] + [[ gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster4 =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ --namespace=clustersync-12730 == \- ]] + [[ --namespace=clustersync-12730 =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster4 --namespace=clustersync-12730 + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.TPst8EuCy3 Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2742-cf134fefe-2-cluster4" modified. + cat /tmp/tmp.CIYF5932VS + rm /tmp/tmp.TPst8EuCy3 /tmp/tmp.CIYF5932VS + 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-2742/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-2742/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-2742/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: Tue Nov 24 09:08:54 2026 NAMESPACE: clustersync-12730 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.kxLIBNYXQW ++ mktemp + local LAST_ERR=/tmp/tmp.eJ2xvCsB1X + 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.kxLIBNYXQW 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.eJ2xvCsB1X + rm /tmp/tmp.kxLIBNYXQW /tmp/tmp.eJ2xvCsB1X + 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-12730.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.sooEbECj4y ++ mktemp + local LAST_ERR=/tmp/tmp.nPwU1nzhE5 + 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.sooEbECj4y pod "aws-cli" deleted from clustersync-12730 namespace + cat /tmp/tmp.nPwU1nzhE5 Warning: BCID failed open: BCID suppressed until 2026-11-24 12:05:24.196085377 +0000 UTC m=+10859.304765583 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.sooEbECj4y /tmp/tmp.nPwU1nzhE5 + 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-2742/e2e-tests/clustersync/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/s3-secret.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/client.yml ++ mktemp + local LAST_OUT=/tmp/tmp.cgTjopMfj3 ++ mktemp + local LAST_ERR=/tmp/tmp.jclk0JyyAs + local exit_status=0 + local timeout=4 + local i + args=('apply' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/clustersync/conf/secrets.yml' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/s3-secret.yml' '-f' '/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/client.yml') + local args + transformed_files=() + local transformed_files + local stdin_manifest + for i in "${!args[@]}" + [[ apply == \- ]] + [[ apply =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ -f == \- ]] + [[ -f =~ ^(-f|--filename)=-$ ]] + for i in "${!args[@]}" + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/clustersync/conf/secrets.yml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/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-2742/e2e-tests/conf/s3-secret.yml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/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-2742/e2e-tests/conf/client.yml == \- ]] + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/client.yml =~ ^(-f|--filename)=-$ ]] + arch_scheduling_enabled + [[ -n '' ]] + arch_scheduling_enabled + [[ -n '' ]] + local attempt + local delay ++ seq 0 9 + for attempt in $(seq 0 9) + set +e + kubectl apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/clustersync/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/s3-secret.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/conf/client.yml + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.cgTjopMfj3 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.jclk0JyyAs + rm /tmp/tmp.cgTjopMfj3 /tmp/tmp.jclk0JyyAs + return 0 + desc 'deploy source-cluster' + set +o xtrace ----------------------------------------------------------------------------------- deploy source-cluster ----------------------------------------------------------------------------------- + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/clustersync/conf/source-cluster.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/clustersync/conf/source-cluster.yml + kubectl_bin apply -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/clustersync/conf/source-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-2742-cf134fefe"' + local LAST_OUT=/tmp/tmp.tUNX5V8pyB + [[ -n docker.io/perconalab/fluentbit:main-logcollector ]] + yq eval '(.spec | select(has("backup"))).backup.image = "docker.io/perconalab/percona-server-mongodb-operator:main-backup"' + IMAGE_LOGCOLLECTOR=docker.io/perconalab/fluentbit:main-logcollector + yq eval '(.spec | select(has("logcollector"))).logcollector.image = strenv(IMAGE_LOGCOLLECTOR)' + yq eval '(.spec | select(has("search"))).search.image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongot"' + yq eval '.spec.upgradeOptions.apply="Never"' ++ mktemp + /usr/sbin/sed -e s/NAME_SPACE/clustersync-12730/g + add_arch_to_psmdb - + arch_scheduling_enabled + [[ -n '' ]] + cat - + local LAST_ERR=/tmp/tmp.xCvNh1Wr1L + 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.3AQvadi0Ax + cat + return + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.3AQvadi0Ax + 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.3AQvadi0Ax + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.tUNX5V8pyB perconaservermongodb.psmdb.percona.com/source-cluster created + cat /tmp/tmp.xCvNh1Wr1L + rm /tmp/tmp.tUNX5V8pyB /tmp/tmp.xCvNh1Wr1L /tmp/tmp.3AQvadi0Ax + return 0 + desc 'deploy target-cluster' + set +o xtrace ----------------------------------------------------------------------------------- deploy target-cluster ----------------------------------------------------------------------------------- + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/clustersync/conf/target-cluster.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/clustersync/conf/target-cluster.yml + kubectl_bin apply -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/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-2742-cf134fefe"' + local LAST_OUT=/tmp/tmp.aHWVNmOoFI ++ mktemp + [[ -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)' + yq eval '(.spec | select(has("backup"))).backup.image = "docker.io/perconalab/percona-server-mongodb-operator:main-backup"' + yq eval '(.spec | select(has("search"))).search.image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongot"' + yq eval '.spec.upgradeOptions.apply="Never"' + add_arch_to_psmdb - + /usr/sbin/sed -e s/NAME_SPACE/clustersync-12730/g + arch_scheduling_enabled + [[ -n '' ]] + cat - + local LAST_ERR=/tmp/tmp.3QxEzLZ25s + 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.vTXBWNLPXa + cat + return + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.vTXBWNLPXa + 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.vTXBWNLPXa + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.aHWVNmOoFI perconaservermongodb.psmdb.percona.com/target-cluster created + cat /tmp/tmp.3QxEzLZ25s + rm /tmp/tmp.aHWVNmOoFI /tmp/tmp.3QxEzLZ25s /tmp/tmp.vTXBWNLPXa + 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.8yvKgkMJES +++ mktemp ++ local LAST_ERR=/tmp/tmp.V9jGEDUxm8 ++ 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.8yvKgkMJES ++ cat /tmp/tmp.V9jGEDUxm8 ++ rm /tmp/tmp.8yvKgkMJES /tmp/tmp.V9jGEDUxm8 ++ 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.kuqQKBROie +++ mktemp ++ local LAST_ERR=/tmp/tmp.557OJduATS ++ 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.kuqQKBROie ++ cat /tmp/tmp.557OJduATS ++ rm /tmp/tmp.kuqQKBROie /tmp/tmp.557OJduATS ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.yI6T2F1imB +++ mktemp ++ local LAST_ERR=/tmp/tmp.AGtf9ZzPSl ++ 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.yI6T2F1imB ++ cat /tmp/tmp.AGtf9ZzPSl ++ rm /tmp/tmp.yI6T2F1imB /tmp/tmp.AGtf9ZzPSl ++ 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.YilpqGhXNu +++ mktemp ++ local LAST_ERR=/tmp/tmp.0zyfV0wspc ++ 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.YilpqGhXNu ++ cat /tmp/tmp.0zyfV0wspc ++ rm /tmp/tmp.YilpqGhXNu /tmp/tmp.0zyfV0wspc ++ 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.4jhDMGiyJL +++ mktemp ++ local LAST_ERR=/tmp/tmp.3kKx1M5Nnm ++ 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.4jhDMGiyJL ++ cat /tmp/tmp.3kKx1M5Nnm ++ rm /tmp/tmp.4jhDMGiyJL /tmp/tmp.3kKx1M5Nnm ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.ml6s25EKbX +++ mktemp ++ local LAST_ERR=/tmp/tmp.53uBXjwnFQ ++ 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.ml6s25EKbX ++ cat /tmp/tmp.53uBXjwnFQ ++ rm /tmp/tmp.ml6s25EKbX /tmp/tmp.53uBXjwnFQ ++ 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.55OdUKi7g3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.gF9WZ3IoZ5 ++ 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.55OdUKi7g3 ++ cat /tmp/tmp.gF9WZ3IoZ5 ++ rm /tmp/tmp.55OdUKi7g3 /tmp/tmp.gF9WZ3IoZ5 ++ 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.tOMFn1CVrk +++ mktemp ++ local LAST_ERR=/tmp/tmp.WoLxssaNVe ++ 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.tOMFn1CVrk ++ cat /tmp/tmp.WoLxssaNVe ++ rm /tmp/tmp.tOMFn1CVrk /tmp/tmp.WoLxssaNVe ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb source-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.0541TlK9th +++ mktemp ++ local LAST_ERR=/tmp/tmp.KkZ5eKRygF ++ 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.0541TlK9th ++ cat /tmp/tmp.KkZ5eKRygF ++ rm /tmp/tmp.0541TlK9th /tmp/tmp.KkZ5eKRygF ++ 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.YZSmhogj0G +++ mktemp ++ local LAST_ERR=/tmp/tmp.O5iC7eLSe1 ++ 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.YZSmhogj0G ++ cat /tmp/tmp.O5iC7eLSe1 ++ rm /tmp/tmp.YZSmhogj0G /tmp/tmp.O5iC7eLSe1 ++ 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.7EgjnbBQeA +++ mktemp ++ local LAST_ERR=/tmp/tmp.U56KpDEJ65 ++ 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.7EgjnbBQeA ++ cat /tmp/tmp.U56KpDEJ65 ++ rm /tmp/tmp.7EgjnbBQeA /tmp/tmp.U56KpDEJ65 ++ 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.06GIeseH2J +++ mktemp ++ local LAST_ERR=/tmp/tmp.dqonBgT3Vo ++ 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.06GIeseH2J ++ cat /tmp/tmp.dqonBgT3Vo ++ rm /tmp/tmp.06GIeseH2J /tmp/tmp.dqonBgT3Vo ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.sJK8RHBLh2 +++ mktemp ++ local LAST_ERR=/tmp/tmp.PaoC593qK8 ++ 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.sJK8RHBLh2 ++ cat /tmp/tmp.PaoC593qK8 ++ rm /tmp/tmp.sJK8RHBLh2 /tmp/tmp.PaoC593qK8 ++ 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.DzKEhy3bu9 +++ mktemp ++ local LAST_ERR=/tmp/tmp.z7vGCmbBnf ++ 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.DzKEhy3bu9 ++ cat /tmp/tmp.z7vGCmbBnf ++ rm /tmp/tmp.DzKEhy3bu9 /tmp/tmp.z7vGCmbBnf ++ 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.tRsBzJuNrw +++ mktemp ++ local LAST_ERR=/tmp/tmp.q5MEPJDNXq ++ 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.tRsBzJuNrw ++ cat /tmp/tmp.q5MEPJDNXq ++ rm /tmp/tmp.tRsBzJuNrw /tmp/tmp.q5MEPJDNXq ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="rs1")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.HVuJMcNxp6 +++ mktemp ++ local LAST_ERR=/tmp/tmp.UIVnvSGYZV ++ 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.HVuJMcNxp6 ++ cat /tmp/tmp.UIVnvSGYZV ++ rm /tmp/tmp.HVuJMcNxp6 /tmp/tmp.UIVnvSGYZV ++ 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.j7cpjyp3BK +++ mktemp ++ local LAST_ERR=/tmp/tmp.DMQsGVEpJI ++ 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.j7cpjyp3BK ++ cat /tmp/tmp.DMQsGVEpJI ++ rm /tmp/tmp.j7cpjyp3BK /tmp/tmp.DMQsGVEpJI ++ 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.UR3fNQYmvw +++ mktemp ++ local LAST_ERR=/tmp/tmp.XqIrvPJqlI ++ 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.UR3fNQYmvw ++ cat /tmp/tmp.XqIrvPJqlI ++ rm /tmp/tmp.UR3fNQYmvw /tmp/tmp.XqIrvPJqlI ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Xn8IYE1NHK +++ mktemp ++ local LAST_ERR=/tmp/tmp.NKHKIlu8U5 ++ 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.Xn8IYE1NHK ++ cat /tmp/tmp.NKHKIlu8U5 ++ rm /tmp/tmp.Xn8IYE1NHK /tmp/tmp.NKHKIlu8U5 ++ 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.AeGpDWItZR +++ mktemp ++ local LAST_ERR=/tmp/tmp.DhcUSdbWuC ++ 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.AeGpDWItZR ++ cat /tmp/tmp.DhcUSdbWuC ++ rm /tmp/tmp.AeGpDWItZR /tmp/tmp.DhcUSdbWuC ++ 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.N3rOH076si +++ mktemp ++ local LAST_ERR=/tmp/tmp.T3UbZqb5LA ++ 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.N3rOH076si ++ cat /tmp/tmp.T3UbZqb5LA ++ rm /tmp/tmp.N3rOH076si /tmp/tmp.T3UbZqb5LA ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb target-cluster -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Y66WnKGltq +++ mktemp ++ local LAST_ERR=/tmp/tmp.ruqLJkJ9mK ++ 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.Y66WnKGltq ++ cat /tmp/tmp.ruqLJkJ9mK ++ rm /tmp/tmp.Y66WnKGltq /tmp/tmp.ruqLJkJ9mK ++ 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.DWVSS1LuCC +++ mktemp ++ local LAST_ERR=/tmp/tmp.YqXtO3hfUz ++ 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.DWVSS1LuCC ++ cat /tmp/tmp.YqXtO3hfUz ++ rm /tmp/tmp.DWVSS1LuCC /tmp/tmp.YqXtO3hfUz ++ 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.wnVkclA9KE ++ mktemp + local LAST_ERR=/tmp/tmp.IIqZbQnoqt + 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.wnVkclA9KE { ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1795511744, i: 1 }), signature: { hash: Binary.createFromBase64('Qq4RtivQlF4dpLvESBT/9gqEfMU=', 0), keyId: Long('7711663253696282634') } }, operationTime: Timestamp({ t: 1795511744, i: 1 }) } + cat /tmp/tmp.IIqZbQnoqt + rm /tmp/tmp.wnVkclA9KE /tmp/tmp.IIqZbQnoqt + 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.DUsKmLlDsk ++ mktemp + local LAST_ERR=/tmp/tmp.DnC8uI0zJX + 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.DUsKmLlDsk { authenticatedUsers: [ { user: 'source', db: 'admin' } ], authenticatedUserRoles: [ { role: 'backup', db: 'admin' }, { role: 'clusterMonitor', db: 'admin' }, { role: 'readAnyDatabase', db: 'admin' } ] } + cat /tmp/tmp.DnC8uI0zJX + rm /tmp/tmp.DUsKmLlDsk /tmp/tmp.DnC8uI0zJX + 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.0QEIkO1a8I ++ mktemp + local LAST_ERR=/tmp/tmp.ZN1khbBwjA + 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.0QEIkO1a8I { ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1795511759, i: 2 }), signature: { hash: Binary.createFromBase64('9dCDvpa0FPqggzs9ag/2MKjFano=', 0), keyId: Long('7711663253696282634') } }, operationTime: Timestamp({ t: 1795511759, i: 2 }) } + cat /tmp/tmp.ZN1khbBwjA + rm /tmp/tmp.0QEIkO1a8I /tmp/tmp.ZN1khbBwjA + 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.tZBBx377Wu ++ mktemp + local LAST_ERR=/tmp/tmp.rRU7ArCKyf + 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.tZBBx377Wu { ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1795511767, i: 1 }), signature: { hash: Binary.createFromBase64('sOQsmYG90y0NaRuf4YQMxqQ662I=', 0), keyId: Long('7711663558638960641') } }, operationTime: Timestamp({ t: 1795511767, i: 1 }) } + cat /tmp/tmp.rRU7ArCKyf + rm /tmp/tmp.tZBBx377Wu /tmp/tmp.rRU7ArCKyf + 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.CKzFxnX6mo ++ mktemp + local LAST_ERR=/tmp/tmp.iJjbO6ZSOm + 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.CKzFxnX6mo { acknowledged: true, insertedId: ObjectId('6b0555de0b37ec91f2749084') } + cat /tmp/tmp.iJjbO6ZSOm + rm /tmp/tmp.CKzFxnX6mo /tmp/tmp.iJjbO6ZSOm + 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.2pYgjRlJyx ++ mktemp + local LAST_ERR=/tmp/tmp.7Z0fsbjzYZ + 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.2pYgjRlJyx { collectionsharded: 'myApp.sharded', ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1795511783, i: 38 }), signature: { hash: Binary.createFromBase64('dPu0ncopCG6tX6RtNmdeT7qlIVM=', 0), keyId: Long('7711663253696282634') } }, operationTime: Timestamp({ t: 1795511783, i: 38 }) } + cat /tmp/tmp.7Z0fsbjzYZ + rm /tmp/tmp.2pYgjRlJyx /tmp/tmp.7Z0fsbjzYZ + 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.MPBFeKgiws ++ mktemp + local LAST_ERR=/tmp/tmp.0M9yLeJ0PW + 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.MPBFeKgiws { acknowledged: true, insertedIds: { '0': ObjectId('6b0555ee4f5afa5d3a583d8e'), '1': ObjectId('6b0555ee4f5afa5d3a583d8f'), '2': ObjectId('6b0555ee4f5afa5d3a583d90'), '3': ObjectId('6b0555ee4f5afa5d3a583d91'), '4': ObjectId('6b0555ee4f5afa5d3a583d92'), '5': ObjectId('6b0555ee4f5afa5d3a583d93'), '6': ObjectId('6b0555ee4f5afa5d3a583d94'), '7': ObjectId('6b0555ee4f5afa5d3a583d95'), '8': ObjectId('6b0555ee4f5afa5d3a583d96'), '9': ObjectId('6b0555ee4f5afa5d3a583d97'), '10': ObjectId('6b0555ee4f5afa5d3a583d98'), '11': ObjectId('6b0555ee4f5afa5d3a583d99'), '12': ObjectId('6b0555ee4f5afa5d3a583d9a'), '13': ObjectId('6b0555ee4f5afa5d3a583d9b'), '14': ObjectId('6b0555ee4f5afa5d3a583d9c'), '15': ObjectId('6b0555ee4f5afa5d3a583d9d'), '16': ObjectId('6b0555ee4f5afa5d3a583d9e'), '17': ObjectId('6b0555ee4f5afa5d3a583d9f'), '18': ObjectId('6b0555ee4f5afa5d3a583da0'), '19': ObjectId('6b0555ee4f5afa5d3a583da1'), '20': ObjectId('6b0555ee4f5afa5d3a583da2'), '21': ObjectId('6b0555ee4f5afa5d3a583da3'), '22': ObjectId('6b0555ee4f5afa5d3a583da4'), '23': ObjectId('6b0555ee4f5afa5d3a583da5'), '24': ObjectId('6b0555ee4f5afa5d3a583da6'), '25': ObjectId('6b0555ee4f5afa5d3a583da7'), '26': ObjectId('6b0555ee4f5afa5d3a583da8'), '27': ObjectId('6b0555ee4f5afa5d3a583da9'), '28': ObjectId('6b0555ee4f5afa5d3a583daa'), '29': ObjectId('6b0555ee4f5afa5d3a583dab'), '30': ObjectId('6b0555ee4f5afa5d3a583dac'), '31': ObjectId('6b0555ee4f5afa5d3a583dad'), '32': ObjectId('6b0555ee4f5afa5d3a583dae'), '33': ObjectId('6b0555ee4f5afa5d3a583daf'), '34': ObjectId('6b0555ee4f5afa5d3a583db0'), '35': ObjectId('6b0555ee4f5afa5d3a583db1'), '36': ObjectId('6b0555ee4f5afa5d3a583db2'), '37': ObjectId('6b0555ee4f5afa5d3a583db3'), '38': ObjectId('6b0555ee4f5afa5d3a583db4'), '39': ObjectId('6b0555ee4f5afa5d3a583db5'), '40': ObjectId('6b0555ee4f5afa5d3a583db6'), '41': ObjectId('6b0555ee4f5afa5d3a583db7'), '42': ObjectId('6b0555ee4f5afa5d3a583db8'), '43': ObjectId('6b0555ee4f5afa5d3a583db9'), '44': ObjectId('6b0555ee4f5afa5d3a583dba'), '45': ObjectId('6b0555ee4f5afa5d3a583dbb'), '46': ObjectId('6b0555ee4f5afa5d3a583dbc'), '47': ObjectId('6b0555ee4f5afa5d3a583dbd'), '48': ObjectId('6b0555ee4f5afa5d3a583dbe'), '49': ObjectId('6b0555ee4f5afa5d3a583dbf'), '50': ObjectId('6b0555ee4f5afa5d3a583dc0'), '51': ObjectId('6b0555ee4f5afa5d3a583dc1'), '52': ObjectId('6b0555ee4f5afa5d3a583dc2'), '53': ObjectId('6b0555ee4f5afa5d3a583dc3'), '54': ObjectId('6b0555ee4f5afa5d3a583dc4'), '55': ObjectId('6b0555ee4f5afa5d3a583dc5'), '56': ObjectId('6b0555ee4f5afa5d3a583dc6'), '57': ObjectId('6b0555ee4f5afa5d3a583dc7'), '58': ObjectId('6b0555ee4f5afa5d3a583dc8'), '59': ObjectId('6b0555ee4f5afa5d3a583dc9'), '60': ObjectId('6b0555ee4f5afa5d3a583dca'), '61': ObjectId('6b0555ee4f5afa5d3a583dcb'), '62': ObjectId('6b0555ee4f5afa5d3a583dcc'), '63': ObjectId('6b0555ee4f5afa5d3a583dcd'), '64': ObjectId('6b0555ee4f5afa5d3a583dce'), '65': ObjectId('6b0555ee4f5afa5d3a583dcf'), '66': ObjectId('6b0555ee4f5afa5d3a583dd0'), '67': ObjectId('6b0555ee4f5afa5d3a583dd1'), '68': ObjectId('6b0555ee4f5afa5d3a583dd2'), '69': ObjectId('6b0555ee4f5afa5d3a583dd3'), '70': ObjectId('6b0555ee4f5afa5d3a583dd4'), '71': ObjectId('6b0555ee4f5afa5d3a583dd5'), '72': ObjectId('6b0555ee4f5afa5d3a583dd6'), '73': ObjectId('6b0555ee4f5afa5d3a583dd7'), '74': ObjectId('6b0555ee4f5afa5d3a583dd8'), '75': ObjectId('6b0555ee4f5afa5d3a583dd9'), '76': ObjectId('6b0555ee4f5afa5d3a583dda'), '77': ObjectId('6b0555ee4f5afa5d3a583ddb'), '78': ObjectId('6b0555ee4f5afa5d3a583ddc'), '79': ObjectId('6b0555ee4f5afa5d3a583ddd'), '80': ObjectId('6b0555ee4f5afa5d3a583dde'), '81': ObjectId('6b0555ee4f5afa5d3a583ddf'), '82': ObjectId('6b0555ee4f5afa5d3a583de0'), '83': ObjectId('6b0555ee4f5afa5d3a583de1'), '84': ObjectId('6b0555ee4f5afa5d3a583de2'), '85': ObjectId('6b0555ee4f5afa5d3a583de3'), '86': ObjectId('6b0555ee4f5afa5d3a583de4'), '87': ObjectId('6b0555ee4f5afa5d3a583de5'), '88': ObjectId('6b0555ee4f5afa5d3a583de6'), '89': ObjectId('6b0555ee4f5afa5d3a583de7'), '90': ObjectId('6b0555ee4f5afa5d3a583de8'), '91': ObjectId('6b0555ee4f5afa5d3a583de9'), '92': ObjectId('6b0555ee4f5afa5d3a583dea'), '93': ObjectId('6b0555ee4f5afa5d3a583deb'), '94': ObjectId('6b0555ee4f5afa5d3a583dec'), '95': ObjectId('6b0555ee4f5afa5d3a583ded'), '96': ObjectId('6b0555ee4f5afa5d3a583dee'), '97': ObjectId('6b0555ee4f5afa5d3a583def'), '98': ObjectId('6b0555ee4f5afa5d3a583df0'), '99': ObjectId('6b0555ee4f5afa5d3a583df1'), '100': ObjectId('6b0555ee4f5afa5d3a583df2'), '101': ObjectId('6b0555ee4f5afa5d3a583df3'), '102': ObjectId('6b0555ee4f5afa5d3a583df4'), '103': ObjectId('6b0555ee4f5afa5d3a583df5'), '104': ObjectId('6b0555ee4f5afa5d3a583df6'), '105': ObjectId('6b0555ee4f5afa5d3a583df7'), '106': ObjectId('6b0555ee4f5afa5d3a583df8'), '107': ObjectId('6b0555ee4f5afa5d3a583df9'), '108': ObjectId('6b0555ee4f5afa5d3a583dfa'), '109': ObjectId('6b0555ee4f5afa5d3a583dfb'), '110': ObjectId('6b0555ee4f5afa5d3a583dfc'), '111': ObjectId('6b0555ee4f5afa5d3a583dfd'), '112': ObjectId('6b0555ee4f5afa5d3a583dfe'), '113': ObjectId('6b0555ee4f5afa5d3a583dff'), '114': ObjectId('6b0555ee4f5afa5d3a583e00'), '115': ObjectId('6b0555ee4f5afa5d3a583e01'), '116': ObjectId('6b0555ee4f5afa5d3a583e02'), '117': ObjectId('6b0555ee4f5afa5d3a583e03'), '118': ObjectId('6b0555ee4f5afa5d3a583e04'), '119': ObjectId('6b0555ee4f5afa5d3a583e05'), '120': ObjectId('6b0555ee4f5afa5d3a583e06'), '121': ObjectId('6b0555ee4f5afa5d3a583e07'), '122': ObjectId('6b0555ee4f5afa5d3a583e08'), '123': ObjectId('6b0555ee4f5afa5d3a583e09'), '124': ObjectId('6b0555ee4f5afa5d3a583e0a'), '125': ObjectId('6b0555ee4f5afa5d3a583e0b'), '126': ObjectId('6b0555ee4f5afa5d3a583e0c'), '127': ObjectId('6b0555ee4f5afa5d3a583e0d'), '128': ObjectId('6b0555ee4f5afa5d3a583e0e'), '129': ObjectId('6b0555ee4f5afa5d3a583e0f'), '130': ObjectId('6b0555ee4f5afa5d3a583e10'), '131': ObjectId('6b0555ee4f5afa5d3a583e11'), '132': ObjectId('6b0555ee4f5afa5d3a583e12'), '133': ObjectId('6b0555ee4f5afa5d3a583e13'), '134': ObjectId('6b0555ee4f5afa5d3a583e14'), '135': ObjectId('6b0555ee4f5afa5d3a583e15'), '136': ObjectId('6b0555ee4f5afa5d3a583e16'), '137': ObjectId('6b0555ee4f5afa5d3a583e17'), '138': ObjectId('6b0555ee4f5afa5d3a583e18'), '139': ObjectId('6b0555ee4f5afa5d3a583e19'), '140': ObjectId('6b0555ee4f5afa5d3a583e1a'), '141': ObjectId('6b0555ee4f5afa5d3a583e1b'), '142': ObjectId('6b0555ee4f5afa5d3a583e1c'), '143': ObjectId('6b0555ee4f5afa5d3a583e1d'), '144': ObjectId('6b0555ee4f5afa5d3a583e1e'), '145': ObjectId('6b0555ee4f5afa5d3a583e1f'), '146': ObjectId('6b0555ee4f5afa5d3a583e20'), '147': ObjectId('6b0555ee4f5afa5d3a583e21'), '148': ObjectId('6b0555ee4f5afa5d3a583e22'), '149': ObjectId('6b0555ee4f5afa5d3a583e23'), '150': ObjectId('6b0555ee4f5afa5d3a583e24'), '151': ObjectId('6b0555ee4f5afa5d3a583e25'), '152': ObjectId('6b0555ee4f5afa5d3a583e26'), '153': ObjectId('6b0555ee4f5afa5d3a583e27'), '154': ObjectId('6b0555ee4f5afa5d3a583e28'), '155': ObjectId('6b0555ee4f5afa5d3a583e29'), '156': ObjectId('6b0555ee4f5afa5d3a583e2a'), '157': ObjectId('6b0555ee4f5afa5d3a583e2b'), '158': ObjectId('6b0555ee4f5afa5d3a583e2c'), '159': ObjectId('6b0555ee4f5afa5d3a583e2d'), '160': ObjectId('6b0555ee4f5afa5d3a583e2e'), '161': ObjectId('6b0555ee4f5afa5d3a583e2f'), '162': ObjectId('6b0555ee4f5afa5d3a583e30'), '163': ObjectId('6b0555ee4f5afa5d3a583e31'), '164': ObjectId('6b0555ee4f5afa5d3a583e32'), '165': ObjectId('6b0555ee4f5afa5d3a583e33'), '166': ObjectId('6b0555ee4f5afa5d3a583e34'), '167': ObjectId('6b0555ee4f5afa5d3a583e35'), '168': ObjectId('6b0555ee4f5afa5d3a583e36'), '169': ObjectId('6b0555ee4f5afa5d3a583e37'), '170': ObjectId('6b0555ee4f5afa5d3a583e38'), '171': ObjectId('6b0555ee4f5afa5d3a583e39'), '172': ObjectId('6b0555ee4f5afa5d3a583e3a'), '173': ObjectId('6b0555ee4f5afa5d3a583e3b'), '174': ObjectId('6b0555ee4f5afa5d3a583e3c'), '175': ObjectId('6b0555ee4f5afa5d3a583e3d'), '176': ObjectId('6b0555ee4f5afa5d3a583e3e'), '177': ObjectId('6b0555ee4f5afa5d3a583e3f'), '178': ObjectId('6b0555ee4f5afa5d3a583e40'), '179': ObjectId('6b0555ee4f5afa5d3a583e41'), '180': ObjectId('6b0555ee4f5afa5d3a583e42'), '181': ObjectId('6b0555ee4f5afa5d3a583e43'), '182': ObjectId('6b0555ee4f5afa5d3a583e44'), '183': ObjectId('6b0555ee4f5afa5d3a583e45'), '184': ObjectId('6b0555ee4f5afa5d3a583e46'), '185': ObjectId('6b0555ee4f5afa5d3a583e47'), '186': ObjectId('6b0555ee4f5afa5d3a583e48'), '187': ObjectId('6b0555ee4f5afa5d3a583e49'), '188': ObjectId('6b0555ee4f5afa5d3a583e4a'), '189': ObjectId('6b0555ee4f5afa5d3a583e4b'), '190': ObjectId('6b0555ee4f5afa5d3a583e4c'), '191': ObjectId('6b0555ee4f5afa5d3a583e4d'), '192': ObjectId('6b0555ee4f5afa5d3a583e4e'), '193': ObjectId('6b0555ee4f5afa5d3a583e4f'), '194': ObjectId('6b0555ee4f5afa5d3a583e50'), '195': ObjectId('6b0555ee4f5afa5d3a583e51'), '196': ObjectId('6b0555ee4f5afa5d3a583e52'), '197': ObjectId('6b0555ee4f5afa5d3a583e53'), '198': ObjectId('6b0555ee4f5afa5d3a583e54'), '199': ObjectId('6b0555ee4f5afa5d3a583e55'), '200': ObjectId('6b0555ee4f5afa5d3a583e56'), '201': ObjectId('6b0555ee4f5afa5d3a583e57'), '202': ObjectId('6b0555ee4f5afa5d3a583e58'), '203': ObjectId('6b0555ee4f5afa5d3a583e59'), '204': ObjectId('6b0555ee4f5afa5d3a583e5a'), '205': ObjectId('6b0555ee4f5afa5d3a583e5b'), '206': ObjectId('6b0555ee4f5afa5d3a583e5c'), '207': ObjectId('6b0555ee4f5afa5d3a583e5d'), '208': ObjectId('6b0555ee4f5afa5d3a583e5e'), '209': ObjectId('6b0555ee4f5afa5d3a583e5f'), '210': ObjectId('6b0555ee4f5afa5d3a583e60'), '211': ObjectId('6b0555ee4f5afa5d3a583e61'), '212': ObjectId('6b0555ee4f5afa5d3a583e62'), '213': ObjectId('6b0555ee4f5afa5d3a583e63'), '214': ObjectId('6b0555ee4f5afa5d3a583e64'), '215': ObjectId('6b0555ee4f5afa5d3a583e65'), '216': ObjectId('6b0555ee4f5afa5d3a583e66'), '217': ObjectId('6b0555ee4f5afa5d3a583e67'), '218': ObjectId('6b0555ee4f5afa5d3a583e68'), '219': ObjectId('6b0555ee4f5afa5d3a583e69'), '220': ObjectId('6b0555ee4f5afa5d3a583e6a'), '221': ObjectId('6b0555ee4f5afa5d3a583e6b'), '222': ObjectId('6b0555ee4f5afa5d3a583e6c'), '223': ObjectId('6b0555ee4f5afa5d3a583e6d'), '224': ObjectId('6b0555ee4f5afa5d3a583e6e'), '225': ObjectId('6b0555ee4f5afa5d3a583e6f'), '226': ObjectId('6b0555ee4f5afa5d3a583e70'), '227': ObjectId('6b0555ee4f5afa5d3a583e71'), '228': ObjectId('6b0555ee4f5afa5d3a583e72'), '229': ObjectId('6b0555ee4f5afa5d3a583e73'), '230': ObjectId('6b0555ee4f5afa5d3a583e74'), '231': ObjectId('6b0555ee4f5afa5d3a583e75'), '232': ObjectId('6b0555ee4f5afa5d3a583e76'), '233': ObjectId('6b0555ee4f5afa5d3a583e77'), '234': ObjectId('6b0555ee4f5afa5d3a583e78'), '235': ObjectId('6b0555ee4f5afa5d3a583e79'), '236': ObjectId('6b0555ee4f5afa5d3a583e7a'), '237': ObjectId('6b0555ee4f5afa5d3a583e7b'), '238': ObjectId('6b0555ee4f5afa5d3a583e7c'), '239': ObjectId('6b0555ee4f5afa5d3a583e7d'), '240': ObjectId('6b0555ee4f5afa5d3a583e7e'), '241': ObjectId('6b0555ee4f5afa5d3a583e7f'), '242': ObjectId('6b0555ee4f5afa5d3a583e80'), '243': ObjectId('6b0555ee4f5afa5d3a583e81'), '244': ObjectId('6b0555ee4f5afa5d3a583e82'), '245': ObjectId('6b0555ee4f5afa5d3a583e83'), '246': ObjectId('6b0555ee4f5afa5d3a583e84'), '247': ObjectId('6b0555ee4f5afa5d3a583e85'), '248': ObjectId('6b0555ee4f5afa5d3a583e86'), '249': ObjectId('6b0555ee4f5afa5d3a583e87'), '250': ObjectId('6b0555ee4f5afa5d3a583e88'), '251': ObjectId('6b0555ee4f5afa5d3a583e89'), '252': ObjectId('6b0555ee4f5afa5d3a583e8a'), '253': ObjectId('6b0555ee4f5afa5d3a583e8b'), '254': ObjectId('6b0555ee4f5afa5d3a583e8c'), '255': ObjectId('6b0555ee4f5afa5d3a583e8d'), '256': ObjectId('6b0555ee4f5afa5d3a583e8e'), '257': ObjectId('6b0555ee4f5afa5d3a583e8f'), '258': ObjectId('6b0555ee4f5afa5d3a583e90'), '259': ObjectId('6b0555ee4f5afa5d3a583e91'), '260': ObjectId('6b0555ee4f5afa5d3a583e92'), '261': ObjectId('6b0555ee4f5afa5d3a583e93'), '262': ObjectId('6b0555ee4f5afa5d3a583e94'), '263': ObjectId('6b0555ee4f5afa5d3a583e95'), '264': ObjectId('6b0555ee4f5afa5d3a583e96'), '265': ObjectId('6b0555ee4f5afa5d3a583e97'), '266': ObjectId('6b0555ee4f5afa5d3a583e98'), '267': ObjectId('6b0555ee4f5afa5d3a583e99'), '268': ObjectId('6b0555ee4f5afa5d3a583e9a'), '269': ObjectId('6b0555ee4f5afa5d3a583e9b'), '270': ObjectId('6b0555ee4f5afa5d3a583e9c'), '271': ObjectId('6b0555ee4f5afa5d3a583e9d'), '272': ObjectId('6b0555ee4f5afa5d3a583e9e'), '273': ObjectId('6b0555ee4f5afa5d3a583e9f'), '274': ObjectId('6b0555ee4f5afa5d3a583ea0'), '275': ObjectId('6b0555ee4f5afa5d3a583ea1'), '276': ObjectId('6b0555ee4f5afa5d3a583ea2'), '277': ObjectId('6b0555ee4f5afa5d3a583ea3'), '278': ObjectId('6b0555ee4f5afa5d3a583ea4'), '279': ObjectId('6b0555ee4f5afa5d3a583ea5'), '280': ObjectId('6b0555ee4f5afa5d3a583ea6'), '281': ObjectId('6b0555ee4f5afa5d3a583ea7'), '282': ObjectId('6b0555ee4f5afa5d3a583ea8'), '283': ObjectId('6b0555ee4f5afa5d3a583ea9'), '284': ObjectId('6b0555ee4f5afa5d3a583eaa'), '285': ObjectId('6b0555ee4f5afa5d3a583eab'), '286': ObjectId('6b0555ee4f5afa5d3a583eac'), '287': ObjectId('6b0555ee4f5afa5d3a583ead'), '288': ObjectId('6b0555ee4f5afa5d3a583eae'), '289': ObjectId('6b0555ee4f5afa5d3a583eaf'), '290': ObjectId('6b0555ee4f5afa5d3a583eb0'), '291': ObjectId('6b0555ee4f5afa5d3a583eb1'), '292': ObjectId('6b0555ee4f5afa5d3a583eb2'), '293': ObjectId('6b0555ee4f5afa5d3a583eb3'), '294': ObjectId('6b0555ee4f5afa5d3a583eb4'), '295': ObjectId('6b0555ee4f5afa5d3a583eb5'), '296': ObjectId('6b0555ee4f5afa5d3a583eb6'), '297': ObjectId('6b0555ee4f5afa5d3a583eb7'), '298': ObjectId('6b0555ee4f5afa5d3a583eb8'), '299': ObjectId('6b0555ee4f5afa5d3a583eb9') } } + cat /tmp/tmp.0M9yLeJ0PW + rm /tmp/tmp.MPBFeKgiws /tmp/tmp.0M9yLeJ0PW + 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-24T09:13:58.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-24T09:14:01.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-24T09:13:26.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-2742/e2e-tests/clustersync/conf/backup-local-s3.yml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.zKJ9okAZgm ++ mktemp + local LAST_ERR=/tmp/tmp.imXmEdXeYc + 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.nFl95blwWt + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.nFl95blwWt + 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.nFl95blwWt + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.zKJ9okAZgm perconaservermongodbbackup.psmdb.percona.com/initial-backup created + cat /tmp/tmp.imXmEdXeYc + rm /tmp/tmp.zKJ9okAZgm /tmp/tmp.imXmEdXeYc /tmp/tmp.nFl95blwWt + 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-2742/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-12730|g' + add_arch_to_clustersync - + kubectl_bin apply -f - + arch_scheduling_enabled + [[ -n '' ]] + cat - ++ mktemp + return + local LAST_OUT=/tmp/tmp.ur50irOmup ++ mktemp + local LAST_ERR=/tmp/tmp.wmowZexFPc + 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.lxwSij6dVg + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.lxwSij6dVg + 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.lxwSij6dVg + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.ur50irOmup perconaservermongodbclustersync.psmdb.percona.com/sync created + cat /tmp/tmp.wmowZexFPc + rm /tmp/tmp.ur50irOmup /tmp/tmp.wmowZexFPc /tmp/tmp.lxwSij6dVg + 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.7xtdnFC2tA ++ mktemp + local LAST_ERR=/tmp/tmp.YOSDS0nffO + 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.7xtdnFC2tA deployment.apps/sync-pcsm condition met + cat /tmp/tmp.YOSDS0nffO + rm /tmp/tmp.7xtdnFC2tA /tmp/tmp.YOSDS0nffO + 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.79U4wrINfX ++ mktemp + local LAST_ERR=/tmp/tmp.7UCiDyyHE1 + 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.79U4wrINfX { acknowledged: true, insertedId: ObjectId('6b0556673a02c423c08b7e06') } + cat /tmp/tmp.7UCiDyyHE1 + rm /tmp/tmp.79U4wrINfX /tmp/tmp.7UCiDyyHE1 + 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.LNg6O33A40 ++ mktemp + local LAST_ERR=/tmp/tmp.aFrwBm548C + 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.LNg6O33A40 { acknowledged: true, insertedId: ObjectId('6b0556818b6f36ff60c2489a') } + cat /tmp/tmp.aFrwBm548C + rm /tmp/tmp.LNg6O33A40 /tmp/tmp.aFrwBm548C + 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.kwgr2IG0hG ++ mktemp + local LAST_ERR=/tmp/tmp.jyX3m7DVVb + 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.kwgr2IG0hG perconaservermongodbclustersync.psmdb.percona.com/sync patched + cat /tmp/tmp.jyX3m7DVVb + rm /tmp/tmp.kwgr2IG0hG /tmp/tmp.jyX3m7DVVb + 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.9wLRv64dOy ++ mktemp + local LAST_ERR=/tmp/tmp.wDiXhcTmII + 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.9wLRv64dOy { acknowledged: true, insertedId: ObjectId('6b0556a0f4d7253c197d76bf') } + cat /tmp/tmp.wDiXhcTmII + rm /tmp/tmp.9wLRv64dOy /tmp/tmp.wDiXhcTmII + 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.CV2u99WtmX ++ mktemp + local LAST_ERR=/tmp/tmp.VtdZDu8hOl + 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.CV2u99WtmX perconaservermongodbclustersync.psmdb.percona.com/sync patched + cat /tmp/tmp.VtdZDu8hOl + rm /tmp/tmp.CV2u99WtmX /tmp/tmp.VtdZDu8hOl + 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.Y6YvyEvX5x ++ mktemp + local LAST_ERR=/tmp/tmp.3jzL9FSJxj + 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.Y6YvyEvX5x { acknowledged: true, insertedId: ObjectId('6b0556bdb76436f9d598affa') } + cat /tmp/tmp.3jzL9FSJxj + rm /tmp/tmp.Y6YvyEvX5x /tmp/tmp.3jzL9FSJxj + 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-86c7fb6ccb-hk7ns + kubectl_bin patch psmdb-clustersync sync --type=merge -p '{"spec":{"size":3}}' ++ mktemp + local LAST_OUT=/tmp/tmp.2LWLia0a2Q ++ mktemp + local LAST_ERR=/tmp/tmp.ywJk1BOuME + 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.2LWLia0a2Q perconaservermongodbclustersync.psmdb.percona.com/sync patched + cat /tmp/tmp.ywJk1BOuME + rm /tmp/tmp.2LWLia0a2Q /tmp/tmp.ywJk1BOuME + 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.QPOvMhSrv4 ++ mktemp + local LAST_ERR=/tmp/tmp.4jBkDz9dLE + 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.QPOvMhSrv4 NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE sync-pcsm N/A 1 1 20s + cat /tmp/tmp.4jBkDz9dLE + rm /tmp/tmp.QPOvMhSrv4 /tmp/tmp.4jBkDz9dLE + 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-86c7fb6ccb-hk7ns ]] ++ active_instance ++ kubectl_bin get psmdb-clustersync sync -o 'jsonpath={.status.activeInstance}' + [[ sync-pcsm-86c7fb6ccb-hk7ns != sync\-pcsm\-86c7fb6ccb\-hk7ns ]] + 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-86c7fb6ccb-hk7ns) + 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-86c7fb6ccb-hk7ns + echo 'active instance: sync-pcsm-86c7fb6ccb-hk7ns' active instance: sync-pcsm-86c7fb6ccb-hk7ns + 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-86c7fb6ccb-hk7ns --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.CZt2uaXnb8 ++ mktemp + local LAST_ERR=/tmp/tmp.2FCznEg7SV + local exit_status=0 + local timeout=4 + local i + args=('delete' 'pod' 'sync-pcsm-86c7fb6ccb-hk7ns' '--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-86c7fb6ccb-hk7ns == \- ]] + [[ sync-pcsm-86c7fb6ccb-hk7ns =~ ^(-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-86c7fb6ccb-hk7ns --wait=false + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.CZt2uaXnb8 pod "sync-pcsm-86c7fb6ccb-hk7ns" deleted from clustersync-12730 namespace + cat /tmp/tmp.2FCznEg7SV + rm /tmp/tmp.CZt2uaXnb8 /tmp/tmp.2FCznEg7SV + return 0 + wait_active_instance_changed sync-pcsm-86c7fb6ccb-hk7ns 300 + local previous=sync-pcsm-86c7fb6ccb-hk7ns + local timeout=300 + set +o xtrace waiting for active instance to move away from sync-pcsm-86c7fb6ccb-hk7ns.. ok (sync-pcsm-86c7fb6ccb-lw8gj) + 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.A5Q9ubF65S ++ mktemp + local LAST_ERR=/tmp/tmp.3P5cSt4JEX + 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.A5Q9ubF65S { acknowledged: true, insertedId: ObjectId('6b05570dcaf4ce561061fdd0') } + cat /tmp/tmp.3P5cSt4JEX + rm /tmp/tmp.A5Q9ubF65S /tmp/tmp.3P5cSt4JEX + 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.UAvGXzFJZE ++ mktemp + local LAST_ERR=/tmp/tmp.8iLbamASuZ + 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.UAvGXzFJZE perconaservermongodbclustersync.psmdb.percona.com/sync patched + cat /tmp/tmp.8iLbamASuZ + rm /tmp/tmp.UAvGXzFJZE /tmp/tmp.8iLbamASuZ + 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-2742/e2e-tests/clustersync/conf/backup-local-s3.yml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.bALRofaZPF ++ mktemp + local LAST_ERR=/tmp/tmp.OEHQOYKg8k + 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.YvOXVrtvmK + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.YvOXVrtvmK + 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.YvOXVrtvmK + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.bALRofaZPF perconaservermongodbbackup.psmdb.percona.com/backup-during-sync created + cat /tmp/tmp.OEHQOYKg8k + rm /tmp/tmp.bALRofaZPF /tmp/tmp.OEHQOYKg8k /tmp/tmp.YvOXVrtvmK + 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.yWJlR250A5 ++ mktemp + local LAST_ERR=/tmp/tmp.UojD89K0Sx + 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.yWJlR250A5 perconaservermongodbbackup.psmdb.percona.com "backup-during-sync" deleted from clustersync-12730 namespace + cat /tmp/tmp.UojD89K0Sx + rm /tmp/tmp.yWJlR250A5 /tmp/tmp.UojD89K0Sx + 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.iXgvFF3lnj ++ mktemp + local LAST_ERR=/tmp/tmp.UNxg5pQl3y + 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.iXgvFF3lnj perconaservermongodbclustersync.psmdb.percona.com/sync patched + cat /tmp/tmp.UNxg5pQl3y + rm /tmp/tmp.iXgvFF3lnj /tmp/tmp.UNxg5pQl3y + 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.Pj1WfW0wtD ++ mktemp + local LAST_ERR=/tmp/tmp.SgxCTQbAnM + 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.Pj1WfW0wtD { acknowledged: true, insertedId: ObjectId('6b05576736c75679732b0bd7') } + cat /tmp/tmp.SgxCTQbAnM + rm /tmp/tmp.Pj1WfW0wtD /tmp/tmp.SgxCTQbAnM + 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 + kubectl_bin apply -f - + yq eval '.metadata.name = "backup-after-finalize"' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/clustersync/conf/backup-local-s3.yml ++ mktemp + local LAST_OUT=/tmp/tmp.F8TfFQjLmo ++ mktemp + local LAST_ERR=/tmp/tmp.DxJMVZh09U + 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.6PjYwzEh3R + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.6PjYwzEh3R + 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.6PjYwzEh3R + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.F8TfFQjLmo perconaservermongodbbackup.psmdb.percona.com/backup-after-finalize created + cat /tmp/tmp.DxJMVZh09U + rm /tmp/tmp.F8TfFQjLmo /tmp/tmp.DxJMVZh09U /tmp/tmp.6PjYwzEh3R + 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-2742/e2e-tests/clustersync/conf/restore.yml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.ZHgAC6pbrN ++ mktemp + local LAST_ERR=/tmp/tmp.bFAJzgQNXQ + 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.73iLs0im6A + cat + transformed_files+=("${stdin_manifest}") + args[$i]=/tmp/tmp.73iLs0im6A + 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.73iLs0im6A + exit_status=0 + set -e + [[ 0 == 0 ]] + break + cat /tmp/tmp.ZHgAC6pbrN perconaservermongodbrestore.psmdb.percona.com/restore-after-finalize created + cat /tmp/tmp.bFAJzgQNXQ + rm /tmp/tmp.ZHgAC6pbrN /tmp/tmp.bFAJzgQNXQ /tmp/tmp.73iLs0im6A + 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-12730 + local namespace=clustersync-12730 + local ignore_logs=true + [[ 1 == 1 ]] + echo 'SKIP_DELETE=1, not destroying clustersync-12730' SKIP_DELETE=1, not destroying clustersync-12730 + return + desc 'test passed' + set +o xtrace ----------------------------------------------------------------------------------- test passed ----------------------------------------------------------------------------------- ==================================================================================================== [PASSED] e2e-tests/test_pytest_wrapper.py::test_bash_wrapper ==================================================================================================== [09:24:08.321442] INFO Deleting cert-manager [09:24:24.927569] INFO Cleaning up test environment ---------------------------------------------- generated xml file: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/reports/clustersync.xml ----------------------------------------------- ----------------------------------------- Generated html report: file:///mnt/jenkins/workspace/cloud-psmdb-operator_PR-2742/e2e-tests/reports/clustersync.html ----------------------------------------- ==================================================================================== 1 passed in 1050.57s (0:17:30) ====================================================================================