Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/logs/liveness.log WARNING: version difference between client (1.30) and server (1.27) exceeds the supported minor version skew of +/-1 WARNING: version difference between client (1.30) and server (1.27) exceeds the supported minor version skew of +/-1 WARNING: version difference between client (1.30) and server (1.27) exceeds the supported minor version skew of +/-1 + create_infra liveness-16712 + local ns=liveness-16712 + 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-1613/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.AFCfIcH346 ++ mktemp + local LAST_ERR=/tmp/tmp.dDqMNf4ENS + 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-1613/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.AFCfIcH346 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.dDqMNf4ENS + rm /tmp/tmp.AFCfIcH346 /tmp/tmp.dDqMNf4ENS + return 0 ++ grep -v '\-\-\-' ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/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.AjaeLkg5gx ++ mktemp + local LAST_ERR=/tmp/tmp.9tiXWXHVqF + 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.AjaeLkg5gx + cat /tmp/tmp.9tiXWXHVqF + rm /tmp/tmp.AjaeLkg5gx /tmp/tmp.9tiXWXHVqF + 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.gOrEzlZj27 ++ mktemp + local LAST_ERR=/tmp/tmp.tLLaIPNnoY + 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.gOrEzlZj27 + cat /tmp/tmp.tLLaIPNnoY + rm /tmp/tmp.gOrEzlZj27 /tmp/tmp.tLLaIPNnoY + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbs" + kubectl patch perconaservermongodbs.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbs" + : + kubectl_bin wait --for=delete crd perconaservermongodbs.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.61xnSyBtdm ++ mktemp + local LAST_ERR=/tmp/tmp.AvyuPTkAp1 + 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.61xnSyBtdm + cat /tmp/tmp.AvyuPTkAp1 + rm /tmp/tmp.61xnSyBtdm /tmp/tmp.AvyuPTkAp1 + 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-1613/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.NkPWe73Dlb ++ mktemp + local LAST_ERR=/tmp/tmp.R6ivHDgvlM + 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-1613/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.NkPWe73Dlb 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.R6ivHDgvlM + rm /tmp/tmp.NkPWe73Dlb /tmp/tmp.R6ivHDgvlM + return 0 + check_crd_for_deletion PR-1613-028512e7 + local git_tag=PR-1613-028512e7 ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-1613-028512e7/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.uOQDcmbmt7 +++ mktemp ++ local LAST_ERR=/tmp/tmp.EEocppwVGd ++ 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.uOQDcmbmt7 ++ cat /tmp/tmp.EEocppwVGd 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.uOQDcmbmt7 ++ cat /tmp/tmp.EEocppwVGd 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.uOQDcmbmt7 ++ cat /tmp/tmp.EEocppwVGd Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 8 ++ cat /tmp/tmp.uOQDcmbmt7 ++ cat /tmp/tmp.EEocppwVGd Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.uOQDcmbmt7 /tmp/tmp.EEocppwVGd ++ 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 ++ sed s/NAMESPACE// ++ awk '-F ' '{print $2}' ++ tail -n1 ++ helm list --all-namespaces --filter chaos-mesh + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ awk '{print $1}' ++ grep chaos-mesh + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ awk '{print $1}' ++ grep chaos-mesh + 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 ++ awk '{print $1}' ++ grep chaos-mesh + 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 + egrep -v '^kube-|^default|Terminating|psmdb-operator|openshift|gke-mcs|^NAME' + awk '{print$1}' + '[' -n '' ']' + desc 'cleaned up old namespaces psmdb-operator' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces psmdb-operator ----------------------------------------------------------------------------------- + kubectl_bin delete namespace psmdb-operator --ignore-not-found ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.Hn9WheQTkR + xargs kubectl delete ns ++ mktemp + local LAST_ERR=/tmp/tmp.CvEyFJFOeN + local exit_status=0 + local timeout=4 + local LAST_OUT=/tmp/tmp.v5jUi42MEc ++ seq 0 2 ++ mktemp + for i in '$(seq 0 2)' + set +e + kubectl get ns + local LAST_ERR=/tmp/tmp.Qbs2jjKn1f + 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 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Hn9WheQTkR + cat /tmp/tmp.CvEyFJFOeN + rm /tmp/tmp.Hn9WheQTkR /tmp/tmp.CvEyFJFOeN + return 0 namespace "gmp-public" deleted namespace "gmp-system" deleted namespace "liveness-13086" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.v5jUi42MEc namespace "psmdb-operator" deleted + cat /tmp/tmp.Qbs2jjKn1f + rm /tmp/tmp.v5jUi42MEc /tmp/tmp.Qbs2jjKn1f + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.Ln0UbrP15G ++ mktemp + local LAST_ERR=/tmp/tmp.xSlMKs2ThL + 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.Ln0UbrP15G + cat /tmp/tmp.xSlMKs2ThL + rm /tmp/tmp.Ln0UbrP15G /tmp/tmp.xSlMKs2ThL + 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.rKxonKh0NV ++ mktemp + local LAST_ERR=/tmp/tmp.F8RGgIHRT1 + 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.rKxonKh0NV namespace/psmdb-operator created + cat /tmp/tmp.F8RGgIHRT1 + rm /tmp/tmp.rKxonKh0NV /tmp/tmp.F8RGgIHRT1 + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.Gr7me1Zx0O +++ mktemp ++ local LAST_ERR=/tmp/tmp.1Em2mryuf9 ++ 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.Gr7me1Zx0O ++ cat /tmp/tmp.1Em2mryuf9 ++ rm /tmp/tmp.Gr7me1Zx0O /tmp/tmp.1Em2mryuf9 ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1613-028512e7-2-cluster7 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.yGG9mP8wjM ++ mktemp + local LAST_ERR=/tmp/tmp.z6Tt77LAhC + 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-1613-028512e7-2-cluster7 --namespace=psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.yGG9mP8wjM Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1613-028512e7-2-cluster7" modified. + cat /tmp/tmp.z6Tt77LAhC + rm /tmp/tmp.yGG9mP8wjM /tmp/tmp.z6Tt77LAhC + 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-1613/e2e-tests/liveness/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.rWed2TxTar ++ mktemp + local LAST_ERR=/tmp/tmp.qHlOI0hzqa + 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-1613/deploy/crd.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.rWed2TxTar 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.qHlOI0hzqa + rm /tmp/tmp.rWed2TxTar /tmp/tmp.qHlOI0hzqa + 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-1613/deploy/cw-rbac.yaml + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.WG5RSzGKXm ++ mktemp + local LAST_ERR=/tmp/tmp.iXCUnSiLSN + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -n psmdb-operator -f - + sed -e 's^namespace: .*^namespace: psmdb-operator^' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.WG5RSzGKXm 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.iXCUnSiLSN + rm /tmp/tmp.WG5RSzGKXm /tmp/tmp.iXCUnSiLSN + return 0 + kubectl_bin apply -f - ++ mktemp + yq eval ' (.spec.template.spec.containers[].image = "perconalab/percona-server-mongodb-operator:PR-1613-028512e7") | ((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") | ((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/deploy/cw-operator.yaml + local LAST_OUT=/tmp/tmp.nqlVO464fK ++ mktemp + local LAST_ERR=/tmp/tmp.igCsx29EaW + 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.nqlVO464fK deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.igCsx29EaW + rm /tmp/tmp.nqlVO464fK /tmp/tmp.igCsx29EaW + 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.mGIrRROfIr +++ mktemp ++ local LAST_ERR=/tmp/tmp.ugH6KaoovY ++ 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.mGIrRROfIr ++ cat /tmp/tmp.ugH6KaoovY ++ rm /tmp/tmp.mGIrRROfIr /tmp/tmp.ugH6KaoovY ++ return 0 + wait_pod percona-server-mongodb-operator-756cdb5956-ksbck + local pod=percona-server-mongodb-operator-756cdb5956-ksbck + set +o xtrace waiting for pod/percona-server-mongodb-operator-756cdb5956-ksbck to be ready.OK + create_namespace liveness-16712 + local namespace=liveness-16712 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ sed s/NAMESPACE// ++ awk '-F ' '{print $2}' + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ 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}' ++ awk '{print $1}' ++ kubectl get crd ++ grep chaos-mesh.org + 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 + : ++ 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 + egrep -v '^kube-|^default|Terminating|psmdb-operator|openshift|gke-mcs|^NAME' + awk '{print$1}' + '[' -n '' ']' + xargs kubectl delete ns + desc 'cleaned up old namespaces liveness-16712' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces liveness-16712 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace liveness-16712 --ignore-not-found ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.9gLBwrPzxA ++ mktemp + local LAST_OUT=/tmp/tmp.VF47IhM4Dx ++ mktemp + local LAST_ERR=/tmp/tmp.pfi2y7QggH + local exit_status=0 + local timeout=4 ++ seq 0 2 + local LAST_ERR=/tmp/tmp.zsv97qXZlW + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl get ns + for i in '$(seq 0 2)' + set +e + kubectl delete namespace liveness-16712 --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.9gLBwrPzxA + cat /tmp/tmp.pfi2y7QggH + rm /tmp/tmp.9gLBwrPzxA /tmp/tmp.pfi2y7QggH + return 0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.VF47IhM4Dx + cat /tmp/tmp.zsv97qXZlW + rm /tmp/tmp.VF47IhM4Dx /tmp/tmp.zsv97qXZlW + return 0 + kubectl_bin wait --for=delete namespace liveness-16712 ++ mktemp + local LAST_OUT=/tmp/tmp.cdDkVnom04 ++ mktemp + local LAST_ERR=/tmp/tmp.ksaUz0MHkW + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete namespace liveness-16712 namespace "gmp-public" deleted namespace "gmp-system" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.cdDkVnom04 + cat /tmp/tmp.ksaUz0MHkW + rm /tmp/tmp.cdDkVnom04 /tmp/tmp.ksaUz0MHkW + return 0 + desc 'create namespace liveness-16712' + set +o xtrace ----------------------------------------------------------------------------------- create namespace liveness-16712 ----------------------------------------------------------------------------------- + kubectl_bin create namespace liveness-16712 ++ mktemp + local LAST_OUT=/tmp/tmp.0Pr5SWShAk ++ mktemp + local LAST_ERR=/tmp/tmp.mPY6YvNG9H + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace liveness-16712 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.0Pr5SWShAk namespace/liveness-16712 created + cat /tmp/tmp.mPY6YvNG9H + rm /tmp/tmp.0Pr5SWShAk /tmp/tmp.mPY6YvNG9H + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.WwN9sMoV9F +++ mktemp ++ local LAST_ERR=/tmp/tmp.mxNsLAuH2n ++ 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.WwN9sMoV9F ++ cat /tmp/tmp.mxNsLAuH2n ++ rm /tmp/tmp.WwN9sMoV9F /tmp/tmp.mxNsLAuH2n ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1613-028512e7-2-cluster7 --namespace=liveness-16712 ++ mktemp + local LAST_OUT=/tmp/tmp.LwHwlJEMxf ++ mktemp + local LAST_ERR=/tmp/tmp.fE5Eww3Lyw + 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-1613-028512e7-2-cluster7 --namespace=liveness-16712 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.LwHwlJEMxf Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1613-028512e7-2-cluster7" modified. + cat /tmp/tmp.fE5Eww3Lyw + rm /tmp/tmp.LwHwlJEMxf /tmp/tmp.fE5Eww3Lyw + 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-1613/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/conf/client.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/conf/minio-secret.yml ++ mktemp + local LAST_OUT=/tmp/tmp.KkJAcnlIEP ++ mktemp + local LAST_ERR=/tmp/tmp.b54jPjV7vl + 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-1613/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/conf/client.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/conf/minio-secret.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.KkJAcnlIEP secret/some-users created deployment.apps/psmdb-client created secret/minio-secret created + cat /tmp/tmp.b54jPjV7vl + rm /tmp/tmp.KkJAcnlIEP /tmp/tmp.b54jPjV7vl + return 0 + cluster=liveness + desc 'create first PSMDB cluster liveness' + set +o xtrace ----------------------------------------------------------------------------------- create first PSMDB cluster liveness ----------------------------------------------------------------------------------- + spinup_psmdb liveness-rs0 /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/conf/liveness-rs0.yml + local cluster=liveness-rs0 + local config=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/conf/liveness-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-1613/e2e-tests/liveness/conf/liveness-rs0.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/conf/liveness-rs0.yml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.UMdP1BsOae + yq eval '(.spec | select(has("initImage"))).initImage = "perconalab/percona-server-mongodb-operator:PR-1613-028512e7"' + 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("backup"))).backup.image = "perconalab/percona-server-mongodb-operator:main-backup"' ++ mktemp + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/conf/liveness-rs0.yml + yq eval '.spec.upgradeOptions.apply="Never"' + local LAST_ERR=/tmp/tmp.TP22Vwxi2S + 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.UMdP1BsOae perconaservermongodb.psmdb.percona.com/liveness created + cat /tmp/tmp.TP22Vwxi2S + rm /tmp/tmp.UMdP1BsOae /tmp/tmp.TP22Vwxi2S + return 0 + desc 'check if Pod is started' + set +o xtrace ----------------------------------------------------------------------------------- check if Pod is started ----------------------------------------------------------------------------------- + wait_for_running liveness-rs0 3 + local name=liveness-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=liveness ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod liveness-rs0-0 + local pod=liveness-rs0-0 + set +o xtrace waiting for pod/liveness-rs0-0 to be ready...............OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod liveness-rs0-1 + local pod=liveness-rs0-1 + set +o xtrace waiting for pod/liveness-rs0-1 to be ready..............OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb liveness -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.wZLM4wnzlK +++ mktemp ++ local LAST_ERR=/tmp/tmp.6YySWG2jCD ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb liveness -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.wZLM4wnzlK ++ cat /tmp/tmp.6YySWG2jCD ++ rm /tmp/tmp.wZLM4wnzlK /tmp/tmp.6YySWG2jCD ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod liveness-rs0-2 + local pod=liveness-rs0-2 + set +o xtrace waiting for pod/liveness-rs0-2 to be ready............OK ++ kubectl_bin get psmdb liveness -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.1666zreGAO +++ mktemp ++ local LAST_ERR=/tmp/tmp.ddjWIMoI4C ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb liveness -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.1666zreGAO ++ cat /tmp/tmp.ddjWIMoI4C ++ rm /tmp/tmp.1666zreGAO /tmp/tmp.ddjWIMoI4C ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness + sleep 20 + compare_kubectl statefulset/liveness-rs0 + local resource=statefulset/liveness-rs0 + local postfix= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml + local new_result=/tmp/tmp.FdMqrGI07q/statefulset_liveness-rs0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/compare/statefulset_liveness-rs0-oc.yml ']' + kubectl_bin get -o yaml statefulset/liveness-rs0 + 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(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") | 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("liveness-16712", "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" ' - ++ mktemp + local LAST_OUT=/tmp/tmp.xwDkcMYHBk ++ mktemp + local LAST_ERR=/tmp/tmp.vmKRXcWJNQ + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl get -o yaml statefulset/liveness-rs0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.xwDkcMYHBk + cat /tmp/tmp.vmKRXcWJNQ + rm /tmp/tmp.xwDkcMYHBk /tmp/tmp.vmKRXcWJNQ + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.FdMqrGI07q/statefulset_liveness-rs0.yml + version_gt 1.22 ++ bc -l ++ echo '1.27 >= 1.22' + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.FdMqrGI07q/statefulset_liveness-rs0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.FdMqrGI07q/statefulset_liveness-rs0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml == */cronjob* ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml /tmp/tmp.FdMqrGI07q/statefulset_liveness-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@liveness-rs0.liveness-16712 + local 'command=db.createUser({user: "myApp", pwd: "myPass", roles: [{ db: "myApp", role: "readWrite" }]})' + local uri=userAdmin:userAdmin123456@liveness-rs0.liveness-16712 + 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.0e7UTtfGRW +++ mktemp ++ local LAST_ERR=/tmp/tmp.SXCSAxSsNh ++ 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.0e7UTtfGRW ++ cat /tmp/tmp.SXCSAxSsNh ++ rm /tmp/tmp.0e7UTtfGRW /tmp/tmp.SXCSAxSsNh ++ return 0 + local client_container=psmdb-client-6c585f8dbd-h7c4w + local mongo_flag= + [[ userAdmin:userAdmin123456@liveness-rs0.liveness-16712 == *cfg* ]] + replica_set=rs0 + kubectl_bin exec psmdb-client-6c585f8dbd-h7c4w -- bash -c 'printf '\''db.createUser({user: "myApp", pwd: "myPass", roles: [{ db: "myApp", role: "readWrite" }]})\n'\'' | mongo mongodb+srv://userAdmin:userAdmin123456@liveness-rs0.liveness-16712.svc.cluster.local/admin?ssl=false\&replicaSet=rs0 ' ++ mktemp + local LAST_OUT=/tmp/tmp.7SSUJ2HwNA ++ mktemp + local LAST_ERR=/tmp/tmp.PYaQNkVpPU + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-6c585f8dbd-h7c4w -- bash -c 'printf '\''db.createUser({user: "myApp", pwd: "myPass", roles: [{ db: "myApp", role: "readWrite" }]})\n'\'' | mongo mongodb+srv://userAdmin:userAdmin123456@liveness-rs0.liveness-16712.svc.cluster.local/admin?ssl=false\&replicaSet=rs0 ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.7SSUJ2HwNA Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://liveness-rs0-0.liveness-rs0.liveness-16712.svc.cluster.local:27017,liveness-rs0-2.liveness-rs0.liveness-16712.svc.cluster.local:27017,liveness-rs0-1.liveness-rs0.liveness-16712.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb&replicaSet=rs0&ssl=false Implicit session: session { "id" : UUID("23865e67-4d3a-4137-b097-30cd5f688b75") } Percona Server for MongoDB server version: v7.0.12-7 WARNING: shell and server versions do not match Successfully added user: { "user" : "myApp", "roles" : [ { "db" : "myApp", "role" : "readWrite" } ] } bye + cat /tmp/tmp.PYaQNkVpPU + rm /tmp/tmp.7SSUJ2HwNA /tmp/tmp.PYaQNkVpPU + return 0 + run_mongo 'use myApp\n db.test.insert({ x: 100500 })' myApp:myPass@liveness-rs0.liveness-16712 + local 'command=use myApp\n db.test.insert({ x: 100500 })' + local uri=myApp:myPass@liveness-rs0.liveness-16712 + 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.lB2xolyMn7 +++ mktemp ++ local LAST_ERR=/tmp/tmp.zjU2fzQf8C ++ 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.lB2xolyMn7 ++ cat /tmp/tmp.zjU2fzQf8C ++ rm /tmp/tmp.lB2xolyMn7 /tmp/tmp.zjU2fzQf8C ++ return 0 + local client_container=psmdb-client-6c585f8dbd-h7c4w + local mongo_flag= + [[ myApp:myPass@liveness-rs0.liveness-16712 == *cfg* ]] + replica_set=rs0 + kubectl_bin exec psmdb-client-6c585f8dbd-h7c4w -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb+srv://myApp:myPass@liveness-rs0.liveness-16712.svc.cluster.local/admin?ssl=false\&replicaSet=rs0 ' ++ mktemp + local LAST_OUT=/tmp/tmp.GXpUt5xGUB ++ mktemp + local LAST_ERR=/tmp/tmp.JtITdt4vjx + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-6c585f8dbd-h7c4w -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb+srv://myApp:myPass@liveness-rs0.liveness-16712.svc.cluster.local/admin?ssl=false\&replicaSet=rs0 ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.GXpUt5xGUB Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://liveness-rs0-2.liveness-rs0.liveness-16712.svc.cluster.local:27017,liveness-rs0-1.liveness-rs0.liveness-16712.svc.cluster.local:27017,liveness-rs0-0.liveness-rs0.liveness-16712.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb&replicaSet=rs0&ssl=false Implicit session: session { "id" : UUID("25b618a7-5ab9-450c-ad08-fa0710cbf1a0") } Percona Server for MongoDB server version: v7.0.12-7 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.JtITdt4vjx + rm /tmp/tmp.GXpUt5xGUB /tmp/tmp.JtITdt4vjx + return 0 + desc 'check if statefulset created with expected config' + set +o xtrace ----------------------------------------------------------------------------------- check if statefulset created with expected config ----------------------------------------------------------------------------------- + compare_kubectl statefulset/liveness-rs0 + local resource=statefulset/liveness-rs0 + local postfix= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml + local new_result=/tmp/tmp.FdMqrGI07q/statefulset_liveness-rs0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/compare/statefulset_liveness-rs0-oc.yml ']' + kubectl_bin get -o yaml statefulset/liveness-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(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") | 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("liveness-16712", "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.NGnmIdppZt ++ mktemp + local LAST_ERR=/tmp/tmp.7yK2lo0fZq + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl get -o yaml statefulset/liveness-rs0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.NGnmIdppZt + cat /tmp/tmp.7yK2lo0fZq + rm /tmp/tmp.NGnmIdppZt /tmp/tmp.7yK2lo0fZq + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.FdMqrGI07q/statefulset_liveness-rs0.yml + version_gt 1.22 ++ bc -l ++ echo '1.27 >= 1.22' + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.FdMqrGI07q/statefulset_liveness-rs0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.FdMqrGI07q/statefulset_liveness-rs0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml == */cronjob* ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1613/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml /tmp/tmp.FdMqrGI07q/statefulset_liveness-rs0.yml + desc 'change MONGODB_CLUSTER_MONITOR_PASSWORD' + set +o xtrace ----------------------------------------------------------------------------------- change MONGODB_CLUSTER_MONITOR_PASSWORD ----------------------------------------------------------------------------------- + patch_secret some-users MONGODB_CLUSTER_MONITOR_PASSWORD '' + local secret=some-users + local key=MONGODB_CLUSTER_MONITOR_PASSWORD + local value= + kubectl patch secret some-users '-p={"data":{"MONGODB_CLUSTER_MONITOR_PASSWORD": ""}}' secret/some-users patched + sleep 20 + wait_for_running liveness-rs0 3 + local name=liveness-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=liveness ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod liveness-rs0-0 + local pod=liveness-rs0-0 + set +o xtrace waiting for pod/liveness-rs0-0 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod liveness-rs0-1 + local pod=liveness-rs0-1 + set +o xtrace waiting for pod/liveness-rs0-1 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb liveness -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.1SwpnXsksd +++ mktemp ++ local LAST_ERR=/tmp/tmp.yshyVLtSWf ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb liveness -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.1SwpnXsksd ++ cat /tmp/tmp.yshyVLtSWf ++ rm /tmp/tmp.1SwpnXsksd /tmp/tmp.yshyVLtSWf ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod liveness-rs0-2 + local pod=liveness-rs0-2 + set +o xtrace waiting for pod/liveness-rs0-2 to be ready.OK ++ kubectl_bin get psmdb liveness -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.KNSQpGWWwX +++ mktemp ++ local LAST_ERR=/tmp/tmp.aSgjr5UeAT ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb liveness -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.KNSQpGWWwX ++ cat /tmp/tmp.aSgjr5UeAT ++ rm /tmp/tmp.KNSQpGWWwX /tmp/tmp.aSgjr5UeAT ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ true == \t\r\u\e ]] + set +x Waiting for cluster readyness + desc 'check liveness logs' + set +o xtrace ----------------------------------------------------------------------------------- check liveness logs ----------------------------------------------------------------------------------- ++ kubectl_bin exec -it liveness-rs0-0 -- bash -c 'ls /data/db/mongod-data/logs' ++ grep -c mongodb-healthcheck.log +++ mktemp ++ local LAST_OUT=/tmp/tmp.LDnUUqDX5F +++ mktemp ++ local LAST_ERR=/tmp/tmp.kWEhhzMOxP ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl exec -it liveness-rs0-0 -- bash -c 'ls /data/db/mongod-data/logs' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.LDnUUqDX5F ++ cat /tmp/tmp.kWEhhzMOxP Defaulted container "mongod" out of: mongod, mongo-init (init) Unable to use a TTY - input is not a terminal or the right kind of file ++ rm /tmp/tmp.LDnUUqDX5F /tmp/tmp.kWEhhzMOxP ++ return 0 + current_log_file=1 + [[ 1 != \1 ]] ++ kubectl_bin exec -it liveness-rs0-0 -- bash -c 'ls /data/db/mongod-data/logs' ++ grep -c 'mongodb-healthcheck-.*\.log\.gz' +++ mktemp ++ local LAST_OUT=/tmp/tmp.g1mhDA5MhY +++ mktemp ++ local LAST_ERR=/tmp/tmp.OQAPhGrkca ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl exec -it liveness-rs0-0 -- bash -c 'ls /data/db/mongod-data/logs' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.g1mhDA5MhY ++ cat /tmp/tmp.OQAPhGrkca Defaulted container "mongod" out of: mongod, mongo-init (init) Unable to use a TTY - input is not a terminal or the right kind of file ++ rm /tmp/tmp.g1mhDA5MhY /tmp/tmp.OQAPhGrkca ++ return 0 + rotated_log_files=0