Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/logs/pitr-physical.log WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 + main + create_infra pitr-physical-16638 + local ns=pitr-physical-16638 + 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-1537/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.ISRfXL0jot ++ mktemp + local LAST_ERR=/tmp/tmp.vfVsDG5wBX + 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-1537/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ISRfXL0jot 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.vfVsDG5wBX + rm /tmp/tmp.ISRfXL0jot /tmp/tmp.vfVsDG5wBX + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/deploy/crd.yaml ++ grep -v '\-\-\-' + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + kubectl get perconaservermongodbbackups.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbbackups" + kubectl patch perconaservermongodbbackups.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbbackups" + : + kubectl_bin wait --for=delete crd perconaservermongodbbackups.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.AishB7wJp8 ++ mktemp + local LAST_ERR=/tmp/tmp.1MlCeJraFI + 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.AishB7wJp8 + cat /tmp/tmp.1MlCeJraFI + rm /tmp/tmp.AishB7wJp8 /tmp/tmp.1MlCeJraFI + 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.yxmoj9O0uV ++ mktemp + local LAST_ERR=/tmp/tmp.N44gObZYL7 + 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.yxmoj9O0uV + cat /tmp/tmp.N44gObZYL7 + rm /tmp/tmp.yxmoj9O0uV /tmp/tmp.N44gObZYL7 + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + grep -v NAMESPACE + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' E0429 04:02:38.256520 19906 memcache.go:287] couldn't get resource list for psmdb.percona.com/v1-11-0: the server could not find the requested resource E0429 04:02:38.256648 19906 memcache.go:287] couldn't get resource list for psmdb.percona.com/v1-12-0: the server could not find the requested resource E0429 04:02:38.256885 19906 memcache.go:287] couldn't get resource list for psmdb.percona.com/v1: the server could not find the requested resource E0429 04:02:38.261155 19906 memcache.go:287] couldn't get resource list for psmdb.percona.com/v1-10-0: the server could not find the requested resource 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.PvLjezvFyH ++ mktemp + local LAST_ERR=/tmp/tmp.B9lX99RBk0 + 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.PvLjezvFyH + cat /tmp/tmp.B9lX99RBk0 + rm /tmp/tmp.PvLjezvFyH /tmp/tmp.B9lX99RBk0 + 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-1537/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.uUmjOPG9Ok ++ mktemp + local LAST_ERR=/tmp/tmp.79MePuzzI1 + 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-1537/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.uUmjOPG9Ok 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.79MePuzzI1 + rm /tmp/tmp.uUmjOPG9Ok /tmp/tmp.79MePuzzI1 + return 0 + check_crd_for_deletion PR-1537-16566c84 + local git_tag=PR-1537-16566c84 ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-1537-16566c84/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.8IjvbXS2Dz +++ mktemp ++ local LAST_ERR=/tmp/tmp.XyWBFOJLYi ++ 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.8IjvbXS2Dz ++ cat /tmp/tmp.XyWBFOJLYi 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.8IjvbXS2Dz ++ cat /tmp/tmp.XyWBFOJLYi 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.8IjvbXS2Dz ++ cat /tmp/tmp.XyWBFOJLYi Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 8 ++ cat /tmp/tmp.8IjvbXS2Dz ++ cat /tmp/tmp.XyWBFOJLYi Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.8IjvbXS2Dz /tmp/tmp.XyWBFOJLYi ++ 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 ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ 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 ----------------------------------------------------------------------------------- + kubectl_bin get ns + awk '{print$1}' + '[' -n '' ']' + desc 'cleaned up old namespaces psmdb-operator' + xargs kubectl delete ns + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces psmdb-operator ----------------------------------------------------------------------------------- + kubectl_bin delete namespace psmdb-operator --ignore-not-found + egrep -v '^kube-|^default|Terminating|psmdb-operator|openshift|gke-mcs|^NAME' ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.H55AOXsuZb ++ mktemp + local LAST_OUT=/tmp/tmp.6C4QE0hzgu ++ mktemp + local LAST_ERR=/tmp/tmp.u18E1DhGNz + local exit_status=0 + local timeout=4 ++ seq 0 2 + local LAST_ERR=/tmp/tmp.1VombRzsT4 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete namespace psmdb-operator --ignore-not-found + 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.6C4QE0hzgu + cat /tmp/tmp.1VombRzsT4 + rm /tmp/tmp.6C4QE0hzgu /tmp/tmp.1VombRzsT4 + return 0 namespace "pitr-physical-19630" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.H55AOXsuZb namespace "psmdb-operator" deleted + cat /tmp/tmp.u18E1DhGNz + rm /tmp/tmp.H55AOXsuZb /tmp/tmp.u18E1DhGNz + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.fRT2tZfeKM ++ mktemp + local LAST_ERR=/tmp/tmp.hvh7VQ9qEJ + 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.fRT2tZfeKM + cat /tmp/tmp.hvh7VQ9qEJ + rm /tmp/tmp.fRT2tZfeKM /tmp/tmp.hvh7VQ9qEJ + 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.xtQ5am78UW ++ mktemp + local LAST_ERR=/tmp/tmp.yKfVFEfqT9 + 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.xtQ5am78UW namespace/psmdb-operator created + cat /tmp/tmp.yKfVFEfqT9 + rm /tmp/tmp.xtQ5am78UW /tmp/tmp.yKfVFEfqT9 + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.AYbeJXCejF +++ mktemp ++ local LAST_ERR=/tmp/tmp.KM7XirFQ38 ++ 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.AYbeJXCejF ++ cat /tmp/tmp.KM7XirFQ38 ++ rm /tmp/tmp.AYbeJXCejF /tmp/tmp.KM7XirFQ38 ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1537-16566c84-1-cluster3 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.8eqAQRkdHj ++ mktemp + local LAST_ERR=/tmp/tmp.FQhj5p3yzQ + 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-1537-16566c84-1-cluster3 --namespace=psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.8eqAQRkdHj Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1537-16566c84-1-cluster3" modified. + cat /tmp/tmp.FQhj5p3yzQ + rm /tmp/tmp.8eqAQRkdHj /tmp/tmp.FQhj5p3yzQ + 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-1537/e2e-tests/pitr-physical/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.IvsQvwDssX ++ mktemp + local LAST_ERR=/tmp/tmp.YynZyyiDbV + 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-1537/deploy/crd.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.IvsQvwDssX 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.YynZyyiDbV + rm /tmp/tmp.IvsQvwDssX /tmp/tmp.YynZyyiDbV + return 0 + '[' -n psmdb-operator ']' + apply_rbac cw-rbac + local operator_namespace=psmdb-operator + local rbac=cw-rbac + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/deploy/cw-rbac.yaml + sed -e 's^namespace: .*^namespace: psmdb-operator^' + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.s8He3aruvR ++ mktemp + local LAST_ERR=/tmp/tmp.CmWiJ9LG2I + 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.s8He3aruvR 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.CmWiJ9LG2I + rm /tmp/tmp.s8He3aruvR /tmp/tmp.CmWiJ9LG2I + return 0 + yq eval ' (.spec.template.spec.containers[].image = "perconalab/percona-server-mongodb-operator:PR-1537-16566c84") | ((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") | ((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/deploy/cw-operator.yaml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.obwDvNKMKv ++ mktemp + local LAST_ERR=/tmp/tmp.9Q604b7gpc + 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.obwDvNKMKv deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.9Q604b7gpc + rm /tmp/tmp.obwDvNKMKv /tmp/tmp.9Q604b7gpc + 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.BYFKfQXBfX +++ mktemp ++ local LAST_ERR=/tmp/tmp.HV26FO4zyL ++ 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.BYFKfQXBfX ++ cat /tmp/tmp.HV26FO4zyL ++ rm /tmp/tmp.BYFKfQXBfX /tmp/tmp.HV26FO4zyL ++ return 0 + wait_pod percona-server-mongodb-operator-6b9f7d844d-k247p + local pod=percona-server-mongodb-operator-6b9f7d844d-k247p + set +o xtrace waiting for pod/percona-server-mongodb-operator-6b9f7d844d-k247p to be ready.OK + create_namespace pitr-physical-16638 + local namespace=pitr-physical-16638 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ 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 '' ']' + kubectl_bin get ns + desc 'cleaned up old namespaces pitr-physical-16638' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces pitr-physical-16638 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace pitr-physical-16638 --ignore-not-found + xargs kubectl delete ns ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.zFQiO7w3Xh ++ mktemp + local LAST_OUT=/tmp/tmp.RvGHLG3kdd + local LAST_ERR=/tmp/tmp.hRKdhXNXjW + local exit_status=0 + local timeout=4 ++ mktemp ++ seq 0 2 + local LAST_ERR=/tmp/tmp.JDZrA4PNPY + local exit_status=0 + local timeout=4 + for i in '$(seq 0 2)' + set +e + kubectl get ns ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete namespace pitr-physical-16638 --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.zFQiO7w3Xh + cat /tmp/tmp.hRKdhXNXjW + rm /tmp/tmp.zFQiO7w3Xh /tmp/tmp.hRKdhXNXjW + return 0 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.RvGHLG3kdd + cat /tmp/tmp.JDZrA4PNPY + rm /tmp/tmp.RvGHLG3kdd /tmp/tmp.JDZrA4PNPY + return 0 + kubectl_bin wait --for=delete namespace pitr-physical-16638 ++ mktemp + local LAST_OUT=/tmp/tmp.pMOGZon3JM ++ mktemp + local LAST_ERR=/tmp/tmp.lizlz92xJV + 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-16638 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.pMOGZon3JM + cat /tmp/tmp.lizlz92xJV + rm /tmp/tmp.pMOGZon3JM /tmp/tmp.lizlz92xJV + return 0 + desc 'create namespace pitr-physical-16638' + set +o xtrace ----------------------------------------------------------------------------------- create namespace pitr-physical-16638 ----------------------------------------------------------------------------------- + kubectl_bin create namespace pitr-physical-16638 ++ mktemp + local LAST_OUT=/tmp/tmp.3gvxvJIkNz ++ mktemp + local LAST_ERR=/tmp/tmp.M7M1XEYG7d + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace pitr-physical-16638 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.3gvxvJIkNz namespace/pitr-physical-16638 created + cat /tmp/tmp.M7M1XEYG7d + rm /tmp/tmp.3gvxvJIkNz /tmp/tmp.M7M1XEYG7d + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.7Dsnwo3BcG +++ mktemp ++ local LAST_ERR=/tmp/tmp.qy1WZ60ySY ++ 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.7Dsnwo3BcG ++ cat /tmp/tmp.qy1WZ60ySY ++ rm /tmp/tmp.7Dsnwo3BcG /tmp/tmp.qy1WZ60ySY ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1537-16566c84-1-cluster3 --namespace=pitr-physical-16638 ++ mktemp + local LAST_OUT=/tmp/tmp.eqCogN7qfn ++ mktemp + local LAST_ERR=/tmp/tmp.rmocAl5PkS + 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-1537-16566c84-1-cluster3 --namespace=pitr-physical-16638 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.eqCogN7qfn Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1537-16566c84-1-cluster3" modified. + cat /tmp/tmp.rmocAl5PkS + rm /tmp/tmp.eqCogN7qfn /tmp/tmp.rmocAl5PkS + 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.0.14 --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.0.14 --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: Mon Apr 29 04:03:23 2024 NAMESPACE: pitr-physical-16638 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-16638.svc.cluster.local To access MinIO from localhost, run the below commands: 1. export POD_NAME=$(kubectl get pods --namespace pitr-physical-16638 -l "release=minio-service" -o jsonpath="{.items[0].metadata.name}") 2. kubectl port-forward $POD_NAME 9000 --namespace pitr-physical-16638 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-16638 minio-service -o jsonpath="{.data.rootUser}" | base64 --decode):$(kubectl get secret --namespace pitr-physical-16638 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.QstrmIepoQ +++ mktemp ++ local LAST_ERR=/tmp/tmp.Y099rAABRE ++ 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.QstrmIepoQ ++ cat /tmp/tmp.Y099rAABRE ++ rm /tmp/tmp.QstrmIepoQ /tmp/tmp.Y099rAABRE ++ return 0 + MINIO_POD=minio-service-57dd49b-dgx7q + wait_pod minio-service-57dd49b-dgx7q + local pod=minio-service-57dd49b-dgx7q + set +o xtrace waiting for pod/minio-service-57dd49b-dgx7q to be ready.OK + '[' -n psmdb-operator ']' + kubectl_bin create svc -n psmdb-operator externalname minio-service --external-name=minio-service.pitr-physical-16638.svc.cluster.local --tcp=9000 ++ mktemp + local LAST_OUT=/tmp/tmp.lg32ow1z4G ++ mktemp + local LAST_ERR=/tmp/tmp.dqgEao0xVY + 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-16638.svc.cluster.local --tcp=9000 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.lg32ow1z4G service/minio-service created + cat /tmp/tmp.dqgEao0xVY + rm /tmp/tmp.lg32ow1z4G /tmp/tmp.dqgEao0xVY + return 0 + 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.KxBplh6vs0 ++ mktemp + local LAST_ERR=/tmp/tmp.M0YrWwImX9 + 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.KxBplh6vs0 make_bucket: operator-testing pod "aws-cli" deleted + cat /tmp/tmp.M0YrWwImX9 If you don't see a command prompt, try pressing enter. warning: couldn't attach to pod/aws-cli, falling back to streaming logs: unable to upgrade connection: container aws-cli not found in pod aws-cli_pitr-physical-16638 + rm /tmp/tmp.KxBplh6vs0 /tmp/tmp.M0YrWwImX9 + 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-1537/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/conf/client.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/conf/minio-secret.yml ++ mktemp + local LAST_OUT=/tmp/tmp.jzB1ckaBbH ++ mktemp + local LAST_ERR=/tmp/tmp.hcOZ11dLqV + 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-1537/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/conf/client.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/conf/minio-secret.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.jzB1ckaBbH secret/some-users created deployment.apps/psmdb-client created secret/minio-secret created + cat /tmp/tmp.hcOZ11dLqV + rm /tmp/tmp.jzB1ckaBbH /tmp/tmp.hcOZ11dLqV + 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-1537/e2e-tests/pitr-physical/conf/some-name-rs0.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/pitr-physical/conf/some-name-rs0.yml + kubectl_bin apply -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/pitr-physical/conf/some-name-rs0.yml + 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"' + yq eval '(.spec | select(has("initImage"))).initImage = "perconalab/percona-server-mongodb-operator:PR-1537-16566c84"' ++ mktemp + yq eval '(.spec | select(has("backup"))).backup.image = "perconalab/percona-server-mongodb-operator:main-backup"' + yq eval '.spec.upgradeOptions.apply="Never"' + local LAST_OUT=/tmp/tmp.vIRDkpW3j0 ++ mktemp + local LAST_ERR=/tmp/tmp.ymyuVk2fjz + 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.vIRDkpW3j0 perconaservermongodb.psmdb.percona.com/some-name created + cat /tmp/tmp.ymyuVk2fjz + rm /tmp/tmp.vIRDkpW3j0 /tmp/tmp.ymyuVk2fjz + 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.C5XUUDzy26 +++ mktemp ++ local LAST_ERR=/tmp/tmp.q8pvldZUGc ++ 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.C5XUUDzy26 ++ cat /tmp/tmp.q8pvldZUGc ++ rm /tmp/tmp.C5XUUDzy26 /tmp/tmp.q8pvldZUGc ++ 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.WMG8grrpDB +++ mktemp ++ local LAST_ERR=/tmp/tmp.dSCRtRTI06 ++ 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.WMG8grrpDB ++ cat /tmp/tmp.dSCRtRTI06 ++ rm /tmp/tmp.WMG8grrpDB /tmp/tmp.dSCRtRTI06 ++ 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.uHLypHOS5v +++ mktemp ++ local LAST_ERR=/tmp/tmp.o5rIBoVVcr ++ 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.uHLypHOS5v ++ cat /tmp/tmp.o5rIBoVVcr ++ rm /tmp/tmp.uHLypHOS5v /tmp/tmp.o5rIBoVVcr ++ 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.8amso95t4H +++ mktemp ++ local LAST_ERR=/tmp/tmp.nw5OS6pcTm ++ 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.8amso95t4H ++ cat /tmp/tmp.nw5OS6pcTm ++ rm /tmp/tmp.8amso95t4H /tmp/tmp.nw5OS6pcTm ++ 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-16638 + local 'command=db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})' + local uri=userAdmin:userAdmin123456@some-name-mongos.pitr-physical-16638 + local driver=mongodb + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.6GE53JV4rB +++ mktemp ++ local LAST_ERR=/tmp/tmp.XF9r5KDlIz ++ 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.6GE53JV4rB ++ cat /tmp/tmp.XF9r5KDlIz ++ rm /tmp/tmp.6GE53JV4rB /tmp/tmp.XF9r5KDlIz ++ return 0 + local client_container=psmdb-client-5dc94d5b48-ghc9t + local mongo_flag= + kubectl_bin exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.BaJWgtILg3 ++ mktemp + local LAST_ERR=/tmp/tmp.20f775mExO + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''db.createUser({user:"myApp",pwd:"myPass",roles:[{db:"myApp",role:"readWrite"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.BaJWgtILg3 Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.pitr-physical-16638.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("7a176533-326c-4a04-a88d-ede25baa0f7c") } Percona Server for MongoDB server version: v7.0.8-5 WARNING: shell and server versions do not match Successfully added user: { "user" : "myApp", "roles" : [ { "db" : "myApp", "role" : "readWrite" } ] } bye + cat /tmp/tmp.20f775mExO + rm /tmp/tmp.BaJWgtILg3 /tmp/tmp.20f775mExO + return 0 + sleep 2 + write_document + local cmp_postfix= + 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-16638 + local 'command=use myApp\n db.test.insert({ x: 100500 })' + local uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local driver=mongodb + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.t2n1ulyDDU +++ mktemp ++ local LAST_ERR=/tmp/tmp.lSmzAvzb2N ++ 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.t2n1ulyDDU ++ cat /tmp/tmp.lSmzAvzb2N ++ rm /tmp/tmp.t2n1ulyDDU /tmp/tmp.lSmzAvzb2N ++ return 0 + local client_container=psmdb-client-5dc94d5b48-ghc9t + local mongo_flag= + kubectl_bin exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.pyfkSKj3q8 ++ mktemp + local LAST_ERR=/tmp/tmp.88lIlagKCA + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.pyfkSKj3q8 Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.pitr-physical-16638.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("992ca9a2-427d-4fdb-8fc6-72a190e94cda") } Percona Server for MongoDB server version: v7.0.8-5 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.88lIlagKCA + rm /tmp/tmp.pyfkSKj3q8 /tmp/tmp.88lIlagKCA + return 0 + minikube_sleep + sleep_time=10 + [[ '' == 1 ]] + compare_mongos_cmd find myApp:myPass@some-name-mongos.pitr-physical-16638 + local command=find + local uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local postfix= + local suffix= + local database=myApp + local collection=test + 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/' + run_mongos 'use myApp\n db.test.find()' myApp:myPass@some-name-mongos.pitr-physical-16638 mongodb '' + local 'command=use myApp\n db.test.find()' + local uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local driver=mongodb + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.KYNULxKrLZ +++ mktemp ++ local LAST_ERR=/tmp/tmp.7916Kz4meI ++ 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.KYNULxKrLZ ++ cat /tmp/tmp.7916Kz4meI ++ rm /tmp/tmp.KYNULxKrLZ /tmp/tmp.7916Kz4meI ++ return 0 + local client_container=psmdb-client-5dc94d5b48-ghc9t + local mongo_flag= + kubectl_bin exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.Ywc14WM9LX ++ mktemp + local LAST_ERR=/tmp/tmp.oujVp3H0A7 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Ywc14WM9LX + cat /tmp/tmp.oujVp3H0A7 + rm /tmp/tmp.Ywc14WM9LX /tmp/tmp.oujVp3H0A7 + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/pitr-physical/compare/find.json /tmp/tmp.A9pHXtPxvS/find + wait_backup_agent some-name-rs0-0 + local agent_pod=some-name-rs0-0 + set +o xtrace some-name-rs0-0 + wait_backup_agent some-name-rs0-1 + local agent_pod=some-name-rs0-1 + set +o xtrace some-name-rs0-1 + wait_backup_agent some-name-rs0-2 + local agent_pod=some-name-rs0-2 + set +o xtrace some-name-rs0-2 + wait_backup_agent some-name-rs1-0 + local agent_pod=some-name-rs1-0 + set +o xtrace some-name-rs1-0 + wait_backup_agent some-name-rs1-1 + local agent_pod=some-name-rs1-1 + set +o xtrace some-name-rs1-1 + wait_backup_agent some-name-rs1-2 + local agent_pod=some-name-rs1-2 + set +o xtrace some-name-rs1-2 + wait_backup_agent some-name-rs2-0 + local agent_pod=some-name-rs2-0 + set +o xtrace some-name-rs2-0 + wait_backup_agent some-name-rs2-1 + local agent_pod=some-name-rs2-1 + set +o xtrace some-name-rs2-1 + wait_backup_agent some-name-rs2-2 + local agent_pod=some-name-rs2-2 + set +o xtrace some-name-rs2-2 + backup_name_minio=backup-minio + sleep 360 + run_backup backup-minio 1 physical + local name=backup-minio + local idx=1 + local type=physical + desc 'run backup backup-minio-1' + set +o xtrace ----------------------------------------------------------------------------------- run backup backup-minio-1 ----------------------------------------------------------------------------------- + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/pitr-physical/conf/backup-minio.yml + /usr/bin/sed -e 's/type:/type: physical/' + /usr/bin/sed -e 's/name:/name: backup-minio-1/' + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.KIQyz6JgMH ++ mktemp + local LAST_ERR=/tmp/tmp.RjHrXKtG9A + 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.KIQyz6JgMH perconaservermongodbbackup.psmdb.percona.com/backup-minio-1 created + cat /tmp/tmp.RjHrXKtG9A + rm /tmp/tmp.KIQyz6JgMH /tmp/tmp.RjHrXKtG9A + return 0 + wait_backup backup-minio-1 + local backup_name=backup-minio-1 + set +o xtrace backup-minio-1.......................... + sleep 5 + write_document -2nd + local cmp_postfix=-2nd + 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-16638 + local 'command=use myApp\n db.test.insert({ x: 100500 })' + local uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local driver=mongodb + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.nHfP7wh5Hp +++ mktemp ++ local LAST_ERR=/tmp/tmp.0tortS67Ti ++ 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.nHfP7wh5Hp ++ cat /tmp/tmp.0tortS67Ti ++ rm /tmp/tmp.nHfP7wh5Hp /tmp/tmp.0tortS67Ti ++ return 0 + local client_container=psmdb-client-5dc94d5b48-ghc9t + local mongo_flag= + kubectl_bin exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.93ZUgS7g0s ++ mktemp + local LAST_ERR=/tmp/tmp.vYPYBjWWFV + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.93ZUgS7g0s Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.pitr-physical-16638.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("de181d77-e49f-4aff-9e55-cb6d6d62e493") } Percona Server for MongoDB server version: v7.0.8-5 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.vYPYBjWWFV + rm /tmp/tmp.93ZUgS7g0s /tmp/tmp.vYPYBjWWFV + return 0 + minikube_sleep + sleep_time=10 + [[ '' == 1 ]] + compare_mongos_cmd find myApp:myPass@some-name-mongos.pitr-physical-16638 -2nd + local command=find + local uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local postfix=-2nd + local suffix= + local database=myApp + local collection=test + run_mongos 'use myApp\n db.test.find()' myApp:myPass@some-name-mongos.pitr-physical-16638 mongodb '' + local 'command=use myApp\n db.test.find()' + local uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local driver=mongodb + local suffix=.svc.cluster.local + 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/' ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.eNSDTcmF24 +++ mktemp ++ local LAST_ERR=/tmp/tmp.IZeYDLj4Nb ++ 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.eNSDTcmF24 ++ cat /tmp/tmp.IZeYDLj4Nb ++ rm /tmp/tmp.eNSDTcmF24 /tmp/tmp.IZeYDLj4Nb ++ return 0 + local client_container=psmdb-client-5dc94d5b48-ghc9t + local mongo_flag= + kubectl_bin exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.PgvXR44s9F ++ mktemp + local LAST_ERR=/tmp/tmp.6zpW3Lrp5M + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.PgvXR44s9F + cat /tmp/tmp.6zpW3Lrp5M + rm /tmp/tmp.PgvXR44s9F /tmp/tmp.6zpW3Lrp5M + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/pitr-physical/compare/find-2nd.json /tmp/tmp.A9pHXtPxvS/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.TaFM29OHVd +++ mktemp ++ local LAST_ERR=/tmp/tmp.KmPbEs4mZz ++ 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.TaFM29OHVd ++ cat /tmp/tmp.KmPbEs4mZz ++ rm /tmp/tmp.TaFM29OHVd /tmp/tmp.KmPbEs4mZz ++ return 0 + backup_last_write=1714364047 ++ 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.6eOTGwTckF ++++ mktemp +++ local LAST_ERR=/tmp/tmp.rPHWEiCJlf +++ 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.6eOTGwTckF +++ cat /tmp/tmp.rPHWEiCJlf +++ rm /tmp/tmp.6eOTGwTckF /tmp/tmp.rPHWEiCJlf +++ return 0 ++ echo null + last_chunk=null + retries=0 + [[ null -gt 1714364047 ]] + [[ 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.ElNxAYNI42 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.3ArASW7W7L +++ 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.ElNxAYNI42 +++ cat /tmp/tmp.3ArASW7W7L +++ rm /tmp/tmp.ElNxAYNI42 /tmp/tmp.3ArASW7W7L +++ 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 1714364047 ++ local timestamp=1714364047 +++ TZ=UTC +++ /usr/bin/date -d@1714364047 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:14:07 + echo 'Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07)' Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07) + sleep 10 + [[ null -gt 1714364047 ]] + [[ 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.0qTprbZe3H ++++ mktemp +++ local LAST_ERR=/tmp/tmp.TE31RxvUoV +++ 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.0qTprbZe3H +++ cat /tmp/tmp.TE31RxvUoV +++ rm /tmp/tmp.0qTprbZe3H /tmp/tmp.TE31RxvUoV +++ 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 1714364047 ++ local timestamp=1714364047 +++ TZ=UTC +++ /usr/bin/date -d@1714364047 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:14:07 + echo 'Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07)' Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07) + sleep 10 + [[ null -gt 1714364047 ]] + [[ 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.AAlSpTGWzA ++++ mktemp +++ local LAST_ERR=/tmp/tmp.mun8TSur4C +++ 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.AAlSpTGWzA +++ cat /tmp/tmp.mun8TSur4C +++ rm /tmp/tmp.AAlSpTGWzA /tmp/tmp.mun8TSur4C +++ return 0 ++ echo null + last_chunk=null + retries=3 ++ 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 1714364047 ++ local timestamp=1714364047 +++ TZ=UTC +++ /usr/bin/date -d@1714364047 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:14:07 + echo 'Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07)' Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07) + sleep 10 + [[ null -gt 1714364047 ]] + [[ 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.DGRhW9RX1F ++++ mktemp +++ local LAST_ERR=/tmp/tmp.sYmdPtg7bf +++ 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.DGRhW9RX1F +++ cat /tmp/tmp.sYmdPtg7bf +++ rm /tmp/tmp.DGRhW9RX1F /tmp/tmp.sYmdPtg7bf +++ return 0 ++ echo null + last_chunk=null + retries=4 ++ 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 1714364047 ++ local timestamp=1714364047 +++ TZ=UTC +++ /usr/bin/date -d@1714364047 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:14:07 + echo 'Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07)' Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07) + sleep 10 + [[ null -gt 1714364047 ]] + [[ 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.Ocf6ITSWZt ++++ mktemp +++ local LAST_ERR=/tmp/tmp.cmMZkApQ4Q +++ 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.Ocf6ITSWZt +++ cat /tmp/tmp.cmMZkApQ4Q +++ rm /tmp/tmp.Ocf6ITSWZt /tmp/tmp.cmMZkApQ4Q +++ return 0 ++ echo null + last_chunk=null + retries=5 ++ 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 1714364047 ++ local timestamp=1714364047 +++ TZ=UTC +++ /usr/bin/date -d@1714364047 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:14:07 + echo 'Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07)' Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07) + sleep 10 + [[ null -gt 1714364047 ]] + [[ 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.jSqdGmrqSS ++++ mktemp +++ local LAST_ERR=/tmp/tmp.2caZO40D0Y +++ 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.jSqdGmrqSS +++ cat /tmp/tmp.2caZO40D0Y +++ rm /tmp/tmp.jSqdGmrqSS /tmp/tmp.2caZO40D0Y +++ return 0 ++ echo null + last_chunk=null + retries=6 ++ 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 1714364047 ++ local timestamp=1714364047 +++ TZ=UTC +++ /usr/bin/date -d@1714364047 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:14:07 + echo 'Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07)' Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07) + sleep 10 + [[ null -gt 1714364047 ]] + [[ 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.FFBBlClCU4 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.vGmt6iLjRD +++ 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.FFBBlClCU4 +++ cat /tmp/tmp.vGmt6iLjRD +++ rm /tmp/tmp.FFBBlClCU4 /tmp/tmp.vGmt6iLjRD +++ return 0 ++ echo null + last_chunk=null + retries=7 ++ 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 1714364047 ++ local timestamp=1714364047 +++ TZ=UTC +++ /usr/bin/date -d@1714364047 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:14:07 + echo 'Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07)' Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07) + sleep 10 + [[ null -gt 1714364047 ]] + [[ 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.i4Wo5wyL0b ++++ mktemp +++ local LAST_ERR=/tmp/tmp.0pv9gdriBg +++ 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.i4Wo5wyL0b +++ cat /tmp/tmp.0pv9gdriBg +++ rm /tmp/tmp.i4Wo5wyL0b /tmp/tmp.0pv9gdriBg +++ return 0 ++ echo null + last_chunk=null + retries=8 ++ 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 1714364047 ++ local timestamp=1714364047 +++ TZ=UTC +++ /usr/bin/date -d@1714364047 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:14:07 + echo 'Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07)' Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07) + sleep 10 + [[ null -gt 1714364047 ]] + [[ 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.nWYyN9TJgF ++++ mktemp +++ local LAST_ERR=/tmp/tmp.Vwm5MdEPke +++ 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.nWYyN9TJgF +++ cat /tmp/tmp.Vwm5MdEPke +++ rm /tmp/tmp.nWYyN9TJgF /tmp/tmp.Vwm5MdEPke +++ return 0 ++ echo null + last_chunk=null + retries=9 ++ 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 1714364047 ++ local timestamp=1714364047 +++ TZ=UTC +++ /usr/bin/date -d@1714364047 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:14:07 + echo 'Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07)' Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07) + sleep 10 + [[ null -gt 1714364047 ]] + [[ 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.5MRwD0WpDo ++++ mktemp +++ local LAST_ERR=/tmp/tmp.d6zqFMmIr2 +++ 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.5MRwD0WpDo +++ cat /tmp/tmp.d6zqFMmIr2 +++ rm /tmp/tmp.5MRwD0WpDo /tmp/tmp.d6zqFMmIr2 +++ return 0 ++ echo null + last_chunk=null + retries=10 ++ 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 1714364047 ++ local timestamp=1714364047 +++ TZ=UTC +++ /usr/bin/date -d@1714364047 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:14:07 + echo 'Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07)' Waiting for last oplog chunk () to be greater than last write (2024-04-29 04:14:07) + sleep 10 + [[ null -gt 1714364047 ]] + [[ 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.9trw02W5wQ ++++ mktemp +++ local LAST_ERR=/tmp/tmp.xesgCpwmjP +++ 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.9trw02W5wQ +++ cat /tmp/tmp.xesgCpwmjP +++ rm /tmp/tmp.9trw02W5wQ /tmp/tmp.xesgCpwmjP +++ return 0 ++ echo 1714364176 + last_chunk=1714364176 + retries=11 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 ++ format_date 1714364047 ++ local timestamp=1714364047 +++ TZ=UTC +++ /usr/bin/date -d@1714364047 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:14:07 + echo 'Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than last write (2024-04-29 04:14:07)' Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than last write (2024-04-29 04:14:07) + sleep 10 + [[ 1714364176 -gt 1714364047 ]] + check_recovery backup-minio-1 date 1714364176 -2nd some-name + local backup_name=backup-minio-1 + local restore_type=date + local restore_date=1714364176 + local cmp_postfix=-2nd + local cluster_name=some-name ++ 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.2m6Dqqs7Lc ++++ mktemp +++ local LAST_ERR=/tmp/tmp.LoncPV9FED +++ 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.2m6Dqqs7Lc +++ cat /tmp/tmp.LoncPV9FED +++ rm /tmp/tmp.2m6Dqqs7Lc /tmp/tmp.LoncPV9FED +++ return 0 ++ echo 1714364176 + local latest_ts=1714364176 + 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-16638 + local 'command=use myApp\n db.test.insert({ x: 100501 })' + local uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local driver=mongodb + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.TegOUH3bAc +++ mktemp ++ local LAST_ERR=/tmp/tmp.kf8Mx7k6Fa ++ 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.TegOUH3bAc ++ cat /tmp/tmp.kf8Mx7k6Fa ++ rm /tmp/tmp.TegOUH3bAc /tmp/tmp.kf8Mx7k6Fa ++ return 0 + local client_container=psmdb-client-5dc94d5b48-ghc9t + local mongo_flag= + kubectl_bin exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100501 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.64XmK5ZR1B ++ mktemp + local LAST_ERR=/tmp/tmp.14L0IPy5KQ + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100501 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.64XmK5ZR1B Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.pitr-physical-16638.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("ab3e3386-d907-4963-9767-13e19c2f2413") } Percona Server for MongoDB server version: v7.0.8-5 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.14L0IPy5KQ + rm /tmp/tmp.64XmK5ZR1B /tmp/tmp.14L0IPy5KQ + return 0 + [[ -n 1714364176 ]] ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 + desc 'Restoring to time 2024-04-29 04:16:16' + set +o xtrace ----------------------------------------------------------------------------------- Restoring to time 2024-04-29 04:16:16 ----------------------------------------------------------------------------------- + retries=0 + [[ 1714364176 -gt 1714364176 ]] + [[ 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.oVgxDIS5Pu ++++ mktemp +++ local LAST_ERR=/tmp/tmp.AaYHQkTdXi +++ 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.oVgxDIS5Pu +++ cat /tmp/tmp.AaYHQkTdXi +++ rm /tmp/tmp.oVgxDIS5Pu /tmp/tmp.AaYHQkTdXi +++ return 0 ++ echo 1714364176 + latest_ts=1714364176 + retries=1 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16)' Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16) + sleep 10 + [[ 1714364176 -gt 1714364176 ]] + [[ 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.oj5kJOOSHw ++++ mktemp +++ local LAST_ERR=/tmp/tmp.XVEzeR6vLf +++ 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.oj5kJOOSHw +++ cat /tmp/tmp.XVEzeR6vLf +++ rm /tmp/tmp.oj5kJOOSHw /tmp/tmp.XVEzeR6vLf +++ return 0 ++ echo 1714364176 + latest_ts=1714364176 + retries=2 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16)' Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16) + sleep 10 + [[ 1714364176 -gt 1714364176 ]] + [[ 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.orKMHXNstu ++++ mktemp +++ local LAST_ERR=/tmp/tmp.d0cQP2hnhY +++ 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.orKMHXNstu +++ cat /tmp/tmp.d0cQP2hnhY +++ rm /tmp/tmp.orKMHXNstu /tmp/tmp.d0cQP2hnhY +++ return 0 ++ echo 1714364176 + latest_ts=1714364176 + retries=3 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16)' Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16) + sleep 10 + [[ 1714364176 -gt 1714364176 ]] + [[ 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.6uC8GRXEF5 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.nPX0flJBQM +++ 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.6uC8GRXEF5 +++ cat /tmp/tmp.nPX0flJBQM +++ rm /tmp/tmp.6uC8GRXEF5 /tmp/tmp.nPX0flJBQM +++ return 0 ++ echo 1714364176 + latest_ts=1714364176 + retries=4 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16)' Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16) + sleep 10 + [[ 1714364176 -gt 1714364176 ]] + [[ 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.VmFXF7LVIo ++++ mktemp +++ local LAST_ERR=/tmp/tmp.CofiPeevFX +++ 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.VmFXF7LVIo +++ cat /tmp/tmp.CofiPeevFX +++ rm /tmp/tmp.VmFXF7LVIo /tmp/tmp.CofiPeevFX +++ return 0 ++ echo 1714364176 + latest_ts=1714364176 + retries=5 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16)' Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16) + sleep 10 + [[ 1714364176 -gt 1714364176 ]] + [[ 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.xG7XQOCBKh ++++ mktemp +++ local LAST_ERR=/tmp/tmp.X0pCEW8LGS +++ 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.xG7XQOCBKh +++ cat /tmp/tmp.X0pCEW8LGS +++ rm /tmp/tmp.xG7XQOCBKh /tmp/tmp.X0pCEW8LGS +++ return 0 ++ echo 1714364176 + latest_ts=1714364176 + retries=6 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16)' Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16) + sleep 10 + [[ 1714364176 -gt 1714364176 ]] + [[ 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.EqUo4LuG0e ++++ mktemp +++ local LAST_ERR=/tmp/tmp.w8jmTa4jnv +++ 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.EqUo4LuG0e +++ cat /tmp/tmp.w8jmTa4jnv +++ rm /tmp/tmp.EqUo4LuG0e /tmp/tmp.w8jmTa4jnv +++ return 0 ++ echo 1714364176 + latest_ts=1714364176 + retries=7 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16)' Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16) + sleep 10 + [[ 1714364176 -gt 1714364176 ]] + [[ 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.xvrOmeiIth ++++ mktemp +++ local LAST_ERR=/tmp/tmp.icDmWnOoR7 +++ 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.xvrOmeiIth +++ cat /tmp/tmp.icDmWnOoR7 +++ rm /tmp/tmp.xvrOmeiIth /tmp/tmp.icDmWnOoR7 +++ return 0 ++ echo 1714364176 + latest_ts=1714364176 + retries=8 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16)' Waiting for last oplog chunk (2024-04-29 04:16:16) to be greater than restore target (2024-04-29 04:16:16) + sleep 10 + [[ 1714364176 -gt 1714364176 ]] + [[ 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.v2sgBnucOK ++++ mktemp +++ local LAST_ERR=/tmp/tmp.xHw1bUvukA +++ 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.v2sgBnucOK +++ cat /tmp/tmp.xHw1bUvukA +++ rm /tmp/tmp.v2sgBnucOK /tmp/tmp.xHw1bUvukA +++ return 0 ++ echo 1714364178 + latest_ts=1714364178 + retries=9 ++ format_date 1714364178 ++ local timestamp=1714364178 +++ TZ=UTC +++ /usr/bin/date -d@1714364178 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:18 ++ format_date 1714364176 ++ local timestamp=1714364176 +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:16:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:16:18) to be greater than restore target (2024-04-29 04:16:16)' Waiting for last oplog chunk (2024-04-29 04:16:18) to be greater than restore target (2024-04-29 04:16:16) + sleep 10 + [[ 1714364178 -gt 1714364176 ]] + desc 'check restore by date' + set +o xtrace ----------------------------------------------------------------------------------- check restore by date ----------------------------------------------------------------------------------- + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/pitr-physical/conf/restore.yml + /usr/bin/sed -e 's/backupName:/backupName: backup-minio-1/' + /usr/bin/sed -e 's/type:/type: date/' + kubectl_bin apply -f - + '[' -z 1714364176 ']' + /usr/bin/sed -e 's/name:/name: restore-backup-minio-1/' ++ format_date 1714364176 ++ local timestamp=1714364176 ++ mktemp +++ TZ=UTC +++ /usr/bin/date -d@1714364176 '+%Y-%m-%d %H:%M:%S' + local LAST_OUT=/tmp/tmp.LMM59iBsBc ++ mktemp ++ echo 2024-04-29 04:16:16 + /usr/bin/sed -e 's/date:/date: 2024-04-29 04:16:16/' + local LAST_ERR=/tmp/tmp.L6xJFDkDS1 + 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.LMM59iBsBc perconaservermongodbrestore.psmdb.percona.com/restore-backup-minio-1 created + cat /tmp/tmp.L6xJFDkDS1 + rm /tmp/tmp.LMM59iBsBc /tmp/tmp.L6xJFDkDS1 + return 0 + wait_restore backup-minio-1 some-name requested 0 900 + local backup_name=backup-minio-1 + local cluster_name=some-name + local target_state=requested + local wait_cluster_consistency=0 + local wait_time=900 + set +o xtrace waiting psmdb-restore/backup-minio-1 to reach requested state..................................................................................................................................................................................................................... + '[' 0 -eq 1 ']' + echo + wait_restore backup-minio-1 some-name ready 0 1600 + local backup_name=backup-minio-1 + local cluster_name=some-name + local target_state=ready + local wait_cluster_consistency=0 + local wait_time=1600 + set +o xtrace waiting psmdb-restore/backup-minio-1 to reach ready state................................................................................................... + '[' 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.xh9WZKyiZ5 +++ mktemp ++ local LAST_ERR=/tmp/tmp.AqBUBRvUVX ++ 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.xh9WZKyiZ5 ++ cat /tmp/tmp.AqBUBRvUVX ++ rm /tmp/tmp.xh9WZKyiZ5 /tmp/tmp.AqBUBRvUVX ++ 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.2mQOq0f1KL +++ mktemp ++ local LAST_ERR=/tmp/tmp.zM0TK7050D ++ 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.2mQOq0f1KL ++ cat /tmp/tmp.zM0TK7050D ++ rm /tmp/tmp.2mQOq0f1KL /tmp/tmp.zM0TK7050D ++ 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-16638 -2nd + local command=find + local uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local postfix=-2nd + local suffix= + local database=myApp + local collection=test + run_mongos 'use myApp\n db.test.find()' myApp:myPass@some-name-mongos.pitr-physical-16638 mongodb '' + local 'command=use myApp\n db.test.find()' + 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 uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local driver=mongodb + local suffix=.svc.cluster.local + /usr/bin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.6NyzK9qDLw +++ mktemp ++ local LAST_ERR=/tmp/tmp.J9D2bDsUFk ++ 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.6NyzK9qDLw ++ cat /tmp/tmp.J9D2bDsUFk ++ rm /tmp/tmp.6NyzK9qDLw /tmp/tmp.J9D2bDsUFk ++ return 0 + local client_container=psmdb-client-5dc94d5b48-ghc9t + local mongo_flag= + kubectl_bin exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.BBumSuxyKm ++ mktemp + local LAST_ERR=/tmp/tmp.esRqgrr2Sw + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.BBumSuxyKm + cat /tmp/tmp.esRqgrr2Sw + rm /tmp/tmp.BBumSuxyKm /tmp/tmp.esRqgrr2Sw + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/pitr-physical/compare/find-2nd.json /tmp/tmp.A9pHXtPxvS/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 ----------------------------------------------------------------------------------- + /usr/bin/sed -e 's/name:/name: backup-minio-3/' + /usr/bin/sed -e 's/type:/type: physical/' + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/pitr-physical/conf/backup-minio.yml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.Rf7NCP43ws ++ mktemp + local LAST_ERR=/tmp/tmp.xtytOR1nLM + 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.Rf7NCP43ws perconaservermongodbbackup.psmdb.percona.com/backup-minio-3 created + cat /tmp/tmp.xtytOR1nLM + rm /tmp/tmp.Rf7NCP43ws /tmp/tmp.xtytOR1nLM + return 0 + wait_backup backup-minio-3 + local backup_name=backup-minio-3 + set +o xtrace backup-minio-3........................... + 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.7hLGghc50z ++++ mktemp +++ local LAST_ERR=/tmp/tmp.T7AwJxCPdi +++ 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.7hLGghc50z +++ cat /tmp/tmp.T7AwJxCPdi +++ rm /tmp/tmp.7hLGghc50z /tmp/tmp.T7AwJxCPdi +++ return 0 ++ first_timestamp=1714364296 ++ sleep 5 ++ [[ 1714364296 != '' ]] ++ [[ 1714364296 != \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.h0R87wZKjs ++++ mktemp +++ local LAST_ERR=/tmp/tmp.oQ7ZmccsEZ +++ 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.h0R87wZKjs +++ cat /tmp/tmp.oQ7ZmccsEZ +++ rm /tmp/tmp.h0R87wZKjs /tmp/tmp.oQ7ZmccsEZ +++ return 0 ++ second_timestamp=1714364296 ++ let retry+=1 ++ [[ 1 -gt 30 ]] ++ [[ 1714364296 != '' ]] ++ [[ 1714364296 != \n\u\l\l ]] ++ [[ 1714364296 == 1714364296 ]] ++ /usr/bin/date -u -d @1714364296 +%Y-%m-%dT%H:%M:%SZ + latest_restorable_time=2024-04-29T04:18:16Z ++ 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.dJJvVCzZGL ++++ mktemp +++ local LAST_ERR=/tmp/tmp.6vS1apjAzD +++ 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.dJJvVCzZGL +++ cat /tmp/tmp.6vS1apjAzD +++ rm /tmp/tmp.dJJvVCzZGL /tmp/tmp.6vS1apjAzD +++ return 0 ++ latestRestorableTime=2024-04-29T04:18:16Z ++ let retry+=1 ++ [[ 1 -gt 30 ]] ++ [[ 2024-04-29T04:18:16Z != '' ]] ++ [[ 2024-04-29T04:18:16Z != \n\u\l\l ]] ++ echo 2024-04-29T04:18:16Z + backup_time=2024-04-29T04:18:16Z + [[ 2024-04-29T04:18:16Z != \2\0\2\4\-\0\4\-\2\9\T\0\4\:\1\8\:\1\6\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 ++ 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.W8pG2TgW9M ++++ mktemp +++ local LAST_ERR=/tmp/tmp.cYvwp7AlJd +++ 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.W8pG2TgW9M +++ cat /tmp/tmp.cYvwp7AlJd +++ rm /tmp/tmp.W8pG2TgW9M /tmp/tmp.cYvwp7AlJd +++ return 0 ++ echo 1714364296 + local latest_ts=1714364296 + 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-16638 + local 'command=use myApp\n db.test.insert({ x: 100501 })' + local uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local driver=mongodb + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.xIX3yG65ao +++ mktemp ++ local LAST_ERR=/tmp/tmp.Wr3Cin8fGb ++ 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.xIX3yG65ao ++ cat /tmp/tmp.Wr3Cin8fGb ++ rm /tmp/tmp.xIX3yG65ao /tmp/tmp.Wr3Cin8fGb ++ return 0 + local client_container=psmdb-client-5dc94d5b48-ghc9t + local mongo_flag= + kubectl_bin exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100501 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.R9AMHbVX63 ++ mktemp + local LAST_ERR=/tmp/tmp.YWwNH9SgdU + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100501 })\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.R9AMHbVX63 Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.pitr-physical-16638.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("ff6e2c2f-ae6c-416b-9115-3b5a72c7add8") } Percona Server for MongoDB server version: v7.0.8-5 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.YWwNH9SgdU + rm /tmp/tmp.R9AMHbVX63 /tmp/tmp.YWwNH9SgdU + 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.cEx0iOs1DR ++++ mktemp +++ local LAST_ERR=/tmp/tmp.lmOSypJYbu +++ 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.cEx0iOs1DR +++ cat /tmp/tmp.lmOSypJYbu +++ rm /tmp/tmp.cEx0iOs1DR /tmp/tmp.lmOSypJYbu +++ return 0 ++ echo 1714364296 + local current_ts=1714364296 + retries=0 + [[ 1714364296 -gt 1714364296 ]] + [[ 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.6eFTV7uiRp ++++ mktemp +++ local LAST_ERR=/tmp/tmp.bae0To5Idx +++ 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.6eFTV7uiRp +++ cat /tmp/tmp.bae0To5Idx +++ rm /tmp/tmp.6eFTV7uiRp /tmp/tmp.bae0To5Idx +++ return 0 ++ echo 1714364296 + latest_ts=1714364296 + retries=1 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16)' Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16) + sleep 10 + [[ 1714364296 -gt 1714364296 ]] + [[ 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.FvLI9HULfs ++++ mktemp +++ local LAST_ERR=/tmp/tmp.ko8fMCj7AX +++ 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.FvLI9HULfs +++ cat /tmp/tmp.ko8fMCj7AX +++ rm /tmp/tmp.FvLI9HULfs /tmp/tmp.ko8fMCj7AX +++ return 0 ++ echo 1714364296 + latest_ts=1714364296 + retries=2 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16)' Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16) + sleep 10 + [[ 1714364296 -gt 1714364296 ]] + [[ 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.7ZBCYDzG2W ++++ mktemp +++ local LAST_ERR=/tmp/tmp.pYKvOCftuG +++ 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.7ZBCYDzG2W +++ cat /tmp/tmp.pYKvOCftuG +++ rm /tmp/tmp.7ZBCYDzG2W /tmp/tmp.pYKvOCftuG +++ return 0 ++ echo 1714364296 + latest_ts=1714364296 + retries=3 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16)' Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16) + sleep 10 + [[ 1714364296 -gt 1714364296 ]] + [[ 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.dZbjIDO7Jr ++++ mktemp +++ local LAST_ERR=/tmp/tmp.aDDZPr1SE1 +++ 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.dZbjIDO7Jr +++ cat /tmp/tmp.aDDZPr1SE1 +++ rm /tmp/tmp.dZbjIDO7Jr /tmp/tmp.aDDZPr1SE1 +++ return 0 ++ echo 1714364296 + latest_ts=1714364296 + retries=4 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16)' Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16) + sleep 10 + [[ 1714364296 -gt 1714364296 ]] + [[ 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.CMqiAEElcm ++++ mktemp +++ local LAST_ERR=/tmp/tmp.UogjPXFbkx +++ 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.CMqiAEElcm +++ cat /tmp/tmp.UogjPXFbkx +++ rm /tmp/tmp.CMqiAEElcm /tmp/tmp.UogjPXFbkx +++ return 0 ++ echo 1714364296 + latest_ts=1714364296 + retries=5 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16)' Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16) + sleep 10 + [[ 1714364296 -gt 1714364296 ]] + [[ 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.73Pbgptp0S ++++ mktemp +++ local LAST_ERR=/tmp/tmp.AsZ6wUSBSB +++ 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.73Pbgptp0S +++ cat /tmp/tmp.AsZ6wUSBSB +++ rm /tmp/tmp.73Pbgptp0S /tmp/tmp.AsZ6wUSBSB +++ return 0 ++ echo 1714364296 + latest_ts=1714364296 + retries=6 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16)' Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16) + sleep 10 + [[ 1714364296 -gt 1714364296 ]] + [[ 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.s5dLSjbDod ++++ mktemp +++ local LAST_ERR=/tmp/tmp.gSS0dP8iQO +++ 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.s5dLSjbDod +++ cat /tmp/tmp.gSS0dP8iQO +++ rm /tmp/tmp.s5dLSjbDod /tmp/tmp.gSS0dP8iQO +++ return 0 ++ echo 1714364296 + latest_ts=1714364296 + retries=7 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16)' Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16) + sleep 10 + [[ 1714364296 -gt 1714364296 ]] + [[ 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.yMTnmqibBA ++++ mktemp +++ local LAST_ERR=/tmp/tmp.VzoQjwrsbf +++ 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.yMTnmqibBA +++ cat /tmp/tmp.VzoQjwrsbf +++ rm /tmp/tmp.yMTnmqibBA /tmp/tmp.VzoQjwrsbf +++ return 0 ++ echo 1714364296 + latest_ts=1714364296 + retries=8 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16)' Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16) + sleep 10 + [[ 1714364296 -gt 1714364296 ]] + [[ 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.0T6WgkDmPj ++++ mktemp +++ local LAST_ERR=/tmp/tmp.re8F5XUi09 +++ 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.0T6WgkDmPj +++ cat /tmp/tmp.re8F5XUi09 +++ rm /tmp/tmp.0T6WgkDmPj /tmp/tmp.re8F5XUi09 +++ return 0 ++ echo 1714364296 + latest_ts=1714364296 + retries=9 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16)' Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16) + sleep 10 + [[ 1714364296 -gt 1714364296 ]] + [[ 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.jvYy3ZtU2F ++++ mktemp +++ local LAST_ERR=/tmp/tmp.5KjQdNlZgg +++ 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.jvYy3ZtU2F +++ cat /tmp/tmp.5KjQdNlZgg +++ rm /tmp/tmp.jvYy3ZtU2F /tmp/tmp.5KjQdNlZgg +++ return 0 ++ echo 1714364296 + latest_ts=1714364296 + retries=10 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16)' Waiting for last oplog chunk (2024-04-29 04:18:16) to be greater than starting chunk (2024-04-29 04:18:16) + sleep 10 + [[ 1714364296 -gt 1714364296 ]] + [[ 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.4oc8t4jp0d ++++ mktemp +++ local LAST_ERR=/tmp/tmp.6aFEn2S0eZ +++ 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.4oc8t4jp0d +++ cat /tmp/tmp.6aFEn2S0eZ +++ rm /tmp/tmp.4oc8t4jp0d /tmp/tmp.6aFEn2S0eZ +++ return 0 ++ echo 1714365116 + latest_ts=1714365116 + retries=11 ++ format_date 1714365116 ++ local timestamp=1714365116 +++ TZ=UTC +++ /usr/bin/date -d@1714365116 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:31:56 ++ format_date 1714364296 ++ local timestamp=1714364296 +++ TZ=UTC +++ /usr/bin/date -d@1714364296 '+%Y-%m-%d %H:%M:%S' ++ echo 2024-04-29 04:18:16 + echo 'Waiting for last oplog chunk (2024-04-29 04:31:56) to be greater than starting chunk (2024-04-29 04:18:16)' Waiting for last oplog chunk (2024-04-29 04:31:56) to be greater than starting chunk (2024-04-29 04:18:16) + sleep 10 + [[ 1714365116 -gt 1714364296 ]] + desc 'check restore by latest' + set +o xtrace ----------------------------------------------------------------------------------- check restore by latest ----------------------------------------------------------------------------------- + /usr/bin/sed -e 's/name:/name: restore-backup-minio-3/' + /usr/bin/sed -e 's/backupName:/backupName: backup-minio-3/' + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/pitr-physical/conf/restore.yml + /usr/bin/sed -e 's/type:/type: latest/' + kubectl_bin apply -f - + '[' -z '' ']' + /usr/bin/sed -e /date:/d ++ mktemp + local LAST_OUT=/tmp/tmp.Os9RF3Od5v ++ mktemp + local LAST_ERR=/tmp/tmp.T9t3U3qF6E + 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.Os9RF3Od5v perconaservermongodbrestore.psmdb.percona.com/restore-backup-minio-3 created + cat /tmp/tmp.T9t3U3qF6E + rm /tmp/tmp.Os9RF3Od5v /tmp/tmp.T9t3U3qF6E + 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 + set +o xtrace waiting psmdb-restore/backup-minio-3 to reach requested state......................................................................................................................................................................................................................... + '[' 0 -eq 1 ']' + echo + wait_restore backup-minio-3 some-name ready 0 1600 + local backup_name=backup-minio-3 + local cluster_name=some-name + local target_state=ready + local wait_cluster_consistency=0 + local wait_time=1600 + set +o xtrace waiting psmdb-restore/backup-minio-3 to reach ready state..................................................................................................... + '[' 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.dMaIqGOhhr +++ mktemp ++ local LAST_ERR=/tmp/tmp.m6vQIG1clU ++ 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.dMaIqGOhhr ++ cat /tmp/tmp.m6vQIG1clU ++ rm /tmp/tmp.dMaIqGOhhr /tmp/tmp.m6vQIG1clU ++ 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.zuHKz08LVE +++ mktemp ++ local LAST_ERR=/tmp/tmp.YQbEgqFAvP ++ 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.zuHKz08LVE ++ cat /tmp/tmp.YQbEgqFAvP ++ rm /tmp/tmp.zuHKz08LVE /tmp/tmp.YQbEgqFAvP ++ 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-16638 -3rd + local command=find + local uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local postfix=-3rd + local suffix= + local database=myApp + local collection=test + run_mongos 'use myApp\n db.test.find()' myApp:myPass@some-name-mongos.pitr-physical-16638 mongodb '' + local 'command=use myApp\n db.test.find()' + 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 uri=myApp:myPass@some-name-mongos.pitr-physical-16638 + local driver=mongodb + local suffix=.svc.cluster.local + /usr/bin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.0RYMMglWW8 +++ mktemp ++ local LAST_ERR=/tmp/tmp.7gnEoRCUng ++ 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.0RYMMglWW8 ++ cat /tmp/tmp.7gnEoRCUng ++ rm /tmp/tmp.0RYMMglWW8 /tmp/tmp.7gnEoRCUng ++ return 0 + local client_container=psmdb-client-5dc94d5b48-ghc9t + local mongo_flag= + kubectl_bin exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.soDc9UfH5i ++ mktemp + local LAST_ERR=/tmp/tmp.awP0attF0x + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-5dc94d5b48-ghc9t -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@some-name-mongos.pitr-physical-16638.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.soDc9UfH5i + cat /tmp/tmp.awP0attF0x + rm /tmp/tmp.soDc9UfH5i /tmp/tmp.awP0attF0x + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/e2e-tests/pitr-physical/compare/find-3rd.json /tmp/tmp.A9pHXtPxvS/find-3rd + destroy pitr-physical-16638 + local namespace=pitr-physical-16638 + local ignore_logs=true + desc 'destroy cluster/operator and all other resources' + set +o xtrace ----------------------------------------------------------------------------------- destroy cluster/operator and all other resources ----------------------------------------------------------------------------------- + '[' true == false ']' + 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-1537/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.7uXua96uVD ++ mktemp + local LAST_ERR=/tmp/tmp.B6yWpQy0SY + 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-1537/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.7uXua96uVD 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.B6yWpQy0SY + rm /tmp/tmp.7uXua96uVD /tmp/tmp.B6yWpQy0SY + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1537/deploy/crd.yaml ++ grep -v '\-\-\-' + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + kubectl get perconaservermongodbbackups.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbbackups" + kubectl patch perconaservermongodbbackups.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbbackups" + : + kubectl_bin wait --for=delete crd perconaservermongodbbackups.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.IvayJafgGi ++ mktemp + local LAST_ERR=/tmp/tmp.ty0fmr2dqA + 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.IvayJafgGi + cat /tmp/tmp.ty0fmr2dqA + rm /tmp/tmp.IvayJafgGi /tmp/tmp.ty0fmr2dqA + 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.bqS0v3Yfra ++ mktemp + local LAST_ERR=/tmp/tmp.gy9X0UYdg0 + 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.bqS0v3Yfra + cat /tmp/tmp.gy9X0UYdg0 + rm /tmp/tmp.bqS0v3Yfra /tmp/tmp.gy9X0UYdg0 + 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\":[]}}"' No resources found + 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.32evKNrnXI ++ mktemp + local LAST_ERR=/tmp/tmp.MhTKwqp7Wv + 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.32evKNrnXI + cat /tmp/tmp.MhTKwqp7Wv + rm /tmp/tmp.32evKNrnXI /tmp/tmp.MhTKwqp7Wv + 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-1537/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.NBDZlCm1EI ++ mktemp + local LAST_ERR=/tmp/tmp.cJqzAUwz3m + 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-1537/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.NBDZlCm1EI 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.cJqzAUwz3m + rm /tmp/tmp.NBDZlCm1EI /tmp/tmp.cJqzAUwz3m + return 0 + kubectl_bin delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.4/cert-manager.yaml + : + '[' -n '' ']' + '[' -n psmdb-operator ']' + kubectl_bin delete --grace-period=0 --force=true namespace pitr-physical-16638 + rm -rf /tmp/tmp.A9pHXtPxvS + kubectl_bin delete --grace-period=0 --force=true namespace psmdb-operator ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.T4jadBiN2h + desc 'test passed' + set +o xtrace ----------------------------------------------------------------------------------- test passed ----------------------------------------------------------------------------------- ++ mktemp + local LAST_OUT=/tmp/tmp.9acCVPfU4o ++ mktemp + local LAST_ERR=/tmp/tmp.ACt9eVlzr8 + local exit_status=0 + local timeout=4 ++ seq 0 2 + local LAST_ERR=/tmp/tmp.EeBAZTtLL4 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete --grace-period=0 --force=true namespace pitr-physical-16638 + for i in '$(seq 0 2)' + set +e + kubectl delete --grace-period=0 --force=true namespace psmdb-operator