Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/logs/smart-update.log + cluster=smart-update + create_infra smart-update-5816 + local ns=smart-update-5816 + 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-1352/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.wNvhCT6gIT ++ mktemp + local LAST_ERR=/tmp/tmp.YpruPt3JNg + 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-1352/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.wNvhCT6gIT 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.YpruPt3JNg + rm /tmp/tmp.wNvhCT6gIT /tmp/tmp.YpruPt3JNg + return 0 ++ grep -v '\-\-\-' ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/deploy/crd.yaml + 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.hZamJPUIIK ++ mktemp + local LAST_ERR=/tmp/tmp.Wv1LgILFyc + 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.hZamJPUIIK + cat /tmp/tmp.Wv1LgILFyc + rm /tmp/tmp.hZamJPUIIK /tmp/tmp.Wv1LgILFyc + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbrestores.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' + grep -v NAMESPACE + kubectl get perconaservermongodbrestores.psmdb.percona.com --all-namespaces -o wide 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.XbAO6WUDkU ++ mktemp + local LAST_ERR=/tmp/tmp.UK2zct1dOy + 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.XbAO6WUDkU + cat /tmp/tmp.UK2zct1dOy + rm /tmp/tmp.XbAO6WUDkU /tmp/tmp.UK2zct1dOy + 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 + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' + grep -v NAMESPACE 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.GR9NXMeYBk ++ mktemp + local LAST_ERR=/tmp/tmp.aF0zoo0H5I + 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.GR9NXMeYBk + cat /tmp/tmp.aF0zoo0H5I + rm /tmp/tmp.GR9NXMeYBk /tmp/tmp.aF0zoo0H5I + return 0 + local rbac_yaml=rbac.yaml + '[' -n '' ']' + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/deploy/rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.nYoXPdoNWY ++ mktemp + local LAST_ERR=/tmp/tmp.CsCn2uba74 + 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-1352/deploy/rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.nYoXPdoNWY role.rbac.authorization.k8s.io "percona-server-mongodb-operator" deleted serviceaccount "percona-server-mongodb-operator" deleted rolebinding.rbac.authorization.k8s.io "service-account-percona-server-mongodb-operator" deleted + cat /tmp/tmp.CsCn2uba74 + rm /tmp/tmp.nYoXPdoNWY /tmp/tmp.CsCn2uba74 + return 0 + check_crd_for_deletion PR-1352-9793733e + local git_tag=PR-1352-9793733e ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-1352-9793733e/deploy/crd.yaml ++ /usr/bin/sed ':a;N;$!ba;s/\n/ /g' ++ /usr/bin/sed s/---//g ++ yq eval .metadata.name + for crd_name in '$(curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/${git_tag}/deploy/crd.yaml | yq eval '\''.metadata.name'\'' | $sed '\''s/---//g'\'' | $sed '\'':a;N;$!ba;s/\n/ /g'\'')' ++ kubectl_bin get crd/null -o 'jsonpath={.status.conditions[-1].type}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.lxoPNtNfrw +++ mktemp ++ local LAST_ERR=/tmp/tmp.BhXvYygx49 ++ 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.lxoPNtNfrw ++ cat /tmp/tmp.BhXvYygx49 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.lxoPNtNfrw ++ cat /tmp/tmp.BhXvYygx49 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.lxoPNtNfrw ++ cat /tmp/tmp.BhXvYygx49 Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 8 ++ cat /tmp/tmp.lxoPNtNfrw ++ cat /tmp/tmp.BhXvYygx49 Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.lxoPNtNfrw /tmp/tmp.BhXvYygx49 ++ return 1 + [[ '' == \T\e\r\m\i\n\a\t\i\n\g ]] + '[' -n '' ']' + create_namespace smart-update-5816 + local namespace=smart-update-5816 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ tail -n1 ++ sed s/NAMESPACE// ++ awk '-F ' '{print $2}' ++ helm list --all-namespaces --filter chaos-mesh + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' + '[' -n '' ']' ++ 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 + : ++ grep chaos-mesh ++ kubectl get clusterrolebinding ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ grep chaos-mesh ++ awk '{print $1}' ++ kubectl get clusterrole + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : ++ awk '{print $1}' ++ grep chaos-mesh ++ kubectl get MutatingWebhookConfiguration + 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 + : ++ awk '{print $1}' ++ grep validate-auth ++ kubectl get ValidatingWebhookConfiguration + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + '[' -n '' ']' + desc 'cleaned up old namespaces smart-update-5816' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces smart-update-5816 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace smart-update-5816 --ignore-not-found ++ mktemp + awk '{print$1}' + xargs kubectl delete ns + egrep -v '^kube-|^default|Terminating|psmdb-operator|openshift|gke-mcs|^NAME' + kubectl_bin get ns + local LAST_OUT=/tmp/tmp.02h79G7WYi ++ mktemp + local LAST_ERR=/tmp/tmp.fxZbjtSLa9 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete namespace smart-update-5816 --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.hroAMkzeEj ++ mktemp + local LAST_ERR=/tmp/tmp.yVZa7xbnLx + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl get ns + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.hroAMkzeEj + cat /tmp/tmp.yVZa7xbnLx + rm /tmp/tmp.hroAMkzeEj /tmp/tmp.yVZa7xbnLx + return 0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.02h79G7WYi + cat /tmp/tmp.fxZbjtSLa9 + rm /tmp/tmp.02h79G7WYi /tmp/tmp.fxZbjtSLa9 + return 0 + kubectl_bin wait --for=delete namespace smart-update-5816 ++ mktemp + local LAST_OUT=/tmp/tmp.SGHkukViRg ++ mktemp + local LAST_ERR=/tmp/tmp.ToJ6fhJm5G + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete namespace smart-update-5816 namespace "smart-update-12230" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.SGHkukViRg + cat /tmp/tmp.ToJ6fhJm5G + rm /tmp/tmp.SGHkukViRg /tmp/tmp.ToJ6fhJm5G + return 0 + desc 'create namespace smart-update-5816' + set +o xtrace ----------------------------------------------------------------------------------- create namespace smart-update-5816 ----------------------------------------------------------------------------------- + kubectl_bin create namespace smart-update-5816 ++ mktemp + local LAST_OUT=/tmp/tmp.Dol105GsEk ++ mktemp + local LAST_ERR=/tmp/tmp.kaWYwz1y98 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace smart-update-5816 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Dol105GsEk namespace/smart-update-5816 created + cat /tmp/tmp.kaWYwz1y98 + rm /tmp/tmp.Dol105GsEk /tmp/tmp.kaWYwz1y98 + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.Z29Tk1vY9V +++ mktemp ++ local LAST_ERR=/tmp/tmp.hRQA6nGhZw ++ 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.Z29Tk1vY9V ++ cat /tmp/tmp.hRQA6nGhZw ++ rm /tmp/tmp.Z29Tk1vY9V /tmp/tmp.hRQA6nGhZw ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1352-9793733e-5-cluster6 --namespace=smart-update-5816 ++ mktemp + local LAST_OUT=/tmp/tmp.vQ4TbUXPZU ++ mktemp + local LAST_ERR=/tmp/tmp.CUdqYHN5Ar + 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-1352-9793733e-5-cluster6 --namespace=smart-update-5816 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.vQ4TbUXPZU Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1352-9793733e-5-cluster6" modified. + cat /tmp/tmp.CUdqYHN5Ar + rm /tmp/tmp.vQ4TbUXPZU /tmp/tmp.CUdqYHN5Ar + 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-1352/e2e-tests/smart-update/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.tYG7oDeLxn ++ mktemp + local LAST_ERR=/tmp/tmp.74zoEfQ1u6 + 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-1352/deploy/crd.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.tYG7oDeLxn 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.74zoEfQ1u6 + rm /tmp/tmp.tYG7oDeLxn /tmp/tmp.74zoEfQ1u6 + return 0 + '[' -n '' ']' + apply_rbac rbac + local operator_namespace=psmdb-operator + local rbac=rbac + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/deploy/rbac.yaml + kubectl_bin apply -f - + sed -e 's^namespace: .*^namespace: psmdb-operator^' ++ mktemp + local LAST_OUT=/tmp/tmp.9bHMJmtAub ++ mktemp + local LAST_ERR=/tmp/tmp.lVe2qPtqFg + 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.9bHMJmtAub role.rbac.authorization.k8s.io/percona-server-mongodb-operator created serviceaccount/percona-server-mongodb-operator created rolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator created + cat /tmp/tmp.lVe2qPtqFg + rm /tmp/tmp.9bHMJmtAub /tmp/tmp.lVe2qPtqFg + return 0 + kubectl_bin apply -f - + yq eval ' (.spec.template.spec.containers[].image = "perconalab/percona-server-mongodb-operator:PR-1352-9793733e") | ((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") | ((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/deploy/operator.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.VC0fz8QhwS ++ mktemp + local LAST_ERR=/tmp/tmp.Zlobtgp5P7 + 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.VC0fz8QhwS deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.Zlobtgp5P7 + rm /tmp/tmp.VC0fz8QhwS /tmp/tmp.Zlobtgp5P7 + return 0 + sleep 2 ++ get_operator_pod ++ kubectl_bin get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.AHvOB6SVUR +++ mktemp ++ local LAST_ERR=/tmp/tmp.Khcju3FhBK ++ 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}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.AHvOB6SVUR ++ cat /tmp/tmp.Khcju3FhBK ++ rm /tmp/tmp.AHvOB6SVUR /tmp/tmp.Khcju3FhBK ++ return 0 + wait_pod percona-server-mongodb-operator-6b6bcb669-vbs65 + local pod=percona-server-mongodb-operator-6b6bcb669-vbs65 + set +o xtrace waiting for pod/percona-server-mongodb-operator-6b6bcb669-vbs65 to be ready.OK + 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-1352/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/conf/client.yml ++ mktemp + local LAST_OUT=/tmp/tmp.wN5BVAdnNm ++ mktemp + local LAST_ERR=/tmp/tmp.TDkLiwNRM0 + 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-1352/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/conf/client.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.wN5BVAdnNm secret/some-users created deployment.apps/psmdb-client created + cat /tmp/tmp.TDkLiwNRM0 + rm /tmp/tmp.wN5BVAdnNm /tmp/tmp.TDkLiwNRM0 + return 0 + IMAGE_MONGOD_TO_UPDATE=perconalab/percona-server-mongodb-operator:main-mongod5.0 + [[ perconalab/percona-server-mongodb-operator:main-mongod5.0 == *\p\e\r\c\o\n\a\-\s\e\r\v\e\r\-\m\o\n\g\o\d\b\-\o\p\e\r\a\t\o\r* ]] ++ echo -n perconalab/percona-server-mongodb-operator:main-mongod5.0 ++ /usr/bin/sed -r 's/.*([0-9].[0-9])$/\1/' + MONGO_VER=5.0 + IMAGE_MONGOD=percona/percona-server-mongodb:5.0 + desc 'create first PSMDB cluster smart-update' + set +o xtrace ----------------------------------------------------------------------------------- create first PSMDB cluster smart-update ----------------------------------------------------------------------------------- + spinup_psmdb smart-update-rs0 /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/conf/smart-update-rs0.yml + local cluster=smart-update-rs0 + local config=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/conf/smart-update-rs0.yml + local size=3 + desc 'create first PSMDB cluster' + set +o xtrace ----------------------------------------------------------------------------------- create first PSMDB cluster ----------------------------------------------------------------------------------- + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/conf/smart-update-rs0.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/conf/smart-update-rs0.yml + kubectl_bin apply -f - + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/conf/smart-update-rs0.yml + yq eval '(.spec | select(.image == null)).image = "percona/percona-server-mongodb:5.0"' ++ mktemp + yq eval '(.spec | select(has("pmm"))).pmm.image = "perconalab/pmm-client:dev-latest"' + local LAST_OUT=/tmp/tmp.m1uZjPYIFi + yq eval '(.spec | select(has("backup"))).backup.image = "perconalab/percona-server-mongodb-operator:main-backup"' ++ mktemp + local LAST_ERR=/tmp/tmp.LpVJUOFLNv + local exit_status=0 + local timeout=4 ++ seq 0 2 + yq eval '.spec.upgradeOptions.apply="Never"' + 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.m1uZjPYIFi perconaservermongodb.psmdb.percona.com/smart-update created + cat /tmp/tmp.LpVJUOFLNv + rm /tmp/tmp.m1uZjPYIFi /tmp/tmp.LpVJUOFLNv + return 0 + desc 'check if Pod is started' + set +o xtrace ----------------------------------------------------------------------------------- check if Pod is started ----------------------------------------------------------------------------------- + wait_for_running smart-update-rs0 3 + local name=smart-update-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=smart-update ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod smart-update-rs0-0 + local pod=smart-update-rs0-0 + set +o xtrace waiting for pod/smart-update-rs0-0 to be ready.........OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod smart-update-rs0-1 + local pod=smart-update-rs0-1 + set +o xtrace waiting for pod/smart-update-rs0-1 to be ready........OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb smart-update -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.IXUaAgGlIW +++ mktemp ++ local LAST_ERR=/tmp/tmp.RXgb370rXw ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb smart-update -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.IXUaAgGlIW ++ cat /tmp/tmp.RXgb370rXw ++ rm /tmp/tmp.IXUaAgGlIW /tmp/tmp.RXgb370rXw ++ return 0 + [[ true == \t\r\u\e ]] + wait_pod smart-update-rs0-arbiter-0 + local pod=smart-update-rs0-arbiter-0 + set +o xtrace waiting for pod/smart-update-rs0-arbiter-0 to be ready.OK ++ kubectl_bin get psmdb smart-update -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.rudq07ZZXW +++ mktemp ++ local LAST_ERR=/tmp/tmp.JRqk5jPLXF ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb smart-update -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.rudq07ZZXW ++ cat /tmp/tmp.JRqk5jPLXF ++ rm /tmp/tmp.rudq07ZZXW /tmp/tmp.JRqk5jPLXF ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness........... + sleep 20 + compare_kubectl statefulset/smart-update-rs0 + local resource=statefulset/smart-update-rs0 + local postfix= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml + local new_result=/tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-oc.yml ']' + kubectl_bin get -o yaml statefulset/smart-update-rs0 ++ mktemp + yq eval ' del(.metadata.ownerReferences[].apiVersion) | del(.metadata.managedFields) | del(.. | select(has("creationTimestamp")).creationTimestamp) | del(.. | select(has("namespace")).namespace) | del(.. | select(has("uid")).uid) | del(.metadata.resourceVersion) | del(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) | del(.metadata.selfLink) | del(.metadata.annotations."cloud.google.com/neg") | del(.. | select(has("image")).image) | del(.. | select(has("clusterIP")).clusterIP) | del(.. | select(has("clusterIPs")).clusterIPs) | del(.. | select(has("dataSource")).dataSource) | del(.. | select(has("procMount")).procMount) | del(.. | select(has("storageClassName")).storageClassName) | del(.. | select(has("finalizers")).finalizers) | del(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") | del(.. | select(has("volumeName")).volumeName) | del(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") | del(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") | del(.spec.volumeMode) | del(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") | del(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") | del(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") | del(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") | del(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") | del(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) | del(.. | select(has("healthCheckNodePort")).healthCheckNodePort) | del(.. | select(has("nodePort")).nodePort) | del(.status) | (.. | select(tag == "!!str")) |= sub("smart-update-5816", "NAME_SPACE") | del(.spec.volumeClaimTemplates[].apiVersion) | del(.spec.volumeClaimTemplates[].kind) | del(.spec.ipFamilies) | del(.spec.ipFamilyPolicy) | (.. | select(. == "extensions/v1beta1")) = "apps/v1" | (.. | select(. == "batch/v1beta1")) = "batch/v1" ' - + local LAST_OUT=/tmp/tmp.KiiW8wQIGh ++ mktemp + local LAST_ERR=/tmp/tmp.LT6i6xo9mz + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl get -o yaml statefulset/smart-update-rs0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.KiiW8wQIGh + cat /tmp/tmp.LT6i6xo9mz + rm /tmp/tmp.KiiW8wQIGh /tmp/tmp.LT6i6xo9mz + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0.yml + version_gt 1.22 ++ bc -l ++ echo '1.24 >= 1.22' + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml == */cronjob* ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0.yml + desc 'write data' + set +o xtrace ----------------------------------------------------------------------------------- write data ----------------------------------------------------------------------------------- + run_mongo 'db.createUser({user: "myApp", pwd: "myPass", roles: [{ db: "myApp", role: "readWrite" }]})' userAdmin:userAdmin123456@smart-update-rs0.smart-update-5816 + local 'command=db.createUser({user: "myApp", pwd: "myPass", roles: [{ db: "myApp", role: "readWrite" }]})' + local uri=userAdmin:userAdmin123456@smart-update-rs0.smart-update-5816 + local driver=mongodb+srv + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.mkaXuYpvmv +++ mktemp ++ local LAST_ERR=/tmp/tmp.hHFzd4oJfs ++ 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.mkaXuYpvmv ++ cat /tmp/tmp.hHFzd4oJfs ++ rm /tmp/tmp.mkaXuYpvmv /tmp/tmp.hHFzd4oJfs ++ return 0 + local client_container=psmdb-client-9b7b5fdcc-xjv7f + local mongo_flag= + [[ userAdmin:userAdmin123456@smart-update-rs0.smart-update-5816 == *cfg* ]] + replica_set=rs0 + kubectl_bin exec psmdb-client-9b7b5fdcc-xjv7f -- bash -c 'printf '\''db.createUser({user: "myApp", pwd: "myPass", roles: [{ db: "myApp", role: "readWrite" }]})\n'\'' | mongo mongodb+srv://userAdmin:userAdmin123456@smart-update-rs0.smart-update-5816.svc.cluster.local/admin?ssl=false\&replicaSet=rs0 ' ++ mktemp + local LAST_OUT=/tmp/tmp.6e0eCrwN9u ++ mktemp + local LAST_ERR=/tmp/tmp.QUum6vGC4R + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-9b7b5fdcc-xjv7f -- bash -c 'printf '\''db.createUser({user: "myApp", pwd: "myPass", roles: [{ db: "myApp", role: "readWrite" }]})\n'\'' | mongo mongodb+srv://userAdmin:userAdmin123456@smart-update-rs0.smart-update-5816.svc.cluster.local/admin?ssl=false\&replicaSet=rs0 ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.6e0eCrwN9u Percona Server for MongoDB shell version v4.4.24-23 connecting to: mongodb://smart-update-rs0-arbiter-0.smart-update-rs0.smart-update-5816.svc.cluster.local:27017,smart-update-rs0-0.smart-update-rs0.smart-update-5816.svc.cluster.local:27017,smart-update-rs0-3.smart-update-rs0.smart-update-5816.svc.cluster.local:27017,smart-update-rs0-2.smart-update-rs0.smart-update-5816.svc.cluster.local:27017,smart-update-rs0-1.smart-update-rs0.smart-update-5816.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb&replicaSet=rs0&ssl=false Implicit session: session { "id" : UUID("0b1b105c-307a-4fd4-8f95-03c4f60233e8") } Percona Server for MongoDB server version: v5.0.20-17 WARNING: shell and server versions do not match Successfully added user: { "user" : "myApp", "roles" : [ { "db" : "myApp", "role" : "readWrite" } ] } bye + cat /tmp/tmp.QUum6vGC4R + rm /tmp/tmp.6e0eCrwN9u /tmp/tmp.QUum6vGC4R + return 0 + run_mongo 'use myApp\n db.test.insert({ x: 100500 })' myApp:myPass@smart-update-rs0.smart-update-5816 + local 'command=use myApp\n db.test.insert({ x: 100500 })' + local uri=myApp:myPass@smart-update-rs0.smart-update-5816 + local driver=mongodb+srv + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.x7cxRUcXGj +++ mktemp ++ local LAST_ERR=/tmp/tmp.HsVyImo3zJ ++ 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.x7cxRUcXGj ++ cat /tmp/tmp.HsVyImo3zJ ++ rm /tmp/tmp.x7cxRUcXGj /tmp/tmp.HsVyImo3zJ ++ return 0 + local client_container=psmdb-client-9b7b5fdcc-xjv7f + local mongo_flag= + [[ myApp:myPass@smart-update-rs0.smart-update-5816 == *cfg* ]] + replica_set=rs0 + kubectl_bin exec psmdb-client-9b7b5fdcc-xjv7f -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb+srv://myApp:myPass@smart-update-rs0.smart-update-5816.svc.cluster.local/admin?ssl=false\&replicaSet=rs0 ' ++ mktemp + local LAST_OUT=/tmp/tmp.NZfNV6fFCg ++ mktemp + local LAST_ERR=/tmp/tmp.vh4LIjQfWl + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-9b7b5fdcc-xjv7f -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb+srv://myApp:myPass@smart-update-rs0.smart-update-5816.svc.cluster.local/admin?ssl=false\&replicaSet=rs0 ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.NZfNV6fFCg Percona Server for MongoDB shell version v4.4.24-23 connecting to: mongodb://smart-update-rs0-0.smart-update-rs0.smart-update-5816.svc.cluster.local:27017,smart-update-rs0-arbiter-0.smart-update-rs0.smart-update-5816.svc.cluster.local:27017,smart-update-rs0-1.smart-update-rs0.smart-update-5816.svc.cluster.local:27017,smart-update-rs0-2.smart-update-rs0.smart-update-5816.svc.cluster.local:27017,smart-update-rs0-3.smart-update-rs0.smart-update-5816.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb&replicaSet=rs0&ssl=false Implicit session: session { "id" : UUID("1277b3ae-7cff-4a3b-a031-9e8be4f9e280") } Percona Server for MongoDB server version: v5.0.20-17 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.vh4LIjQfWl + rm /tmp/tmp.NZfNV6fFCg /tmp/tmp.vh4LIjQfWl + return 0 + desc 'check if statefulsets created with expected config' + set +o xtrace ----------------------------------------------------------------------------------- check if statefulsets created with expected config ----------------------------------------------------------------------------------- + compare_kubectl statefulset/smart-update-rs0 + local resource=statefulset/smart-update-rs0 + local postfix= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml + local new_result=/tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-oc.yml ']' + yq eval ' del(.metadata.ownerReferences[].apiVersion) | del(.metadata.managedFields) | del(.. | select(has("creationTimestamp")).creationTimestamp) | del(.. | select(has("namespace")).namespace) | del(.. | select(has("uid")).uid) | del(.metadata.resourceVersion) | del(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) | del(.metadata.selfLink) | del(.metadata.annotations."cloud.google.com/neg") | del(.. | select(has("image")).image) | del(.. | select(has("clusterIP")).clusterIP) | del(.. | select(has("clusterIPs")).clusterIPs) | del(.. | select(has("dataSource")).dataSource) | del(.. | select(has("procMount")).procMount) | del(.. | select(has("storageClassName")).storageClassName) | del(.. | select(has("finalizers")).finalizers) | del(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") | del(.. | select(has("volumeName")).volumeName) | del(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") | del(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") | del(.spec.volumeMode) | del(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") | del(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") | del(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") | del(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") | del(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") | del(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) | del(.. | select(has("healthCheckNodePort")).healthCheckNodePort) | del(.. | select(has("nodePort")).nodePort) | del(.status) | (.. | select(tag == "!!str")) |= sub("smart-update-5816", "NAME_SPACE") | del(.spec.volumeClaimTemplates[].apiVersion) | del(.spec.volumeClaimTemplates[].kind) | del(.spec.ipFamilies) | del(.spec.ipFamilyPolicy) | (.. | select(. == "extensions/v1beta1")) = "apps/v1" | (.. | select(. == "batch/v1beta1")) = "batch/v1" ' - + kubectl_bin get -o yaml statefulset/smart-update-rs0 ++ mktemp + local LAST_OUT=/tmp/tmp.jEH5VfKWew ++ mktemp + local LAST_ERR=/tmp/tmp.gOWj26i7dS + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl get -o yaml statefulset/smart-update-rs0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.jEH5VfKWew + cat /tmp/tmp.gOWj26i7dS + rm /tmp/tmp.jEH5VfKWew /tmp/tmp.gOWj26i7dS + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0.yml + version_gt 1.22 ++ echo '1.24 >= 1.22' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml == */cronjob* ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0.yml + compare_kubectl statefulset/smart-update-rs0-arbiter + local resource=statefulset/smart-update-rs0-arbiter + local postfix= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter.yml + local new_result=/tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0-arbiter.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter-oc.yml ']' + yq eval ' del(.metadata.ownerReferences[].apiVersion) | del(.metadata.managedFields) | del(.. | select(has("creationTimestamp")).creationTimestamp) | del(.. | select(has("namespace")).namespace) | del(.. | select(has("uid")).uid) | del(.metadata.resourceVersion) | del(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) | del(.metadata.selfLink) | del(.metadata.annotations."cloud.google.com/neg") | del(.. | select(has("image")).image) | del(.. | select(has("clusterIP")).clusterIP) | del(.. | select(has("clusterIPs")).clusterIPs) | del(.. | select(has("dataSource")).dataSource) | del(.. | select(has("procMount")).procMount) | del(.. | select(has("storageClassName")).storageClassName) | del(.. | select(has("finalizers")).finalizers) | del(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") | del(.. | select(has("volumeName")).volumeName) | del(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") | del(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") | del(.spec.volumeMode) | del(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") | del(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") | del(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") | del(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") | del(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") | del(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) | del(.. | select(has("healthCheckNodePort")).healthCheckNodePort) | del(.. | select(has("nodePort")).nodePort) | del(.status) | (.. | select(tag == "!!str")) |= sub("smart-update-5816", "NAME_SPACE") | del(.spec.volumeClaimTemplates[].apiVersion) | del(.spec.volumeClaimTemplates[].kind) | del(.spec.ipFamilies) | del(.spec.ipFamilyPolicy) | (.. | select(. == "extensions/v1beta1")) = "apps/v1" | (.. | select(. == "batch/v1beta1")) = "batch/v1" ' - + kubectl_bin get -o yaml statefulset/smart-update-rs0-arbiter ++ mktemp + local LAST_OUT=/tmp/tmp.hx7RfbRXJi ++ mktemp + local LAST_ERR=/tmp/tmp.y9h4AvEJUW + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl get -o yaml statefulset/smart-update-rs0-arbiter + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.hx7RfbRXJi + cat /tmp/tmp.y9h4AvEJUW + rm /tmp/tmp.hx7RfbRXJi /tmp/tmp.y9h4AvEJUW + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0-arbiter.yml + version_gt 1.22 ++ bc -l ++ echo '1.24 >= 1.22' + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0-arbiter.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0-arbiter.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter.yml == */cronjob* ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter.yml /tmp/tmp.fBW6aoOyUJ/statefulset_smart-update-rs0-arbiter.yml + sleep 10 + desc 'create user clusterAdmin' + set +o xtrace ----------------------------------------------------------------------------------- create user clusterAdmin ----------------------------------------------------------------------------------- ++ get_mongo_primary clusterAdmin:clusterAdmin123456@smart-update-rs0.smart-update-5816 smart-update ++ local uri=clusterAdmin:clusterAdmin123456@smart-update-rs0.smart-update-5816 ++ local cluster=smart-update ++ set_debug ++ [[ 1 == 1 ]] ++ set -o xtrace +++ get_mongo_primary_endpoint clusterAdmin:clusterAdmin123456@smart-update-rs0.smart-update-5816 +++ local uri=clusterAdmin:clusterAdmin123456@smart-update-rs0.smart-update-5816 +++ run_mongo 'db.isMaster().me' clusterAdmin:clusterAdmin123456@smart-update-rs0.smart-update-5816 mongodb :27017 +++ local 'command=db.isMaster().me' +++ local uri=clusterAdmin:clusterAdmin123456@smart-update-rs0.smart-update-5816 +++ local driver=mongodb +++ local suffix=:27017 +++ grep ':27017$' +++ sed -e 's^20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9]+[0-9][0-9][0-9][0-9]^^' ++++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ egrep -v 'Time|Percona Server for MongoDB|bye|BinData|NumberLong|connecting to|Error saving history file|I NETWORK|W NETWORK|Implicit session:|versions do not match' +++++ mktemp ++++ local LAST_OUT=/tmp/tmp.tHHe58jvkJ +++++ mktemp ++++ local LAST_ERR=/tmp/tmp.Ivj1vq6lZZ ++++ 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.tHHe58jvkJ ++++ cat /tmp/tmp.Ivj1vq6lZZ ++++ rm /tmp/tmp.tHHe58jvkJ /tmp/tmp.Ivj1vq6lZZ ++++ return 0 +++ local client_container=psmdb-client-9b7b5fdcc-xjv7f +++ local mongo_flag= +++ [[ clusterAdmin:clusterAdmin123456@smart-update-rs0.smart-update-5816 == *cfg* ]] +++ replica_set=rs0 +++ kubectl_bin exec psmdb-client-9b7b5fdcc-xjv7f -- bash -c 'printf '\''db.isMaster().me\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@smart-update-rs0.smart-update-5816:27017/admin?ssl=false\&replicaSet=rs0 ' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.BKrgetaWu6 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.5WgsdTTjgy +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl exec psmdb-client-9b7b5fdcc-xjv7f -- bash -c 'printf '\''db.isMaster().me\n'\'' | mongo mongodb://clusterAdmin:clusterAdmin123456@smart-update-rs0.smart-update-5816:27017/admin?ssl=false\&replicaSet=rs0 ' +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.BKrgetaWu6 +++ cat /tmp/tmp.5WgsdTTjgy +++ rm /tmp/tmp.BKrgetaWu6 /tmp/tmp.5WgsdTTjgy +++ return 0 ++ endpoint=smart-update-rs0-0.smart-update-rs0.smart-update-5816.svc.cluster.local:27017 ++ [[ smart-update-rs0-0.smart-update-rs0.smart-update-5816.svc.cluster.local:27017 =~ \.smart-update ]] ++ echo smart-update-rs0-0.smart-update-rs0.smart-update-5816.svc.cluster.local:27017 ++ cut -d . -f 1 + initial_primary=smart-update-rs0-0 + pods=($(kubectl get pods -l app.kubernetes.io/name=percona-server-mongodb -o=name | grep -v arbiter | sed 's/pod\///g' | sed "s/${initial_primary}//g" | sort -r)) ++ sed 's/pod\///g' ++ grep -v arbiter ++ sort -r ++ sed s/smart-update-rs0-0//g ++ kubectl get pods -l app.kubernetes.io/name=percona-server-mongodb -o=name + desc 'change the image for rs perconalab/percona-server-mongodb-operator:main-mongod5.0' + set +o xtrace ----------------------------------------------------------------------------------- change the image for rs perconalab/percona-server-mongodb-operator:main-mongod5.0 ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb smart-update --type=merge --patch '{ "spec": { "image": "perconalab/percona-server-mongodb-operator:main-mongod5.0" }}' ++ mktemp + local LAST_OUT=/tmp/tmp.K49vExmKGv ++ mktemp + local LAST_ERR=/tmp/tmp.IYJx3bF9iR + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl patch psmdb smart-update --type=merge --patch '{ "spec": { "image": "perconalab/percona-server-mongodb-operator:main-mongod5.0" }}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.K49vExmKGv perconaservermongodb.psmdb.percona.com/smart-update patched + cat /tmp/tmp.IYJx3bF9iR + rm /tmp/tmp.K49vExmKGv /tmp/tmp.IYJx3bF9iR + return 0 + for pod in '"${pods[@]}"' + check_pod_update smart-update-rs0-3 + local pod_name=smart-update-rs0-3 + local img= + echo 'wait for smart-update-rs0-3 update' wait for smart-update-rs0-3 update + set +o xtrace ......OK: Image perconalab/percona-server-mongodb-operator:main-mongod5.0 was updated for pod smart-update-rs0-3! + wait_pod smart-update-rs0-3 + local pod=smart-update-rs0-3 + set +o xtrace waiting for pod/smart-update-rs0-3 to be ready.......OK + for pod in '"${pods[@]}"' + check_pod_update smart-update-rs0-2 + local pod_name=smart-update-rs0-2 + local img= + echo 'wait for smart-update-rs0-2 update' wait for smart-update-rs0-2 update + set +o xtrace ....OK: Image perconalab/percona-server-mongodb-operator:main-mongod5.0 was updated for pod smart-update-rs0-2! + wait_pod smart-update-rs0-2 + local pod=smart-update-rs0-2 + set +o xtrace waiting for pod/smart-update-rs0-2 to be ready......OK + for pod in '"${pods[@]}"' + check_pod_update smart-update-rs0-1 + local pod_name=smart-update-rs0-1 + local img= + echo 'wait for smart-update-rs0-1 update' wait for smart-update-rs0-1 update + set +o xtrace .....OK: Image perconalab/percona-server-mongodb-operator:main-mongod5.0 was updated for pod smart-update-rs0-1! + wait_pod smart-update-rs0-1 + local pod=smart-update-rs0-1 + set +o xtrace waiting for pod/smart-update-rs0-1 to be ready........OK + desc 'check primary should have old image' + set +o xtrace ----------------------------------------------------------------------------------- check primary should have old image ----------------------------------------------------------------------------------- ++ kubectl get pod/smart-update-rs0-0 -o 'jsonpath={.spec.containers[0].image}' + img=percona/percona-server-mongodb:5.0 + '[' percona/percona-server-mongodb:5.0 '!=' percona/percona-server-mongodb:5.0 ']' + desc 'wait for primary smart-update-rs0-0 update' + set +o xtrace ----------------------------------------------------------------------------------- wait for primary smart-update-rs0-0 update ----------------------------------------------------------------------------------- + check_pod_update smart-update-rs0-0 + local pod_name=smart-update-rs0-0 + local img= + echo 'wait for smart-update-rs0-0 update' wait for smart-update-rs0-0 update + set +o xtrace ....OK: Image perconalab/percona-server-mongodb-operator:main-mongod5.0 was updated for pod smart-update-rs0-0! + wait_pod smart-update-rs0-0 + local pod=smart-update-rs0-0 + set +o xtrace waiting for pod/smart-update-rs0-0 to be ready.......OK + desc 'wait for arbiter pod update' + set +o xtrace ----------------------------------------------------------------------------------- wait for arbiter pod update ----------------------------------------------------------------------------------- + check_pod_update smart-update-rs0-arbiter-0 + local pod_name=smart-update-rs0-arbiter-0 + local img= + echo 'wait for smart-update-rs0-arbiter-0 update' wait for smart-update-rs0-arbiter-0 update + set +o xtrace .OK: Image perconalab/percona-server-mongodb-operator:main-mongod5.0 was updated for pod smart-update-rs0-arbiter-0! + wait_pod smart-update-rs0-arbiter-0 + local pod=smart-update-rs0-arbiter-0 + set +o xtrace waiting for pod/smart-update-rs0-arbiter-0 to be ready.....OK + restarted_pods=($(kubectl get pods -l app.kubernetes.io/name=percona-server-mongodb -o=name --sort-by=.status.startTime | sed 's/pod\///g')) ++ kubectl get pods -l app.kubernetes.io/name=percona-server-mongodb -o=name --sort-by=.status.startTime ++ sed 's/pod\///g' + pods+=("${initial_primary}") + for i in '"${!pods[@]}"' + '[' smart-update-rs0-3 '!=' smart-update-rs0-3 ']' + for i in '"${!pods[@]}"' + '[' smart-update-rs0-2 '!=' smart-update-rs0-2 ']' + for i in '"${!pods[@]}"' + '[' smart-update-rs0-1 '!=' smart-update-rs0-1 ']' + for i in '"${!pods[@]}"' + '[' smart-update-rs0-0 '!=' smart-update-rs0-0 ']' + destroy smart-update-5816 + local namespace=smart-update-5816 + 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-1352/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.o3BLpL4F2L ++ mktemp + local LAST_ERR=/tmp/tmp.92nPOUBF5c + 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-1352/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.o3BLpL4F2L 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.92nPOUBF5c + rm /tmp/tmp.o3BLpL4F2L /tmp/tmp.92nPOUBF5c + return 0 ++ grep -v '\-\-\-' ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/deploy/crd.yaml + 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 + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' + grep -v NAMESPACE 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.llUQaue6NS ++ mktemp + local LAST_ERR=/tmp/tmp.6LzOu6kB4c + 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.llUQaue6NS + cat /tmp/tmp.6LzOu6kB4c + rm /tmp/tmp.llUQaue6NS /tmp/tmp.6LzOu6kB4c + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + grep -v NAMESPACE + kubectl get perconaservermongodbrestores.psmdb.percona.com --all-namespaces -o wide + 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.KBIYUIJBbz ++ mktemp + local LAST_ERR=/tmp/tmp.rbfZxy3lPa + 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.KBIYUIJBbz + cat /tmp/tmp.rbfZxy3lPa + rm /tmp/tmp.KBIYUIJBbz /tmp/tmp.rbfZxy3lPa + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide 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.G7y1mGG26R ++ mktemp + local LAST_ERR=/tmp/tmp.g4uVBALnui + 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.G7y1mGG26R + cat /tmp/tmp.g4uVBALnui + rm /tmp/tmp.G7y1mGG26R /tmp/tmp.g4uVBALnui + return 0 + local rbac_yaml=rbac.yaml + '[' -n '' ']' + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1352/deploy/rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.PvpFhCiDUv ++ mktemp + local LAST_ERR=/tmp/tmp.w2vH2uzwIt + 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-1352/deploy/rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.PvpFhCiDUv role.rbac.authorization.k8s.io "percona-server-mongodb-operator" deleted serviceaccount "percona-server-mongodb-operator" deleted rolebinding.rbac.authorization.k8s.io "service-account-percona-server-mongodb-operator" deleted + cat /tmp/tmp.w2vH2uzwIt + rm /tmp/tmp.PvpFhCiDUv /tmp/tmp.w2vH2uzwIt + return 0 + kubectl_bin delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.4/cert-manager.yaml + : + '[' -n '' ']' + '[' -n '' ']' + rm -rf /tmp/tmp.fBW6aoOyUJ + kubectl_bin delete --grace-period=0 --force=true namespace smart-update-5816 ++ mktemp + local LAST_OUT=/tmp/tmp.iW7kUqs5DZ ++ mktemp + local LAST_ERR=/tmp/tmp.SYFSZHQaVl + 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 smart-update-5816 + desc 'test passed' + set +o xtrace ----------------------------------------------------------------------------------- test passed -----------------------------------------------------------------------------------