Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/logs/pitr-physical.log WARNING: version difference between client (1.33) and server (1.30) exceeds the supported minor version skew of +/-1 WARNING: version difference between client (1.33) and server (1.30) exceeds the supported minor version skew of +/-1 WARNING: version difference between client (1.33) and server (1.30) exceeds the supported minor version skew of +/-1 + main + create_infra pitr-physical-6060 + local ns=pitr-physical-6060 + [[ 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-1938/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.FlXAVKiXGq ++ mktemp + local LAST_ERR=/tmp/tmp.3JXenPWPyz + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.FlXAVKiXGq customresourcedefinition.apiextensions.k8s.io "perconaservermongodbbackups.psmdb.percona.com" deleted customresourcedefinition.apiextensions.k8s.io "perconaservermongodbrestores.psmdb.percona.com" deleted customresourcedefinition.apiextensions.k8s.io "perconaservermongodbs.psmdb.percona.com" deleted + cat /tmp/tmp.3JXenPWPyz + rm /tmp/tmp.FlXAVKiXGq /tmp/tmp.3JXenPWPyz + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/deploy/crd.yaml ++ grep -v '\-\-\-' + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + grep -v NAMESPACE + kubectl get perconaservermongodbbackups.psmdb.percona.com --all-namespaces -o wide + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' No resources found + kubectl patch perconaservermongodbbackups.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: resource(s) were provided, but no name was specified + : + kubectl_bin wait --for=delete crd perconaservermongodbbackups.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.TT4clfJDNz ++ mktemp + local LAST_ERR=/tmp/tmp.4sAKBfvLNP + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete crd perconaservermongodbbackups.psmdb.percona.com + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.TT4clfJDNz + cat /tmp/tmp.4sAKBfvLNP + rm /tmp/tmp.TT4clfJDNz /tmp/tmp.4sAKBfvLNP + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + kubectl get perconaservermongodbrestores.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbrestores.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbrestores" + kubectl patch perconaservermongodbrestores.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbrestores" + : + kubectl_bin wait --for=delete crd perconaservermongodbrestores.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.KOA8x4Yil3 ++ mktemp + local LAST_ERR=/tmp/tmp.sAW4IEEkuD + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete crd perconaservermongodbrestores.psmdb.percona.com + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.KOA8x4Yil3 + cat /tmp/tmp.sAW4IEEkuD + rm /tmp/tmp.KOA8x4Yil3 /tmp/tmp.sAW4IEEkuD + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbs" + kubectl patch perconaservermongodbs.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbs" + : + kubectl_bin wait --for=delete crd perconaservermongodbs.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.hSuvN7Y9Fe ++ mktemp + local LAST_ERR=/tmp/tmp.rUaoMUUSan + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete crd perconaservermongodbs.psmdb.percona.com + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.hSuvN7Y9Fe + cat /tmp/tmp.rUaoMUUSan + rm /tmp/tmp.hSuvN7Y9Fe /tmp/tmp.rUaoMUUSan + return 0 + local rbac_yaml=rbac.yaml + '[' -n psmdb-operator ']' + rbac_yaml=cw-rbac.yaml + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.SQnIRSlQzz ++ mktemp + local LAST_ERR=/tmp/tmp.bw7mPKUlCM + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.SQnIRSlQzz clusterrole.rbac.authorization.k8s.io "percona-server-mongodb-operator" deleted clusterrolebinding.rbac.authorization.k8s.io "service-account-percona-server-mongodb-operator" deleted + cat /tmp/tmp.bw7mPKUlCM + rm /tmp/tmp.SQnIRSlQzz /tmp/tmp.bw7mPKUlCM + return 0 + check_crd_for_deletion PR-1938-23826c20 + local git_tag=PR-1938-23826c20 ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-1938-23826c20/deploy/crd.yaml ++ yq eval .metadata.name ++ /usr/bin/sed s/---//g ++ /usr/bin/sed ':a;N;$!ba;s/\n/ /g' + for crd_name in '$(curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/${git_tag}/deploy/crd.yaml | yq eval '\''.metadata.name'\'' | $sed '\''s/---//g'\'' | $sed '\'':a;N;$!ba;s/\n/ /g'\'')' ++ kubectl_bin get crd/null -o 'jsonpath={.status.conditions[-1].type}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.riAwg70vNG +++ mktemp ++ local LAST_ERR=/tmp/tmp.y5hi8eVEth ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get crd/null -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=1 ++ set -e ++ '[' 1 '!=' 0 -a -n 1 ']' ++ cat /tmp/tmp.riAwg70vNG ++ cat /tmp/tmp.y5hi8eVEth Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 0 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get crd/null -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=1 ++ set -e ++ '[' 1 '!=' 0 -a -n 1 ']' ++ cat /tmp/tmp.riAwg70vNG ++ cat /tmp/tmp.y5hi8eVEth Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 4 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get crd/null -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=1 ++ set -e ++ '[' 1 '!=' 0 -a -n 1 ']' ++ cat /tmp/tmp.riAwg70vNG ++ cat /tmp/tmp.y5hi8eVEth Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 8 ++ cat /tmp/tmp.riAwg70vNG ++ cat /tmp/tmp.y5hi8eVEth Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.riAwg70vNG /tmp/tmp.y5hi8eVEth ++ return 1 + [[ '' == \T\e\r\m\i\n\a\t\i\n\g ]] + '[' -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 ++ sed s/NAMESPACE// ++ tail -n1 ++ awk '-F ' '{print $2}' + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ grep chaos-mesh ++ kubectl get ValidatingWebhookConfiguration ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ grep validate-auth ++ kubectl get ValidatingWebhookConfiguration ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ awk '{print $1}' ++ grep chaos-mesh ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + egrep -v '^kube-|^default|Terminating|psmdb-operator|openshift|gke-mcs|^NAME' + awk '{print$1}' + '[' -n '' ']' + desc 'cleaned up old namespaces psmdb-operator' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces psmdb-operator ----------------------------------------------------------------------------------- + kubectl_bin delete namespace psmdb-operator --ignore-not-found + kubectl_bin get ns ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.Dp2OGv5UkG + local LAST_OUT=/tmp/tmp.DrXT22mjwh ++ mktemp ++ mktemp + xargs kubectl delete ns + local LAST_ERR=/tmp/tmp.nNVSB1tgPC + local exit_status=0 + local timeout=4 + local LAST_ERR=/tmp/tmp.VwP2zvusnM + local exit_status=0 + local timeout=4 ++ seq 0 2 ++ seq 0 2 + for i in '$(seq 0 2)' + for i in '$(seq 0 2)' + set +e + set +e + kubectl get ns + kubectl delete namespace psmdb-operator --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Dp2OGv5UkG + cat /tmp/tmp.VwP2zvusnM + rm /tmp/tmp.Dp2OGv5UkG /tmp/tmp.VwP2zvusnM + return 0 namespace "gke-managed-cim" deleted namespace "gke-managed-system" deleted namespace "gmp-public" deleted namespace "gmp-system" deleted namespace "pitr-physical-24817" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.DrXT22mjwh namespace "psmdb-operator" deleted + cat /tmp/tmp.nNVSB1tgPC + rm /tmp/tmp.DrXT22mjwh /tmp/tmp.nNVSB1tgPC + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.ZrRDFnbuNp ++ mktemp + local LAST_ERR=/tmp/tmp.HHpNPRRhsa + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete namespace psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ZrRDFnbuNp + cat /tmp/tmp.HHpNPRRhsa + rm /tmp/tmp.ZrRDFnbuNp /tmp/tmp.HHpNPRRhsa + 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.Rbe54crSGI ++ mktemp + local LAST_ERR=/tmp/tmp.SOUAHLIhN6 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Rbe54crSGI namespace/psmdb-operator created + cat /tmp/tmp.SOUAHLIhN6 + rm /tmp/tmp.Rbe54crSGI /tmp/tmp.SOUAHLIhN6 + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.6IimL9HWYR +++ mktemp ++ local LAST_ERR=/tmp/tmp.fzMjU0iCpF ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl config current-context ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.6IimL9HWYR ++ cat /tmp/tmp.fzMjU0iCpF ++ rm /tmp/tmp.6IimL9HWYR /tmp/tmp.fzMjU0iCpF ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1938-23826c20-3-cluster9 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.CBD4b6Obuy ++ mktemp + local LAST_ERR=/tmp/tmp.dVVzWYWR4A + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1938-23826c20-3-cluster9 --namespace=psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.CBD4b6Obuy Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1938-23826c20-3-cluster9" modified. + cat /tmp/tmp.dVVzWYWR4A + rm /tmp/tmp.CBD4b6Obuy /tmp/tmp.dVVzWYWR4A + return 0 + deploy_operator + desc 'start PSMDB operator' + set +o xtrace ----------------------------------------------------------------------------------- start PSMDB operator ----------------------------------------------------------------------------------- + local cr_file + '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/pitr-physical/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.0H36LclFE7 ++ mktemp + local LAST_ERR=/tmp/tmp.42cu158V7q + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/deploy/crd.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.0H36LclFE7 customresourcedefinition.apiextensions.k8s.io/perconaservermongodbbackups.psmdb.percona.com serverside-applied customresourcedefinition.apiextensions.k8s.io/perconaservermongodbrestores.psmdb.percona.com serverside-applied customresourcedefinition.apiextensions.k8s.io/perconaservermongodbs.psmdb.percona.com serverside-applied + cat /tmp/tmp.42cu158V7q + rm /tmp/tmp.0H36LclFE7 /tmp/tmp.42cu158V7q + return 0 + '[' -n psmdb-operator ']' + apply_rbac cw-rbac + local operator_namespace=psmdb-operator + local rbac=cw-rbac + sed -e 's^namespace: .*^namespace: psmdb-operator^' + kubectl_bin apply -n psmdb-operator -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/deploy/cw-rbac.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.od3P3t0WFZ ++ mktemp + local LAST_ERR=/tmp/tmp.94V9ZQzI5h + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -n psmdb-operator -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.od3P3t0WFZ 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.94V9ZQzI5h + rm /tmp/tmp.od3P3t0WFZ /tmp/tmp.94V9ZQzI5h + return 0 + kubectl_bin apply -f - + yq eval ' (.spec.template.spec.containers[].image = "perconalab/percona-server-mongodb-operator:PR-1938-23826c20") | ((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") | ((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/deploy/cw-operator.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.1lx1ZU35Zn ++ mktemp + local LAST_ERR=/tmp/tmp.WFCcr7Z0ry + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.1lx1ZU35Zn deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.WFCcr7Z0ry + rm /tmp/tmp.1lx1ZU35Zn /tmp/tmp.WFCcr7Z0ry + return 0 + sleep 2 ++ 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.woffFldmU8 +++ mktemp ++ local LAST_ERR=/tmp/tmp.vlNGguYijc ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.woffFldmU8 ++ cat /tmp/tmp.vlNGguYijc ++ rm /tmp/tmp.woffFldmU8 /tmp/tmp.vlNGguYijc ++ return 0 + wait_pod percona-server-mongodb-operator-688cb5cf6c-cpm4b + local pod=percona-server-mongodb-operator-688cb5cf6c-cpm4b + set +o xtrace waiting for pod/percona-server-mongodb-operator-688cb5cf6c-cpm4b 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.xIfY7H7Cn7 +++ mktemp ++ local LAST_ERR=/tmp/tmp.bGTONb0Fl4 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.xIfY7H7Cn7 ++ cat /tmp/tmp.bGTONb0Fl4 ++ rm /tmp/tmp.xIfY7H7Cn7 /tmp/tmp.bGTONb0Fl4 ++ return 0 + kubectl_bin logs percona-server-mongodb-operator-688cb5cf6c-cpm4b ++ mktemp + local LAST_OUT=/tmp/tmp.8uxmA8OnRm ++ mktemp + local LAST_ERR=/tmp/tmp.nwophKeggk + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl logs percona-server-mongodb-operator-688cb5cf6c-cpm4b + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.8uxmA8OnRm + cat /tmp/tmp.nwophKeggk + rm /tmp/tmp.8uxmA8OnRm /tmp/tmp.nwophKeggk + return 0 2025-05-22T00:18:17.886Z INFO setup Manager starting up {"gitCommit": "23826c2013e23b0dc83348b69100d3c7104a88f2", "gitBranch": "PR-1938-23826c20", "buildTime": "", "goVersion": "go1.24.3", "os": "linux", "arch": "amd64"} + create_namespace pitr-physical-6060 + local namespace=pitr-physical-6060 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ sed s/NAMESPACE// ++ awk '-F ' '{print $2}' + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ awk '{print $1}' ++ grep chaos-mesh ++ kubectl get ValidatingWebhookConfiguration + 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 ++ awk '{print $1}' ++ grep chaos-mesh ++ kubectl get crd ++ awk '{print $1}' ++ grep chaos-mesh.org + 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 ----------------------------------------------------------------------------------- + kubectl_bin get ns + '[' -n '' ']' + desc 'cleaned up old namespaces pitr-physical-6060' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces pitr-physical-6060 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace pitr-physical-6060 --ignore-not-found ++ mktemp + xargs kubectl delete ns + local LAST_OUT=/tmp/tmp.C9BQR1yH9E + awk '{print$1}' + egrep -v '^kube-|^default|Terminating|psmdb-operator|openshift|gke-mcs|^NAME' ++ mktemp + local LAST_ERR=/tmp/tmp.ozBhilBUi3 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete namespace pitr-physical-6060 --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.7bWVmyQv8E ++ mktemp + local LAST_ERR=/tmp/tmp.xYbmVMDLoo + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl get ns + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.C9BQR1yH9E + cat /tmp/tmp.ozBhilBUi3 + rm /tmp/tmp.C9BQR1yH9E /tmp/tmp.ozBhilBUi3 + return 0 + kubectl_bin wait --for=delete namespace pitr-physical-6060 ++ mktemp + local LAST_OUT=/tmp/tmp.wYJFIIT6Gd ++ mktemp + local LAST_ERR=/tmp/tmp.S5ryBKczqC + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete namespace pitr-physical-6060 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.7bWVmyQv8E + cat /tmp/tmp.xYbmVMDLoo + rm /tmp/tmp.7bWVmyQv8E /tmp/tmp.xYbmVMDLoo + return 0 namespace "gke-managed-cim" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.wYJFIIT6Gd + cat /tmp/tmp.S5ryBKczqC + rm /tmp/tmp.wYJFIIT6Gd /tmp/tmp.S5ryBKczqC + return 0 + desc 'create namespace pitr-physical-6060' + set +o xtrace ----------------------------------------------------------------------------------- create namespace pitr-physical-6060 ----------------------------------------------------------------------------------- + kubectl_bin create namespace pitr-physical-6060 ++ mktemp + local LAST_OUT=/tmp/tmp.LTMYtnItzB ++ mktemp + local LAST_ERR=/tmp/tmp.dRBQmd67W2 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace pitr-physical-6060 namespace "gke-managed-system" deleted namespace "gmp-public" deleted namespace "gmp-system" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.LTMYtnItzB namespace/pitr-physical-6060 created + cat /tmp/tmp.dRBQmd67W2 + rm /tmp/tmp.LTMYtnItzB /tmp/tmp.dRBQmd67W2 + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.zmLBtBK0S3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.PpOslAw2Mx ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl config current-context ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.zmLBtBK0S3 ++ cat /tmp/tmp.PpOslAw2Mx ++ rm /tmp/tmp.zmLBtBK0S3 /tmp/tmp.PpOslAw2Mx ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1938-23826c20-3-cluster9 --namespace=pitr-physical-6060 ++ mktemp + local LAST_OUT=/tmp/tmp.auBRzHwIJH ++ mktemp + local LAST_ERR=/tmp/tmp.UVNtMi7pp3 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1938-23826c20-3-cluster9 --namespace=pitr-physical-6060 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.auBRzHwIJH Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1938-23826c20-3-cluster9" modified. + cat /tmp/tmp.UVNtMi7pp3 + rm /tmp/tmp.auBRzHwIJH /tmp/tmp.UVNtMi7pp3 + return 0 + deploy_minio + desc 'install Minio' + set +o xtrace ----------------------------------------------------------------------------------- install Minio ----------------------------------------------------------------------------------- + helm uninstall minio-service Error: uninstall: Release not loaded: minio-service: release: not found + : + helm repo remove minio "minio" has been removed from your repositories + helm repo add minio https://charts.min.io/ "minio" has been added to your repositories + retry 10 60 helm install minio-service --version 5.4.0 --set replicas=1 --set mode=standalone --set resources.requests.memory=256Mi --set rootUser=rootuser --set rootPassword=rootpass123 --set 'users[0].accessKey=some-access-key' --set 'users[0].secretKey=some-secret-key' --set 'users[0].policy=consoleAdmin' --set service.type=ClusterIP --set configPathmc=/tmp/.minio/ --set persistence.size=2G --set securityContext.enabled=false minio/minio + local max=10 + local delay=60 + shift 2 + local n=1 + helm install minio-service --version 5.4.0 --set replicas=1 --set mode=standalone --set resources.requests.memory=256Mi --set rootUser=rootuser --set rootPassword=rootpass123 --set 'users[0].accessKey=some-access-key' --set 'users[0].secretKey=some-secret-key' --set 'users[0].policy=consoleAdmin' --set service.type=ClusterIP --set configPathmc=/tmp/.minio/ --set persistence.size=2G --set securityContext.enabled=false minio/minio NAME: minio-service LAST DEPLOYED: Thu May 22 00:18:39 2025 NAMESPACE: pitr-physical-6060 STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: MinIO can be accessed via port 9000 on the following DNS name from within your cluster: minio-service.pitr-physical-6060.cluster.local To access MinIO from localhost, run the below commands: 1. export POD_NAME=$(kubectl get pods --namespace pitr-physical-6060 -l "release=minio-service" -o jsonpath="{.items[0].metadata.name}") 2. kubectl port-forward $POD_NAME 9000 --namespace pitr-physical-6060 Read more about port forwarding here: http://kubernetes.io/docs/user-guide/kubectl/kubectl_port-forward/ You can now access MinIO server on http://localhost:9000. Follow the below steps to connect to MinIO server with mc client: 1. Download the MinIO mc client - https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart 2. export MC_HOST_minio-service-local=http://$(kubectl get secret --namespace pitr-physical-6060 minio-service -o jsonpath="{.data.rootUser}" | base64 --decode):$(kubectl get secret --namespace pitr-physical-6060 minio-service -o jsonpath="{.data.rootPassword}" | base64 --decode)@localhost:9000 3. mc ls minio-service-local ++ kubectl_bin get pods --selector=release=minio-service -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.8sgLiqvNjm +++ mktemp ++ local LAST_ERR=/tmp/tmp.fbGI4WLWro ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=release=minio-service -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.8sgLiqvNjm ++ cat /tmp/tmp.fbGI4WLWro ++ rm /tmp/tmp.8sgLiqvNjm /tmp/tmp.fbGI4WLWro ++ return 0 + MINIO_POD=minio-service-86dfccd949-d6859 + wait_pod minio-service-86dfccd949-d6859 + local pod=minio-service-86dfccd949-d6859 + set +o xtrace waiting for pod/minio-service-86dfccd949-d6859 to be ready.OK + '[' -n psmdb-operator ']' + kubectl_bin create svc -n psmdb-operator externalname minio-service --external-name=minio-service.pitr-physical-6060.svc.cluster.local --tcp=9000 ++ mktemp + local LAST_OUT=/tmp/tmp.dN0GoxxtSD ++ mktemp + local LAST_ERR=/tmp/tmp.6BioJpA1n0 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create svc -n psmdb-operator externalname minio-service --external-name=minio-service.pitr-physical-6060.svc.cluster.local --tcp=9000 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.dN0GoxxtSD service/minio-service created + cat /tmp/tmp.6BioJpA1n0 + rm /tmp/tmp.dN0GoxxtSD /tmp/tmp.6BioJpA1n0 + return 0 + create_minio_bucket operator-testing + local bucket=operator-testing + kubectl_bin run -i --rm aws-cli --image=perconalab/awscli --restart=Never -- bash -c 'AWS_ACCESS_KEY_ID=some-access-key AWS_SECRET_ACCESS_KEY=some-secret-key AWS_DEFAULT_REGION=us-east-1 /usr/bin/aws --endpoint-url http://minio-service:9000 s3 mb s3://operator-testing' ++ mktemp + local LAST_OUT=/tmp/tmp.JYwGMYbcDw ++ mktemp + local LAST_ERR=/tmp/tmp.zXiNeA1xOg + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl run -i --rm aws-cli --image=perconalab/awscli --restart=Never -- bash -c 'AWS_ACCESS_KEY_ID=some-access-key AWS_SECRET_ACCESS_KEY=some-secret-key AWS_DEFAULT_REGION=us-east-1 /usr/bin/aws --endpoint-url http://minio-service:9000 s3 mb s3://operator-testing' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.JYwGMYbcDw make_bucket: operator-testing pod "aws-cli" deleted + cat /tmp/tmp.zXiNeA1xOg If you don't see a command prompt, try pressing enter. warning: couldn't attach to pod/aws-cli, falling back to streaming logs: Internal error occurred: unable to upgrade connection: container aws-cli not found in pod aws-cli_pitr-physical-6060 + rm /tmp/tmp.JYwGMYbcDw /tmp/tmp.zXiNeA1xOg + return 0 + desc 'create secrets and start client' + set +o xtrace ----------------------------------------------------------------------------------- create secrets and start client ----------------------------------------------------------------------------------- + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/conf/client.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/conf/minio-secret.yml ++ mktemp + local LAST_OUT=/tmp/tmp.fdXyruKbbS ++ mktemp + local LAST_ERR=/tmp/tmp.cbMpoyuwSv + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/conf/client.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/conf/minio-secret.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.fdXyruKbbS secret/some-users created deployment.apps/psmdb-client created secret/minio-secret created + cat /tmp/tmp.cbMpoyuwSv + rm /tmp/tmp.fdXyruKbbS /tmp/tmp.cbMpoyuwSv + return 0 + cluster=some-name + desc 'create first PSMDB cluster some-name' + set +o xtrace ----------------------------------------------------------------------------------- create first PSMDB cluster some-name ----------------------------------------------------------------------------------- + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/pitr-physical/conf/some-name-rs0.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/pitr-physical/conf/some-name-rs0.yml + kubectl_bin apply -f - + yq eval '(.spec | select(.image == null)).image = "perconalab/percona-server-mongodb-operator:main-mongod7.0"' + yq eval '(.spec | select(has("pmm"))).pmm.image = "perconalab/pmm-client:dev-latest"' ++ mktemp + local LAST_OUT=/tmp/tmp.7XH5ghgWhe + yq eval '.spec.upgradeOptions.apply="Never"' + yq eval '(.spec | select(has("backup"))).backup.image = "perconalab/percona-server-mongodb-operator:main-backup"' ++ mktemp + local LAST_ERR=/tmp/tmp.6kmc7QOCq9 + local exit_status=0 + local timeout=4 + yq eval '(.spec | select(has("initImage"))).initImage = "perconalab/percona-server-mongodb-operator:PR-1938-23826c20"' ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/pitr-physical/conf/some-name-rs0.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.7XH5ghgWhe perconaservermongodb.psmdb.percona.com/some-name created + cat /tmp/tmp.6kmc7QOCq9 + rm /tmp/tmp.7XH5ghgWhe /tmp/tmp.6kmc7QOCq9 + return 0 + desc 'check if all 3 Pods started' + set +o xtrace ----------------------------------------------------------------------------------- check if all 3 Pods started ----------------------------------------------------------------------------------- + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready........OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready......OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.rCgtEe1ghG +++ mktemp ++ local LAST_ERR=/tmp/tmp.c9KcEtMNhv ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.rCgtEe1ghG ++ cat /tmp/tmp.c9KcEtMNhv ++ rm /tmp/tmp.rCgtEe1ghG /tmp/tmp.c9KcEtMNhv ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready..........OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.LowrOfkqXq +++ mktemp ++ local LAST_ERR=/tmp/tmp.0jMRKvV2vt ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.LowrOfkqXq ++ cat /tmp/tmp.0jMRKvV2vt ++ rm /tmp/tmp.LowrOfkqXq /tmp/tmp.0jMRKvV2vt ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness....................................... + wait_for_running some-name-cfg 3 false + local name=some-name-cfg + let last_pod=2 + local check_cluster_readyness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=some-name ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod some-name-cfg-0 + local pod=some-name-cfg-0 + set +o xtrace waiting for pod/some-name-cfg-0 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod some-name-cfg-1 + local pod=some-name-cfg-1 + set +o xtrace waiting for pod/some-name-cfg-1 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.kPdpAIuUWI +++ mktemp ++ local LAST_ERR=/tmp/tmp.ztKoKSrNfH ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.kPdpAIuUWI ++ cat /tmp/tmp.ztKoKSrNfH ++ rm /tmp/tmp.kPdpAIuUWI /tmp/tmp.ztKoKSrNfH ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod some-name-cfg-2 + local pod=some-name-cfg-2 + set +o xtrace waiting for pod/some-name-cfg-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Fj5gKrKNSF +++ mktemp ++ local LAST_ERR=/tmp/tmp.y1fxd901L9 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.Fj5gKrKNSF ++ cat /tmp/tmp.y1fxd901L9 ++ rm /tmp/tmp.Fj5gKrKNSF /tmp/tmp.y1fxd901L9 ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ false == \t\r\u\e ]] + sleep 10 + write_initial_data + desc 'create user myApp' + set +o xtrace ----------------------------------------------------------------------------------- create user myApp ----------------------------------------------------------------------------------- + run_mongos 'db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})' userAdmin:userAdmin123456@some-name-mongos.pitr-physical-6060 + local 'command=db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})' + local uri=userAdmin:userAdmin123456@some-name-mongos.pitr-physical-6060 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.iVCDxR7W9W +++ mktemp ++ local LAST_ERR=/tmp/tmp.02Vt6hbYLN ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.iVCDxR7W9W ++ cat /tmp/tmp.02Vt6hbYLN ++ rm /tmp/tmp.iVCDxR7W9W /tmp/tmp.02Vt6hbYLN ++ return 0 + local client_container=psmdb-client-66f577db5f-tkrvs + kubectl_bin exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.ZvEzWJVt1m ++ mktemp + local LAST_ERR=/tmp/tmp.MTIXPC5LYa + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ZvEzWJVt1m Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("a32661ac-1372-4ffb-8157-b9d0d4ed0b0c") } Percona Server for MongoDB server version: v7.0.18-11 WARNING: shell and server versions do not match Successfully added user: { "user" : "myApp", "roles" : [ { "db" : "myApp", "role" : "readWrite" } ] } bye + cat /tmp/tmp.MTIXPC5LYa + rm /tmp/tmp.ZvEzWJVt1m /tmp/tmp.MTIXPC5LYa + return 0 + sleep 2 + write_document + local cmp_postfix= + local sleep_value=0 + desc 'write initial data, read from all' + set +o xtrace ----------------------------------------------------------------------------------- write initial data, read from all ----------------------------------------------------------------------------------- + run_mongos 'use myApp\n db.test.insert({ x: 100500 })' myApp:myPass@some-name-mongos.pitr-physical-6060 + local 'command=use myApp\n db.test.insert({ x: 100500 })' + local uri=myApp:myPass@some-name-mongos.pitr-physical-6060 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.CPqClf66YX +++ mktemp ++ local LAST_ERR=/tmp/tmp.QZqjk7NDEk ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.CPqClf66YX ++ cat /tmp/tmp.QZqjk7NDEk ++ rm /tmp/tmp.CPqClf66YX /tmp/tmp.QZqjk7NDEk ++ return 0 + local client_container=psmdb-client-66f577db5f-tkrvs + kubectl_bin exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.fhXqHJD3tl ++ mktemp + local LAST_ERR=/tmp/tmp.1jLbD5mPdI + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.fhXqHJD3tl Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("81456648-f4f0-45de-b32f-d18991e5cc1f") } Percona Server for MongoDB server version: v7.0.18-11 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.1jLbD5mPdI + rm /tmp/tmp.fhXqHJD3tl /tmp/tmp.1jLbD5mPdI + return 0 + sleep 0 + compare_mongos_cmd find myApp:myPass@some-name-mongos.pitr-physical-6060 + local command=find + local uri=myApp:myPass@some-name-mongos.pitr-physical-6060 + local postfix= + local suffix= + local database=myApp + local collection=test + local port=27017 + run_mongos 'use myApp\n db.test.find()' myApp:myPass@some-name-mongos.pitr-physical-6060 mongodb '' '' 27017 + local 'command=use myApp\n db.test.find()' + local uri=myApp:myPass@some-name-mongos.pitr-physical-6060 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + /usr/bin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.4osa5rqPis +++ mktemp ++ local LAST_ERR=/tmp/tmp.8pOwezBbqG ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.4osa5rqPis ++ cat /tmp/tmp.8pOwezBbqG ++ rm /tmp/tmp.4osa5rqPis /tmp/tmp.8pOwezBbqG ++ return 0 + local client_container=psmdb-client-66f577db5f-tkrvs + kubectl_bin exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.GYb536sJEW ++ mktemp + local LAST_ERR=/tmp/tmp.TRSqPxHS1i + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.GYb536sJEW + cat /tmp/tmp.TRSqPxHS1i + rm /tmp/tmp.GYb536sJEW /tmp/tmp.TRSqPxHS1i + return 0 + [[ 0 -eq 0 ]] + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/pitr-physical/compare/find.json /tmp/tmp.T2efcHzluI/find + wait_backup_agent some-name-rs0-0 + local agent_pod=some-name-rs0-0 + set +o xtrace waiting for pbm-agent to be ready in some-name-rs0-0...2025-05-22T00:22:24.000+0000 I listening for the commands + wait_backup_agent some-name-rs0-1 + local agent_pod=some-name-rs0-1 + set +o xtrace waiting for pbm-agent to be ready in some-name-rs0-1...2025-05-22T00:22:23.000+0000 I listening for the commands + wait_backup_agent some-name-rs0-2 + local agent_pod=some-name-rs0-2 + set +o xtrace waiting for pbm-agent to be ready in some-name-rs0-2...2025-05-22T00:22:24.000+0000 I listening for the commands + wait_backup_agent some-name-rs1-0 + local agent_pod=some-name-rs1-0 + set +o xtrace waiting for pbm-agent to be ready in some-name-rs1-0...2025-05-22T00:22:21.000+0000 I listening for the commands + wait_backup_agent some-name-rs1-1 + local agent_pod=some-name-rs1-1 + set +o xtrace waiting for pbm-agent to be ready in some-name-rs1-1...2025-05-22T00:22:24.000+0000 I listening for the commands + wait_backup_agent some-name-rs1-2 + local agent_pod=some-name-rs1-2 + set +o xtrace waiting for pbm-agent to be ready in some-name-rs1-2...2025-05-22T00:22:20.000+0000 I listening for the commands + wait_backup_agent some-name-rs2-0 + local agent_pod=some-name-rs2-0 + set +o xtrace waiting for pbm-agent to be ready in some-name-rs2-0...2025-05-22T00:22:24.000+0000 I listening for the commands + wait_backup_agent some-name-rs2-1 + local agent_pod=some-name-rs2-1 + set +o xtrace waiting for pbm-agent to be ready in some-name-rs2-1...2025-05-22T00:22:24.000+0000 I listening for the commands + wait_backup_agent some-name-rs2-2 + local agent_pod=some-name-rs2-2 + set +o xtrace waiting for pbm-agent to be ready in some-name-rs2-2...2025-05-22T00:22:22.000+0000 I listening for the commands + echo 'Sleeping for 360 seconds' Sleeping for 360 seconds + sleep 360 + backup_name_minio=backup-minio + run_backup backup-minio 2 physical + local name=backup-minio + local idx=2 + local type=physical + desc 'run backup backup-minio-2' + set +o xtrace ----------------------------------------------------------------------------------- run backup backup-minio-2 ----------------------------------------------------------------------------------- + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/pitr-physical/conf/backup-minio.yml + /usr/bin/sed -e 's/name:/name: backup-minio-2/' + /usr/bin/sed -e 's/type:/type: physical/' + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.0be1EFJ3u5 ++ mktemp + local LAST_ERR=/tmp/tmp.uRL7LWJYmy + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.0be1EFJ3u5 perconaservermongodbbackup.psmdb.percona.com/backup-minio-2 created + cat /tmp/tmp.uRL7LWJYmy + rm /tmp/tmp.0be1EFJ3u5 /tmp/tmp.uRL7LWJYmy + return 0 + wait_backup backup-minio-2 + local backup_name=backup-minio-2 + local target_state=ready + set +o xtrace waiting for backup-minio-2 to reach ready state........ + sleep 5 + write_document -2nd 120 + local cmp_postfix=-2nd + local sleep_value=120 + desc 'write initial data, read from all' + set +o xtrace ----------------------------------------------------------------------------------- write initial data, read from all ----------------------------------------------------------------------------------- + run_mongos 'use myApp\n db.test.insert({ x: 100500 })' myApp:myPass@some-name-mongos.pitr-physical-6060 + local 'command=use myApp\n db.test.insert({ x: 100500 })' + local uri=myApp:myPass@some-name-mongos.pitr-physical-6060 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.eX4kqzDARn +++ mktemp ++ local LAST_ERR=/tmp/tmp.kspQ8JQ7V2 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.eX4kqzDARn ++ cat /tmp/tmp.kspQ8JQ7V2 ++ rm /tmp/tmp.eX4kqzDARn /tmp/tmp.kspQ8JQ7V2 ++ return 0 + local client_container=psmdb-client-66f577db5f-tkrvs + kubectl_bin exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.gFm5FoWAAD ++ mktemp + local LAST_ERR=/tmp/tmp.s7i6SwozdM + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.gFm5FoWAAD Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("25e8045e-9b7f-41ce-b458-4a28d473d4ef") } Percona Server for MongoDB server version: v7.0.18-11 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.s7i6SwozdM + rm /tmp/tmp.gFm5FoWAAD /tmp/tmp.s7i6SwozdM + return 0 + sleep 120 + compare_mongos_cmd find myApp:myPass@some-name-mongos.pitr-physical-6060 -2nd + local command=find + local uri=myApp:myPass@some-name-mongos.pitr-physical-6060 + local postfix=-2nd + local suffix= + local database=myApp + local collection=test + local port=27017 + run_mongos 'use myApp\n db.test.find()' myApp:myPass@some-name-mongos.pitr-physical-6060 mongodb '' '' 27017 + local 'command=use myApp\n db.test.find()' + local uri=myApp:myPass@some-name-mongos.pitr-physical-6060 + local driver=mongodb + egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + /usr/bin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.I1v4kDPgNG +++ mktemp ++ local LAST_ERR=/tmp/tmp.W160GFI4Rm ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.I1v4kDPgNG ++ cat /tmp/tmp.W160GFI4Rm ++ rm /tmp/tmp.I1v4kDPgNG /tmp/tmp.W160GFI4Rm ++ return 0 + local client_container=psmdb-client-66f577db5f-tkrvs + kubectl_bin exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.qNrjnQGEsf ++ mktemp + local LAST_ERR=/tmp/tmp.yQZ1L0vgyL + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.qNrjnQGEsf + cat /tmp/tmp.yQZ1L0vgyL + rm /tmp/tmp.qNrjnQGEsf /tmp/tmp.yQZ1L0vgyL + return 0 + [[ 0 -eq 0 ]] + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/pitr-physical/compare/find-2nd.json /tmp/tmp.T2efcHzluI/find-2nd ++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json ++ jq '.backups.snapshot[0].restoreTo' +++ mktemp ++ local LAST_OUT=/tmp/tmp.4edJn0i8bi +++ mktemp ++ local LAST_ERR=/tmp/tmp.ZP4jOg1hg2 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.4edJn0i8bi ++ cat /tmp/tmp.ZP4jOg1hg2 ++ rm /tmp/tmp.4edJn0i8bi /tmp/tmp.ZP4jOg1hg2 ++ return 0 + backup_last_write=1747873746 ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.hs022Sn46j ++++ mktemp +++ local LAST_ERR=/tmp/tmp.pnVgGaNSRb +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.hs022Sn46j +++ cat /tmp/tmp.pnVgGaNSRb +++ rm /tmp/tmp.hs022Sn46j /tmp/tmp.pnVgGaNSRb +++ return 0 ++ echo null + last_chunk=null + retries=0 + [[ null -gt 1747873746 ]] + [[ 0 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.R29aXF3tBl ++++ mktemp +++ local LAST_ERR=/tmp/tmp.nNTaRn0zW4 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.R29aXF3tBl +++ cat /tmp/tmp.nNTaRn0zW4 +++ rm /tmp/tmp.R29aXF3tBl /tmp/tmp.nNTaRn0zW4 +++ return 0 ++ echo null + last_chunk=null + retries=1 ++ format_date null ++ local timestamp=null +++ TZ=UTC +++ /usr/bin/date -d@null '+%Y-%m-%d %H:%M:%S' /usr/bin/date: invalid date ‘@null’ ++ echo ++ format_date 1747873746 ++ local timestamp=1747873746 +++ TZ=UTC +++ /usr/bin/date -d@1747873746 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:29:06 + echo 'Waiting for last oplog chunk () to be greater than last write (2025-05-22 00:29:06)' Waiting for last oplog chunk () to be greater than last write (2025-05-22 00:29:06) + sleep 10 + [[ null -gt 1747873746 ]] + [[ 1 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.EiGiKr2Wpa ++++ mktemp +++ local LAST_ERR=/tmp/tmp.HPtkfIHVFr +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.EiGiKr2Wpa +++ cat /tmp/tmp.HPtkfIHVFr +++ rm /tmp/tmp.EiGiKr2Wpa /tmp/tmp.HPtkfIHVFr +++ return 0 ++ echo null + last_chunk=null + retries=2 ++ format_date null ++ local timestamp=null +++ TZ=UTC +++ /usr/bin/date -d@null '+%Y-%m-%d %H:%M:%S' /usr/bin/date: invalid date ‘@null’ ++ echo ++ format_date 1747873746 ++ local timestamp=1747873746 +++ TZ=UTC +++ /usr/bin/date -d@1747873746 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:29:06 + echo 'Waiting for last oplog chunk () to be greater than last write (2025-05-22 00:29:06)' Waiting for last oplog chunk () to be greater than last write (2025-05-22 00:29:06) + sleep 10 + [[ null -gt 1747873746 ]] + [[ 2 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.qh4QCvEElD ++++ mktemp +++ local LAST_ERR=/tmp/tmp.ljfFQqML70 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.qh4QCvEElD +++ cat /tmp/tmp.ljfFQqML70 +++ rm /tmp/tmp.qh4QCvEElD /tmp/tmp.ljfFQqML70 +++ return 0 ++ echo 1747873899 + last_chunk=1747873899 + retries=3 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 ++ format_date 1747873746 ++ local timestamp=1747873746 +++ TZ=UTC +++ /usr/bin/date -d@1747873746 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:29:06 + echo 'Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than last write (2025-05-22 00:29:06)' Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than last write (2025-05-22 00:29:06) + sleep 10 + [[ 1747873899 -gt 1747873746 ]] + sleep 10 + check_recovery backup-minio-2 date 1747873899 -2nd some-name + local backup_name=backup-minio-2 + local restore_type=date + local restore_date=1747873899 + local cmp_postfix=-2nd + local cluster_name=some-name + local backupSource= ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.URgk8OjrUH ++++ mktemp +++ local LAST_ERR=/tmp/tmp.WAiFBd0W8H +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.URgk8OjrUH +++ cat /tmp/tmp.WAiFBd0W8H +++ rm /tmp/tmp.URgk8OjrUH /tmp/tmp.WAiFBd0W8H +++ return 0 ++ echo 1747873899 + local latest_ts=1747873899 + desc 'write more data before restore by date' + set +o xtrace ----------------------------------------------------------------------------------- write more data before restore by date ----------------------------------------------------------------------------------- + run_mongos 'use myApp\n db.test.insert({ x: 100501 })' myApp:myPass@some-name-mongos.pitr-physical-6060 + local 'command=use myApp\n db.test.insert({ x: 100501 })' + local uri=myApp:myPass@some-name-mongos.pitr-physical-6060 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.X1JcUg4AZ9 +++ mktemp ++ local LAST_ERR=/tmp/tmp.JzQq8w7cqn ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.X1JcUg4AZ9 ++ cat /tmp/tmp.JzQq8w7cqn ++ rm /tmp/tmp.X1JcUg4AZ9 /tmp/tmp.JzQq8w7cqn ++ return 0 + local client_container=psmdb-client-66f577db5f-tkrvs + kubectl_bin exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100501 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.misiARqZfm ++ mktemp + local LAST_ERR=/tmp/tmp.LcC54p3FkQ + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100501 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.misiARqZfm Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("fda84ad5-9132-4f43-891f-4fcdfabb5233") } Percona Server for MongoDB server version: v7.0.18-11 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.LcC54p3FkQ + rm /tmp/tmp.misiARqZfm /tmp/tmp.LcC54p3FkQ + return 0 + [[ -n 1747873899 ]] ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 + desc 'Restoring to time 2025-05-22 00:31:39' + set +o xtrace ----------------------------------------------------------------------------------- Restoring to time 2025-05-22 00:31:39 ----------------------------------------------------------------------------------- + retries=0 + [[ 1747873899 -gt 1747873899 ]] + [[ 0 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.XLxEFXVGRr ++++ mktemp +++ local LAST_ERR=/tmp/tmp.5BcLlNzOq8 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.XLxEFXVGRr +++ cat /tmp/tmp.5BcLlNzOq8 +++ rm /tmp/tmp.XLxEFXVGRr /tmp/tmp.5BcLlNzOq8 +++ return 0 ++ echo 1747873899 + latest_ts=1747873899 + retries=1 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 + echo 'Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39)' Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39) + sleep 10 + [[ 1747873899 -gt 1747873899 ]] + [[ 1 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.UKxeJdfiJD ++++ mktemp +++ local LAST_ERR=/tmp/tmp.HL1jod9Gyy +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.UKxeJdfiJD +++ cat /tmp/tmp.HL1jod9Gyy +++ rm /tmp/tmp.UKxeJdfiJD /tmp/tmp.HL1jod9Gyy +++ return 0 ++ echo 1747873899 + latest_ts=1747873899 + retries=2 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 + echo 'Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39)' Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39) + sleep 10 + [[ 1747873899 -gt 1747873899 ]] + [[ 2 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.M0EJe4K3q6 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.c51ZbkjivP +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.M0EJe4K3q6 +++ cat /tmp/tmp.c51ZbkjivP +++ rm /tmp/tmp.M0EJe4K3q6 /tmp/tmp.c51ZbkjivP +++ return 0 ++ echo 1747873899 + latest_ts=1747873899 + retries=3 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 + echo 'Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39)' Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39) + sleep 10 + [[ 1747873899 -gt 1747873899 ]] + [[ 3 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json ++++ mktemp +++ local LAST_OUT=/tmp/tmp.TggCNL1ROx ++++ mktemp +++ local LAST_ERR=/tmp/tmp.rKEmpIF0h9 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.TggCNL1ROx +++ cat /tmp/tmp.rKEmpIF0h9 +++ rm /tmp/tmp.TggCNL1ROx /tmp/tmp.rKEmpIF0h9 +++ return 0 ++ echo 1747873899 + latest_ts=1747873899 + retries=4 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 + echo 'Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39)' Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39) + sleep 10 + [[ 1747873899 -gt 1747873899 ]] + [[ 4 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.vDkJi3xdYt ++++ mktemp +++ local LAST_ERR=/tmp/tmp.GKOGG4mx9K +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.vDkJi3xdYt +++ cat /tmp/tmp.GKOGG4mx9K +++ rm /tmp/tmp.vDkJi3xdYt /tmp/tmp.GKOGG4mx9K +++ return 0 ++ echo 1747873899 + latest_ts=1747873899 + retries=5 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 + echo 'Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39)' Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39) + sleep 10 + [[ 1747873899 -gt 1747873899 ]] + [[ 5 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.QWqtcSivSn ++++ mktemp +++ local LAST_ERR=/tmp/tmp.KzwwWD6uVk +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.QWqtcSivSn +++ cat /tmp/tmp.KzwwWD6uVk +++ rm /tmp/tmp.QWqtcSivSn /tmp/tmp.KzwwWD6uVk +++ return 0 ++ echo 1747873899 + latest_ts=1747873899 + retries=6 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 + echo 'Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39)' Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39) + sleep 10 + [[ 1747873899 -gt 1747873899 ]] + [[ 6 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.vOkwG4aUHP ++++ mktemp +++ local LAST_ERR=/tmp/tmp.6f7JhC1vQY +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.vOkwG4aUHP +++ cat /tmp/tmp.6f7JhC1vQY +++ rm /tmp/tmp.vOkwG4aUHP /tmp/tmp.6f7JhC1vQY +++ return 0 ++ echo 1747873899 + latest_ts=1747873899 + retries=7 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 + echo 'Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39)' Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39) + sleep 10 + [[ 1747873899 -gt 1747873899 ]] + [[ 7 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.BoW5wXbcsS ++++ mktemp +++ local LAST_ERR=/tmp/tmp.382jsabYPq +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.BoW5wXbcsS +++ cat /tmp/tmp.382jsabYPq +++ rm /tmp/tmp.BoW5wXbcsS /tmp/tmp.382jsabYPq +++ return 0 ++ echo 1747873899 + latest_ts=1747873899 + retries=8 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 + echo 'Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39)' Waiting for last oplog chunk (2025-05-22 00:31:39) to be greater than restore target (2025-05-22 00:31:39) + sleep 10 + [[ 1747873899 -gt 1747873899 ]] + [[ 8 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.RQX47M0yIV ++++ mktemp +++ local LAST_ERR=/tmp/tmp.OmXv26FsT1 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.RQX47M0yIV +++ cat /tmp/tmp.OmXv26FsT1 +++ rm /tmp/tmp.RQX47M0yIV /tmp/tmp.OmXv26FsT1 +++ return 0 ++ echo 1747874025 + latest_ts=1747874025 + retries=9 ++ format_date 1747874025 ++ local timestamp=1747874025 +++ TZ=UTC +++ /usr/bin/date -d@1747874025 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:33:45 ++ format_date 1747873899 ++ local timestamp=1747873899 +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:31:39 + echo 'Waiting for last oplog chunk (2025-05-22 00:33:45) to be greater than restore target (2025-05-22 00:31:39)' Waiting for last oplog chunk (2025-05-22 00:33:45) to be greater than restore target (2025-05-22 00:31:39) + sleep 10 + [[ 1747874025 -gt 1747873899 ]] + '[' -z '' ']' + desc 'check restore by date' + set +o xtrace ----------------------------------------------------------------------------------- check restore by date ----------------------------------------------------------------------------------- + kubectl_bin apply -f - + '[' -z 1747873899 ']' + /usr/bin/sed -e 's/backupName:/backupName: backup-minio-2/' + /usr/bin/sed -e /backupSource/,+8d + /usr/bin/sed -e 's/name:/name: restore-backup-minio-2/' + /usr/bin/sed -e 's/pitrType:/type: date/' ++ format_date 1747873899 ++ local timestamp=1747873899 + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/pitr-physical/conf/restore.yml +++ TZ=UTC +++ /usr/bin/date -d@1747873899 '+%Y-%m-%d %H:%M:%S' ++ mktemp ++ echo 2025-05-22 00:31:39 + /usr/bin/sed -e 's/date:/date: 2025-05-22 00:31:39/' + local LAST_OUT=/tmp/tmp.4IU5e3h2VS ++ mktemp + local LAST_ERR=/tmp/tmp.pSd7Jzdo3I + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.4IU5e3h2VS perconaservermongodbrestore.psmdb.percona.com/restore-backup-minio-2 created + cat /tmp/tmp.pSd7Jzdo3I + rm /tmp/tmp.4IU5e3h2VS /tmp/tmp.pSd7Jzdo3I + return 0 + wait_restore backup-minio-2 some-name requested 0 900 + local backup_name=backup-minio-2 + local cluster_name=some-name + local target_state=requested + local wait_cluster_consistency=0 + local wait_time=900 + local ok_if_ready=0 + set +o xtrace Waiting for the psmdb-restore/restore-backup-minio-2 object to be createdOK Waiting psmdb-restore/restore-backup-minio-2 to reach state "requested" .............OK + [[ 0 -eq 1 ]] + echo + wait_restore backup-minio-2 some-name ready 0 1600 + local backup_name=backup-minio-2 + local cluster_name=some-name + local target_state=ready + local wait_cluster_consistency=0 + local wait_time=1600 + local ok_if_ready=0 + set +o xtrace Waiting for the psmdb-restore/restore-backup-minio-2 object to be createdOK Waiting psmdb-restore/restore-backup-minio-2 to reach state "ready" ..OK + [[ 0 -eq 1 ]] + echo + set -o xtrace + wait_for_running some-name-mongos 3 + local name=some-name-mongos + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=mongos + local cluster_name=some-name ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod some-name-mongos-0 + local pod=some-name-mongos-0 + set +o xtrace waiting for pod/some-name-mongos-0 to be ready.....................OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod some-name-mongos-1 + local pod=some-name-mongos-1 + set +o xtrace waiting for pod/some-name-mongos-1 to be ready........OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.UoxWFPOKu3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.VdlJ3DX38e ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.UoxWFPOKu3 ++ cat /tmp/tmp.VdlJ3DX38e ++ rm /tmp/tmp.UoxWFPOKu3 /tmp/tmp.VdlJ3DX38e ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod some-name-mongos-2 + local pod=some-name-mongos-2 + set +o xtrace waiting for pod/some-name-mongos-2 to be ready......OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.GO6IweHv8Y +++ mktemp ++ local LAST_ERR=/tmp/tmp.nchnT2Z9WA ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.GO6IweHv8Y ++ cat /tmp/tmp.nchnT2Z9WA ++ rm /tmp/tmp.GO6IweHv8Y /tmp/tmp.nchnT2Z9WA ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness + sleep 10 + compare_mongos_cmd find myApp:myPass@some-name-mongos.pitr-physical-6060 -2nd + local command=find + local uri=myApp:myPass@some-name-mongos.pitr-physical-6060 + local postfix=-2nd + local suffix= + local database=myApp + local collection=test + local port=27017 + run_mongos 'use myApp\n db.test.find()' myApp:myPass@some-name-mongos.pitr-physical-6060 mongodb '' '' 27017 + egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + local 'command=use myApp\n db.test.find()' + local uri=myApp:myPass@some-name-mongos.pitr-physical-6060 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + /usr/bin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.fInHEvL8oi +++ mktemp ++ local LAST_ERR=/tmp/tmp.IuckEVbZJF ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.fInHEvL8oi ++ cat /tmp/tmp.IuckEVbZJF ++ rm /tmp/tmp.fInHEvL8oi /tmp/tmp.IuckEVbZJF ++ return 0 + local client_container=psmdb-client-66f577db5f-tkrvs + kubectl_bin exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.Qh9leQPFch ++ mktemp + local LAST_ERR=/tmp/tmp.XEWcfGwrcQ + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Qh9leQPFch + cat /tmp/tmp.XEWcfGwrcQ + rm /tmp/tmp.Qh9leQPFch /tmp/tmp.XEWcfGwrcQ + return 0 + [[ 0 -eq 0 ]] + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/pitr-physical/compare/find-2nd.json /tmp/tmp.T2efcHzluI/find-2nd + run_backup backup-minio 3 physical + local name=backup-minio + local idx=3 + local type=physical + desc 'run backup backup-minio-3' + set +o xtrace ----------------------------------------------------------------------------------- run backup backup-minio-3 ----------------------------------------------------------------------------------- + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/pitr-physical/conf/backup-minio.yml + /usr/bin/sed -e 's/name:/name: backup-minio-3/' + kubectl_bin apply -f - + /usr/bin/sed -e 's/type:/type: physical/' ++ mktemp + local LAST_OUT=/tmp/tmp.FC5AmNiNFl ++ mktemp + local LAST_ERR=/tmp/tmp.zGeim3FEkL + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.FC5AmNiNFl perconaservermongodbbackup.psmdb.percona.com/backup-minio-3 created + cat /tmp/tmp.zGeim3FEkL + rm /tmp/tmp.FC5AmNiNFl /tmp/tmp.zGeim3FEkL + return 0 + wait_backup backup-minio-3 + local backup_name=backup-minio-3 + local target_state=ready + set +o xtrace waiting for backup-minio-3 to reach ready state........... + sleep 5 + compare_latest_restorable_time some-name-rs0 backup-minio-3 + local cluster=some-name-rs0 + local backup_name=backup-minio-3 + local latest_restorable_time + local backup_time ++ get_latest_restorable_time some-name-rs0 ++ local cluster=some-name-rs0 ++ local first_timestamp ++ local second_timestamp ++ local retry=0 ++ [[ '' != '' ]] +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.HHGS6dmwnH ++++ mktemp +++ local LAST_ERR=/tmp/tmp.thXVkC9Nor +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.HHGS6dmwnH +++ cat /tmp/tmp.thXVkC9Nor +++ rm /tmp/tmp.HHGS6dmwnH /tmp/tmp.thXVkC9Nor +++ return 0 ++ first_timestamp=1747874109 ++ sleep 5 ++ [[ 1747874109 != '' ]] ++ [[ 1747874109 != \n\u\l\l ]] +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.ykSQnUf8qz ++++ mktemp +++ local LAST_ERR=/tmp/tmp.jspaxWMA7x +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.ykSQnUf8qz +++ cat /tmp/tmp.jspaxWMA7x +++ rm /tmp/tmp.ykSQnUf8qz /tmp/tmp.jspaxWMA7x +++ return 0 ++ second_timestamp=1747874109 ++ let retry+=1 ++ [[ 1 -gt 30 ]] ++ [[ 1747874109 != '' ]] ++ [[ 1747874109 != \n\u\l\l ]] ++ [[ 1747874109 == 1747874109 ]] ++ /usr/bin/date -u -d @1747874109 +%Y-%m-%dT%H:%M:%SZ + latest_restorable_time=2025-05-22T00:35:09Z ++ get_latest_restorable_time_from_backup_object backup-minio-3 ++ local backup_name=backup-minio-3 ++ local latestRestorableTime ++ local retry=0 ++ [[ '' != '' ]] ++ sleep 5 +++ kubectl_bin get psmdb-backup backup-minio-3 -o 'jsonpath={.status.latestRestorableTime}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.XadKUCdLlc ++++ mktemp +++ local LAST_ERR=/tmp/tmp.ETcrplG7u7 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl get psmdb-backup backup-minio-3 -o 'jsonpath={.status.latestRestorableTime}' +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.XadKUCdLlc +++ cat /tmp/tmp.ETcrplG7u7 +++ rm /tmp/tmp.XadKUCdLlc /tmp/tmp.ETcrplG7u7 +++ return 0 ++ latestRestorableTime=2025-05-22T00:35:09Z ++ let retry+=1 ++ [[ 1 -gt 30 ]] ++ [[ 2025-05-22T00:35:09Z != '' ]] ++ [[ 2025-05-22T00:35:09Z != \n\u\l\l ]] ++ echo 2025-05-22T00:35:09Z + backup_time=2025-05-22T00:35:09Z + [[ 2025-05-22T00:35:09Z != \2\0\2\5\-\0\5\-\2\2\T\0\0\:\3\5\:\0\9\Z ]] + check_recovery backup-minio-3 latest '' -3rd some-name + local backup_name=backup-minio-3 + local restore_type=latest + local restore_date= + local cmp_postfix=-3rd + local cluster_name=some-name + local backupSource= ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.AWq17tyO8o ++++ mktemp +++ local LAST_ERR=/tmp/tmp.VGwyiACpxS +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.AWq17tyO8o +++ cat /tmp/tmp.VGwyiACpxS +++ rm /tmp/tmp.AWq17tyO8o /tmp/tmp.VGwyiACpxS +++ return 0 ++ echo 1747874109 + local latest_ts=1747874109 + desc 'write more data before restore by latest' + set +o xtrace ----------------------------------------------------------------------------------- write more data before restore by latest ----------------------------------------------------------------------------------- + run_mongos 'use myApp\n db.test.insert({ x: 100501 })' myApp:myPass@some-name-mongos.pitr-physical-6060 + local 'command=use myApp\n db.test.insert({ x: 100501 })' + local uri=myApp:myPass@some-name-mongos.pitr-physical-6060 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.3ESBi6yUdZ +++ mktemp ++ local LAST_ERR=/tmp/tmp.264R2zDzxO ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.3ESBi6yUdZ ++ cat /tmp/tmp.264R2zDzxO ++ rm /tmp/tmp.3ESBi6yUdZ /tmp/tmp.264R2zDzxO ++ return 0 + local client_container=psmdb-client-66f577db5f-tkrvs + kubectl_bin exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100501 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.cbKu21mRHS ++ mktemp + local LAST_ERR=/tmp/tmp.ESngSHniaR + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-66f577db5f-tkrvs -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100501 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.cbKu21mRHS Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.pitr-physical-6060.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("6441b08b-4a70-4b30-873f-b5015fe570dd") } Percona Server for MongoDB server version: v7.0.18-11 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.ESngSHniaR + rm /tmp/tmp.cbKu21mRHS /tmp/tmp.ESngSHniaR + return 0 + [[ -n '' ]] + desc 'Restoring to latest' + set +o xtrace ----------------------------------------------------------------------------------- Restoring to latest ----------------------------------------------------------------------------------- ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.eXWrA0nMT9 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.Aq3FyZnnk5 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.eXWrA0nMT9 +++ cat /tmp/tmp.Aq3FyZnnk5 +++ rm /tmp/tmp.eXWrA0nMT9 /tmp/tmp.Aq3FyZnnk5 +++ return 0 ++ echo 1747874109 + local current_ts=1747874109 + retries=0 + [[ 1747874109 -gt 1747874109 ]] + [[ 0 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.Q2NzcT2gEx ++++ mktemp +++ local LAST_ERR=/tmp/tmp.oEKvB536u2 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.Q2NzcT2gEx +++ cat /tmp/tmp.oEKvB536u2 +++ rm /tmp/tmp.Q2NzcT2gEx /tmp/tmp.oEKvB536u2 +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=1 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 1 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.4tsULwaC4S ++++ mktemp +++ local LAST_ERR=/tmp/tmp.JsUY4IcSd2 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.4tsULwaC4S +++ cat /tmp/tmp.JsUY4IcSd2 +++ rm /tmp/tmp.4tsULwaC4S /tmp/tmp.JsUY4IcSd2 +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=2 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 2 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.WdNdi0UwuZ ++++ mktemp +++ local LAST_ERR=/tmp/tmp.jmrIHNZOfq +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.WdNdi0UwuZ +++ cat /tmp/tmp.jmrIHNZOfq +++ rm /tmp/tmp.WdNdi0UwuZ /tmp/tmp.jmrIHNZOfq +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=3 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 3 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.3rPfhXLfFM ++++ mktemp +++ local LAST_ERR=/tmp/tmp.LRc4SXKqv3 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.3rPfhXLfFM +++ cat /tmp/tmp.LRc4SXKqv3 +++ rm /tmp/tmp.3rPfhXLfFM /tmp/tmp.LRc4SXKqv3 +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=4 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 4 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.OlsUZqEwAM ++++ mktemp +++ local LAST_ERR=/tmp/tmp.ceoY9pfKYz +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.OlsUZqEwAM +++ cat /tmp/tmp.ceoY9pfKYz +++ rm /tmp/tmp.OlsUZqEwAM /tmp/tmp.ceoY9pfKYz +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=5 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 5 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.FQVXKCcRt3 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.76hORVDwzD +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.FQVXKCcRt3 +++ cat /tmp/tmp.76hORVDwzD +++ rm /tmp/tmp.FQVXKCcRt3 /tmp/tmp.76hORVDwzD +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=6 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 6 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.UKM54eSlNv ++++ mktemp +++ local LAST_ERR=/tmp/tmp.iXfUsgjwtg +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.UKM54eSlNv +++ cat /tmp/tmp.iXfUsgjwtg +++ rm /tmp/tmp.UKM54eSlNv /tmp/tmp.iXfUsgjwtg +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=7 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 7 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.wqnwn0W74b ++++ mktemp +++ local LAST_ERR=/tmp/tmp.GPZ41b8lhs +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.wqnwn0W74b +++ cat /tmp/tmp.GPZ41b8lhs +++ rm /tmp/tmp.wqnwn0W74b /tmp/tmp.GPZ41b8lhs +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=8 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 8 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.tFLBG011sC ++++ mktemp +++ local LAST_ERR=/tmp/tmp.7imZe4sG60 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.tFLBG011sC +++ cat /tmp/tmp.7imZe4sG60 +++ rm /tmp/tmp.tFLBG011sC /tmp/tmp.7imZe4sG60 +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=9 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 9 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.oxHVGEDgFJ ++++ mktemp +++ local LAST_ERR=/tmp/tmp.DfBssDwCVf +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.oxHVGEDgFJ +++ cat /tmp/tmp.DfBssDwCVf +++ rm /tmp/tmp.oxHVGEDgFJ /tmp/tmp.DfBssDwCVf +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=10 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 10 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.v0vBTEJAxo ++++ mktemp +++ local LAST_ERR=/tmp/tmp.2MUN9ZinzJ +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.v0vBTEJAxo +++ cat /tmp/tmp.2MUN9ZinzJ +++ rm /tmp/tmp.v0vBTEJAxo /tmp/tmp.2MUN9ZinzJ +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=11 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 11 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.FzuBf4ATEF ++++ mktemp +++ local LAST_ERR=/tmp/tmp.B0tvllwrc5 +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.FzuBf4ATEF +++ cat /tmp/tmp.B0tvllwrc5 +++ rm /tmp/tmp.FzuBf4ATEF /tmp/tmp.B0tvllwrc5 +++ return 0 ++ echo 1747874109 + latest_ts=1747874109 + retries=12 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:35:09) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747874109 -gt 1747874109 ]] + [[ 12 -gt 30 ]] ++ get_latest_oplog_chunk_ts some-name ++ local cluster=some-name +++ kubectl_bin exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ jq '.backups.pitrChunks.pitrChunks | last | .range.end' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.8nAaATDuQn ++++ mktemp +++ local LAST_ERR=/tmp/tmp.L7LqDj27sg +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec some-name-rs0-0 -c backup-agent -- pbm status -o json +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.8nAaATDuQn +++ cat /tmp/tmp.L7LqDj27sg +++ rm /tmp/tmp.8nAaATDuQn /tmp/tmp.L7LqDj27sg +++ return 0 ++ echo 1747875418 + latest_ts=1747875418 + retries=13 ++ format_date 1747875418 ++ local timestamp=1747875418 +++ TZ=UTC +++ /usr/bin/date -d@1747875418 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:56:58 ++ format_date 1747874109 ++ local timestamp=1747874109 +++ TZ=UTC +++ /usr/bin/date -d@1747874109 '+%Y-%m-%d %H:%M:%S' ++ echo 2025-05-22 00:35:09 + echo 'Waiting for last oplog chunk (2025-05-22 00:56:58) to be 120 seconds older than starting chunk (2025-05-22 00:35:09)' Waiting for last oplog chunk (2025-05-22 00:56:58) to be 120 seconds older than starting chunk (2025-05-22 00:35:09) + sleep 10 + [[ 1747875418 -gt 1747874109 ]] + '[' -z '' ']' + desc 'check restore by latest' + set +o xtrace ----------------------------------------------------------------------------------- check restore by latest ----------------------------------------------------------------------------------- + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1938/e2e-tests/pitr-physical/conf/restore.yml + /usr/bin/sed -e 's/backupName:/backupName: backup-minio-3/' + /usr/bin/sed -e /backupSource/,+8d + '[' -z '' ']' + /usr/bin/sed -e /date:/d + /usr/bin/sed -e 's/name:/name: restore-backup-minio-3/' + /usr/bin/sed -e 's/pitrType:/type: latest/' + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.2zGv6BttVB ++ mktemp + local LAST_ERR=/tmp/tmp.rSOOzuLyST + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.2zGv6BttVB perconaservermongodbrestore.psmdb.percona.com/restore-backup-minio-3 created + cat /tmp/tmp.rSOOzuLyST + rm /tmp/tmp.2zGv6BttVB /tmp/tmp.rSOOzuLyST + return 0 + wait_restore backup-minio-3 some-name requested 0 900 + local backup_name=backup-minio-3 + local cluster_name=some-name + local target_state=requested + local wait_cluster_consistency=0 + local wait_time=900 + local ok_if_ready=0 + set +o xtrace Waiting for the psmdb-restore/restore-backup-minio-3 object to be createdOK Waiting psmdb-restore/restore-backup-minio-3 to reach state "requested" ............