Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/e2e-tests/logs/upgrade-sharded.log WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 WARNING: version difference between client (1.30) and server (1.26) exceeds the supported minor version skew of +/-1 + cluster=upgrade-sharded + CLUSTER_SIZE=3 + TARGET_OPERATOR_VER=1.17.0 + TARGET_IMAGE=perconalab/percona-server-mongodb-operator:PR-1561-964e15bc + TARGET_IMAGE_MONGOD=perconalab/percona-server-mongodb-operator:main-mongod7.0 + TARGET_IMAGE_PMM_CLIENT=perconalab/pmm-client:dev-latest + TARGET_IMAGE_BACKUP=perconalab/percona-server-mongodb-operator:main-backup ++ get_mongod_ver_from_image perconalab/percona-server-mongodb-operator:main-mongod7.0 ++ local image=perconalab/percona-server-mongodb-operator:main-mongod7.0 +++ run_simple_cli_inside_image perconalab/percona-server-mongodb-operator:main-mongod7.0 'mongod --version' +++ local image=perconalab/percona-server-mongodb-operator:main-mongod7.0 +++ local 'cli=mongod --version' +++ local pod_name=18007 +++ /usr/bin/sed -r 's/^.*db version v(([0-9]+\.){2}[0-9]+-[0-9]+).*$/\1/g' +++ kubectl_bin -n default run 18007 --image=perconalab/percona-server-mongodb-operator:main-mongod7.0 --restart=Never --command -- sleep infinity ++++ mktemp +++ local LAST_OUT=/tmp/tmp.7CmLuFcK7a ++++ mktemp +++ local LAST_ERR=/tmp/tmp.6BXJS3RZ8h +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl -n default run 18007 --image=perconalab/percona-server-mongodb-operator:main-mongod7.0 --restart=Never --command -- sleep infinity +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.7CmLuFcK7a +++ cat /tmp/tmp.6BXJS3RZ8h +++ rm /tmp/tmp.7CmLuFcK7a /tmp/tmp.6BXJS3RZ8h +++ return 0 +++ kubectl_bin -n default wait --for=condition=Ready pod/18007 ++++ mktemp +++ local LAST_OUT=/tmp/tmp.H9nkREpbDL ++++ mktemp +++ local LAST_ERR=/tmp/tmp.KBAkrzi3IU +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl -n default wait --for=condition=Ready pod/18007 +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.H9nkREpbDL +++ cat /tmp/tmp.KBAkrzi3IU +++ rm /tmp/tmp.H9nkREpbDL /tmp/tmp.KBAkrzi3IU +++ return 0 ++++ kubectl_bin -n default exec 18007 -- mongod --version +++++ mktemp ++++ local LAST_OUT=/tmp/tmp.lxd9qRvm8k +++++ mktemp ++++ local LAST_ERR=/tmp/tmp.lob2mvEKFc ++++ local exit_status=0 ++++ local timeout=4 +++++ seq 0 2 ++++ for i in '$(seq 0 2)' ++++ set +e ++++ kubectl -n default exec 18007 -- mongod --version ++++ exit_status=0 ++++ set -e ++++ '[' 0 '!=' 0 -a -n 1 ']' ++++ break ++++ cat /tmp/tmp.lxd9qRvm8k ++++ cat /tmp/tmp.lob2mvEKFc ++++ rm /tmp/tmp.lxd9qRvm8k /tmp/tmp.lob2mvEKFc ++++ return 0 +++ local 'output=db version v7.0.8-5 Build Info: { "version": "7.0.8-5", "gitVersion": "197ff4d49589e8b5a444b7ebc6f4d33b6f00105e", "openSSLVersion": "OpenSSL 1.1.1k FIPS 25 Mar 2021", "modules": [], "proFeatures": [], "allocator": "tcmalloc", "environment": { "distarch": "x86_64", "target_arch": "x86_64" } }' +++ kubectl_bin -n default delete pod/18007 --grace-period=0 --force ++++ mktemp +++ local LAST_OUT=/tmp/tmp.9YBZOhshDh ++++ mktemp +++ local LAST_ERR=/tmp/tmp.lbCnxfsW6N +++ local exit_status=0 +++ local timeout=4 ++++ seq 0 2 +++ for i in '$(seq 0 2)' +++ set +e +++ kubectl -n default delete pod/18007 --grace-period=0 --force +++ exit_status=0 +++ set -e +++ '[' 0 '!=' 0 -a -n 1 ']' +++ break +++ cat /tmp/tmp.9YBZOhshDh +++ cat /tmp/tmp.lbCnxfsW6N Warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely. +++ rm /tmp/tmp.9YBZOhshDh /tmp/tmp.lbCnxfsW6N +++ return 0 +++ echo db version v7.0.8-5 Build Info: '{' '"version":' '"7.0.8-5",' '"gitVersion":' '"197ff4d49589e8b5a444b7ebc6f4d33b6f00105e",' '"openSSLVersion":' '"OpenSSL' 1.1.1k FIPS 25 Mar '2021",' '"modules":' '[],' '"proFeatures":' '[],' '"allocator":' '"tcmalloc",' '"environment":' '{' '"distarch":' '"x86_64",' '"target_arch":' '"x86_64"' '}' '}' ++ version_info=7.0.8-5 ++ [[ ! 7.0.8-5 =~ ^([0-9]+\.){2}[0-9]+-[0-9]+$ ]] ++ echo 7.0.8-5 + FULL_VER=7.0.8-5 + MONGO_VER=7.0 ++ curl -s https://check.percona.com/versions/v1/psmdb-operator ++ sort -V ++ jq -r '.versions[].operator' ++ tail -n1 + INIT_OPERATOR_VER=1.16.0 + [[ 1.16.0 == \1\.\1\7\.\0 ]] + GIT_TAG=v1.16.0 + case $(curl -s -o /dev/null -w "%{http_code}" 'https://check.percona.com/versions/v1/psmdb-operator/'${INIT_OPERATOR_VER}/'latest?databaseVersion='${MONGO_VER}'') in ++ curl -s -o /dev/null -w '%{http_code}' 'https://check.percona.com/versions/v1/psmdb-operator/1.16.0/latest?databaseVersion=7.0' ++ curl -s 'https://check.percona.com/versions/v1/psmdb-operator/1.16.0/latest?databaseVersion=7.0' + INIT_OPERATOR_IMAGES='{"versions":[{"product":"psmdb-operator", "operator":"1.16.0", "matrix":{"mongod":{"7.0.8-5":{"imagePath":"percona/percona-server-mongodb:7.0.8-5", "imageHash":"f81d1353d5497c5be36ee525f742d498ee6e1df9aba9502660c50f0fc98743b6", "imageHashArm64":"", "status":"recommended", "critical":false}}, "pxc":{}, "pmm":{"2.41.2":{"imagePath":"percona/pmm-client:2.41.2", "imageHash":"16d2499c1cbcc1af51bd3752fe7623b0d0a319ee128b12d41cadf8080d1ce56b", "imageHashArm64":"", "status":"recommended", "critical":false}}, "proxysql":{}, "haproxy":{}, "backup":{"2.4.1":{"imagePath":"percona/percona-backup-mongodb:2.4.1", "imageHash":"a45d277af98090781a6149ccfb99d5bc4431ec53ba3b36ea644332851412a17e", "imageHashArm64":"", "status":"recommended", "critical":false}}, "operator":{"1.16.0":{"imagePath":"percona/percona-server-mongodb-operator:1.16.0", "imageHash":"30c92be499563a97e12e0542d3962c9cb10081f55722305a916eb98a229109c3", "imageHashArm64":"3fa8fffcf13f67526b0305ff5d048cdd2b5fd5fcb525ddbdf092b9548d93b302", "status":"recommended", "critical":false}}, "logCollector":{}, "postgresql":{}, "pgbackrest":{}, "pgbackrestRepo":{}, "pgbadger":{}, "pgbouncer":{}, "pxcOperator":{}, "psmdbOperator":{}, "pgOperatorApiserver":{}, "pgOperatorEvent":{}, "pgOperatorRmdata":{}, "pgOperatorScheduler":{}, "pgOperator":{}, "pgOperatorDeployer":{}, "psOperator":{}, "mysql":{}, "router":{}, "orchestrator":{}, "toolkit":{}, "postgis":{}}}]}' + OPERATOR_NAME=percona-server-mongodb-operator ++ echo '{"versions":[{"product":"psmdb-operator", "operator":"1.16.0", "matrix":{"mongod":{"7.0.8-5":{"imagePath":"percona/percona-server-mongodb:7.0.8-5", "imageHash":"f81d1353d5497c5be36ee525f742d498ee6e1df9aba9502660c50f0fc98743b6", "imageHashArm64":"", "status":"recommended", "critical":false}}, "pxc":{}, "pmm":{"2.41.2":{"imagePath":"percona/pmm-client:2.41.2", "imageHash":"16d2499c1cbcc1af51bd3752fe7623b0d0a319ee128b12d41cadf8080d1ce56b", "imageHashArm64":"", "status":"recommended", "critical":false}}, "proxysql":{}, "haproxy":{}, "backup":{"2.4.1":{"imagePath":"percona/percona-backup-mongodb:2.4.1", "imageHash":"a45d277af98090781a6149ccfb99d5bc4431ec53ba3b36ea644332851412a17e", "imageHashArm64":"", "status":"recommended", "critical":false}}, "operator":{"1.16.0":{"imagePath":"percona/percona-server-mongodb-operator:1.16.0", "imageHash":"30c92be499563a97e12e0542d3962c9cb10081f55722305a916eb98a229109c3", "imageHashArm64":"3fa8fffcf13f67526b0305ff5d048cdd2b5fd5fcb525ddbdf092b9548d93b302", "status":"recommended", "critical":false}}, "logCollector":{}, "postgresql":{}, "pgbackrest":{}, "pgbackrestRepo":{}, "pgbadger":{}, "pgbouncer":{}, "pxcOperator":{}, "psmdbOperator":{}, "pgOperatorApiserver":{}, "pgOperatorEvent":{}, "pgOperatorRmdata":{}, "pgOperatorScheduler":{}, "pgOperator":{}, "pgOperatorDeployer":{}, "psOperator":{}, "mysql":{}, "router":{}, "orchestrator":{}, "toolkit":{}, "postgis":{}}}]}' ++ jq -r '.versions[].matrix.operator[].imagePath' + IMAGE=percona/percona-server-mongodb-operator:1.16.0 ++ echo perconalab/percona-server-mongodb-operator:PR-1561-964e15bc ++ cut -d/ -f1 + [[ perconalab == \p\e\r\c\o\n\a\l\a\b ]] + IMAGE='perconalab\/percona-server-mongodb-operator:1.16.0' ++ echo '{"versions":[{"product":"psmdb-operator", "operator":"1.16.0", "matrix":{"mongod":{"7.0.8-5":{"imagePath":"percona/percona-server-mongodb:7.0.8-5", "imageHash":"f81d1353d5497c5be36ee525f742d498ee6e1df9aba9502660c50f0fc98743b6", "imageHashArm64":"", "status":"recommended", "critical":false}}, "pxc":{}, "pmm":{"2.41.2":{"imagePath":"percona/pmm-client:2.41.2", "imageHash":"16d2499c1cbcc1af51bd3752fe7623b0d0a319ee128b12d41cadf8080d1ce56b", "imageHashArm64":"", "status":"recommended", "critical":false}}, "proxysql":{}, "haproxy":{}, "backup":{"2.4.1":{"imagePath":"percona/percona-backup-mongodb:2.4.1", "imageHash":"a45d277af98090781a6149ccfb99d5bc4431ec53ba3b36ea644332851412a17e", "imageHashArm64":"", "status":"recommended", "critical":false}}, "operator":{"1.16.0":{"imagePath":"percona/percona-server-mongodb-operator:1.16.0", "imageHash":"30c92be499563a97e12e0542d3962c9cb10081f55722305a916eb98a229109c3", "imageHashArm64":"3fa8fffcf13f67526b0305ff5d048cdd2b5fd5fcb525ddbdf092b9548d93b302", "status":"recommended", "critical":false}}, "logCollector":{}, "postgresql":{}, "pgbackrest":{}, "pgbackrestRepo":{}, "pgbadger":{}, "pgbouncer":{}, "pxcOperator":{}, "psmdbOperator":{}, "pgOperatorApiserver":{}, "pgOperatorEvent":{}, "pgOperatorRmdata":{}, "pgOperatorScheduler":{}, "pgOperator":{}, "pgOperatorDeployer":{}, "psOperator":{}, "mysql":{}, "router":{}, "orchestrator":{}, "toolkit":{}, "postgis":{}}}]}' ++ jq -r '.versions[].matrix.mongod[].imagePath' + IMAGE_MONGOD=percona/percona-server-mongodb:7.0.8-5 ++ echo '{"versions":[{"product":"psmdb-operator", "operator":"1.16.0", "matrix":{"mongod":{"7.0.8-5":{"imagePath":"percona/percona-server-mongodb:7.0.8-5", "imageHash":"f81d1353d5497c5be36ee525f742d498ee6e1df9aba9502660c50f0fc98743b6", "imageHashArm64":"", "status":"recommended", "critical":false}}, "pxc":{}, "pmm":{"2.41.2":{"imagePath":"percona/pmm-client:2.41.2", "imageHash":"16d2499c1cbcc1af51bd3752fe7623b0d0a319ee128b12d41cadf8080d1ce56b", "imageHashArm64":"", "status":"recommended", "critical":false}}, "proxysql":{}, "haproxy":{}, "backup":{"2.4.1":{"imagePath":"percona/percona-backup-mongodb:2.4.1", "imageHash":"a45d277af98090781a6149ccfb99d5bc4431ec53ba3b36ea644332851412a17e", "imageHashArm64":"", "status":"recommended", "critical":false}}, "operator":{"1.16.0":{"imagePath":"percona/percona-server-mongodb-operator:1.16.0", "imageHash":"30c92be499563a97e12e0542d3962c9cb10081f55722305a916eb98a229109c3", "imageHashArm64":"3fa8fffcf13f67526b0305ff5d048cdd2b5fd5fcb525ddbdf092b9548d93b302", "status":"recommended", "critical":false}}, "logCollector":{}, "postgresql":{}, "pgbackrest":{}, "pgbackrestRepo":{}, "pgbadger":{}, "pgbouncer":{}, "pxcOperator":{}, "psmdbOperator":{}, "pgOperatorApiserver":{}, "pgOperatorEvent":{}, "pgOperatorRmdata":{}, "pgOperatorScheduler":{}, "pgOperator":{}, "pgOperatorDeployer":{}, "psOperator":{}, "mysql":{}, "router":{}, "orchestrator":{}, "toolkit":{}, "postgis":{}}}]}' ++ jq -r '.versions[].matrix.pmm[].imagePath' + IMAGE_PMM_CLIENT=percona/pmm-client:2.41.2 ++ echo '{"versions":[{"product":"psmdb-operator", "operator":"1.16.0", "matrix":{"mongod":{"7.0.8-5":{"imagePath":"percona/percona-server-mongodb:7.0.8-5", "imageHash":"f81d1353d5497c5be36ee525f742d498ee6e1df9aba9502660c50f0fc98743b6", "imageHashArm64":"", "status":"recommended", "critical":false}}, "pxc":{}, "pmm":{"2.41.2":{"imagePath":"percona/pmm-client:2.41.2", "imageHash":"16d2499c1cbcc1af51bd3752fe7623b0d0a319ee128b12d41cadf8080d1ce56b", "imageHashArm64":"", "status":"recommended", "critical":false}}, "proxysql":{}, "haproxy":{}, "backup":{"2.4.1":{"imagePath":"percona/percona-backup-mongodb:2.4.1", "imageHash":"a45d277af98090781a6149ccfb99d5bc4431ec53ba3b36ea644332851412a17e", "imageHashArm64":"", "status":"recommended", "critical":false}}, "operator":{"1.16.0":{"imagePath":"percona/percona-server-mongodb-operator:1.16.0", "imageHash":"30c92be499563a97e12e0542d3962c9cb10081f55722305a916eb98a229109c3", "imageHashArm64":"3fa8fffcf13f67526b0305ff5d048cdd2b5fd5fcb525ddbdf092b9548d93b302", "status":"recommended", "critical":false}}, "logCollector":{}, "postgresql":{}, "pgbackrest":{}, "pgbackrestRepo":{}, "pgbadger":{}, "pgbouncer":{}, "pxcOperator":{}, "psmdbOperator":{}, "pgOperatorApiserver":{}, "pgOperatorEvent":{}, "pgOperatorRmdata":{}, "pgOperatorScheduler":{}, "pgOperator":{}, "pgOperatorDeployer":{}, "psOperator":{}, "mysql":{}, "router":{}, "orchestrator":{}, "toolkit":{}, "postgis":{}}}]}' ++ jq -r '.versions[].matrix.backup[].imagePath' + IMAGE_BACKUP=percona/percona-backup-mongodb:2.4.1 + [[ 1.17.0 == \1\.\1\6\.\0 ]] + main + rbac=rbac + '[' -n psmdb-operator ']' + rbac=cw-rbac + create_infra_gh upgrade-sharded-5631 v1.16.0 + local ns=upgrade-sharded-5631 + local git_tag=v1.16.0 + check_crd_for_deletion v1.16.0 + local git_tag=v1.16.0 ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v1.16.0/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/perconaservermongodbbackups.psmdb.percona.com -o 'jsonpath={.status.conditions[-1].type}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.KOhStsVrX5 +++ mktemp ++ local LAST_ERR=/tmp/tmp.OuKmluUkp5 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get crd/perconaservermongodbbackups.psmdb.percona.com -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.KOhStsVrX5 ++ cat /tmp/tmp.OuKmluUkp5 ++ rm /tmp/tmp.KOhStsVrX5 /tmp/tmp.OuKmluUkp5 ++ return 0 + [[ Established == \T\e\r\m\i\n\a\t\i\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/perconaservermongodbrestores.psmdb.percona.com -o 'jsonpath={.status.conditions[-1].type}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.66LbGM1ZUz +++ mktemp ++ local LAST_ERR=/tmp/tmp.JElQ7MYXGf ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get crd/perconaservermongodbrestores.psmdb.percona.com -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.66LbGM1ZUz ++ cat /tmp/tmp.JElQ7MYXGf ++ rm /tmp/tmp.66LbGM1ZUz /tmp/tmp.JElQ7MYXGf ++ return 0 + [[ Established == \T\e\r\m\i\n\a\t\i\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/perconaservermongodbs.psmdb.percona.com -o 'jsonpath={.status.conditions[-1].type}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.b3Q2glSOT6 +++ mktemp ++ local LAST_ERR=/tmp/tmp.87hHqYYVYK ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get crd/perconaservermongodbs.psmdb.percona.com -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.b3Q2glSOT6 ++ cat /tmp/tmp.87hHqYYVYK ++ rm /tmp/tmp.b3Q2glSOT6 /tmp/tmp.87hHqYYVYK ++ return 0 + [[ Established == \T\e\r\m\i\n\a\t\i\n\g ]] + '[' -n psmdb-operator ']' + create_namespace psmdb-operator + local namespace=psmdb-operator + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ awk '{print $1}' ++ grep chaos-mesh E0529 14:20:50.195153 9995 memcache.go:287] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0529 14:20:50.428972 9995 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ awk '{print $1}' ++ grep chaos-mesh + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + 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 + xargs kubectl delete ns + kubectl_bin get ns ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.hkq2F57gsU + local LAST_OUT=/tmp/tmp.H6EAZoPmkQ ++ mktemp ++ mktemp + local LAST_ERR=/tmp/tmp.K42h3ijUAf + local exit_status=0 + local timeout=4 + local LAST_ERR=/tmp/tmp.9nyfZzj17J + local exit_status=0 + local timeout=4 ++ seq 0 2 ++ 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 psmdb-operator --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.hkq2F57gsU + cat /tmp/tmp.K42h3ijUAf + rm /tmp/tmp.hkq2F57gsU /tmp/tmp.K42h3ijUAf + return 0 namespace "cert-manager" deleted namespace "upgrade-sharded-22252" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.H6EAZoPmkQ namespace "psmdb-operator" deleted + cat /tmp/tmp.9nyfZzj17J + rm /tmp/tmp.H6EAZoPmkQ /tmp/tmp.9nyfZzj17J + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.qbl0GktkZY ++ mktemp + local LAST_ERR=/tmp/tmp.oiJ2eqAR4O + 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.qbl0GktkZY + cat /tmp/tmp.oiJ2eqAR4O + rm /tmp/tmp.qbl0GktkZY /tmp/tmp.oiJ2eqAR4O + 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.TwOHRafwET ++ mktemp + local LAST_ERR=/tmp/tmp.RRVWsJLaqM + 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.TwOHRafwET namespace/psmdb-operator created + cat /tmp/tmp.RRVWsJLaqM + rm /tmp/tmp.TwOHRafwET /tmp/tmp.RRVWsJLaqM + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.icUO0byriH +++ mktemp ++ local LAST_ERR=/tmp/tmp.aaXFrfWZ4M ++ 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.icUO0byriH ++ cat /tmp/tmp.aaXFrfWZ4M ++ rm /tmp/tmp.icUO0byriH /tmp/tmp.aaXFrfWZ4M ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1561-964e15bc-4-cluster6 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.kB9uGpSVGn ++ mktemp + local LAST_ERR=/tmp/tmp.MKb1i8ZUcC + 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-1561-964e15bc-4-cluster6 --namespace=psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.kB9uGpSVGn Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1561-964e15bc-4-cluster6" modified. + cat /tmp/tmp.MKb1i8ZUcC + rm /tmp/tmp.kB9uGpSVGn /tmp/tmp.MKb1i8ZUcC + return 0 + deploy_operator_gh v1.16.0 + local git_tag=v1.16.0 + desc 'start operator' + set +o xtrace ----------------------------------------------------------------------------------- start operator ----------------------------------------------------------------------------------- + kubectl_bin apply -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v1.16.0/deploy/crd.yaml --server-side ++ mktemp + local LAST_OUT=/tmp/tmp.MMzyyd6qLh ++ mktemp + local LAST_ERR=/tmp/tmp.Qe8TlsgJcX + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v1.16.0/deploy/crd.yaml --server-side + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.MMzyyd6qLh 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.Qe8TlsgJcX + rm /tmp/tmp.MMzyyd6qLh /tmp/tmp.Qe8TlsgJcX + return 0 + local rbac_yaml=rbac + local operator_yaml=operator + '[' -n psmdb-operator ']' + rbac_yaml=cw-rbac + operator_yaml=cw-operator + kubectl_bin apply -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v1.16.0/deploy/cw-rbac.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.fDXl9C4G00 ++ mktemp + local LAST_ERR=/tmp/tmp.H1ObFZz53Y + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v1.16.0/deploy/cw-rbac.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.fDXl9C4G00 clusterrole.rbac.authorization.k8s.io/percona-server-mongodb-operator unchanged serviceaccount/percona-server-mongodb-operator created clusterrolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator unchanged + cat /tmp/tmp.H1ObFZz53Y + rm /tmp/tmp.fDXl9C4G00 /tmp/tmp.H1ObFZz53Y + return 0 + curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v1.16.0/deploy/cw-operator.yaml + /usr/bin/sed -i -e 's^image: .*^image: perconalab\/percona-server-mongodb-operator:1.16.0^' /tmp/tmp.SUPwIfNhKD/cw-operator_v1.16.0.yaml + kubectl_bin apply -f /tmp/tmp.SUPwIfNhKD/cw-operator_v1.16.0.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.2R5LHxLsiM ++ mktemp + local LAST_ERR=/tmp/tmp.meK8HchQB8 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f /tmp/tmp.SUPwIfNhKD/cw-operator_v1.16.0.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.2R5LHxLsiM deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.meK8HchQB8 + rm /tmp/tmp.2R5LHxLsiM /tmp/tmp.meK8HchQB8 + 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.9K6TqAIrBg +++ mktemp ++ local LAST_ERR=/tmp/tmp.IpSUBXgtMD ++ 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.9K6TqAIrBg ++ cat /tmp/tmp.IpSUBXgtMD ++ rm /tmp/tmp.9K6TqAIrBg /tmp/tmp.IpSUBXgtMD ++ return 0 + wait_pod percona-server-mongodb-operator-5c5df5c469-cn5t7 + local pod=percona-server-mongodb-operator-5c5df5c469-cn5t7 + set +o xtrace waiting for pod/percona-server-mongodb-operator-5c5df5c469-cn5t7 to be ready..OK + create_namespace upgrade-sharded-5631 + local namespace=upgrade-sharded-5631 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ sed s/NAMESPACE// ++ tail -n1 ++ awk '-F ' '{print $2}' + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ 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 + : ++ grep chaos-mesh ++ awk '{print $1}' ++ kubectl api-resources ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + '[' -n '' ']' + desc 'cleaned up old namespaces upgrade-sharded-5631' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces upgrade-sharded-5631 ----------------------------------------------------------------------------------- + egrep -v '^kube-|^default|Terminating|psmdb-operator|openshift|gke-mcs|^NAME' + kubectl_bin delete namespace upgrade-sharded-5631 --ignore-not-found + xargs kubectl delete ns + kubectl_bin get ns ++ mktemp + local LAST_OUT=/tmp/tmp.lTD5Ro2x8y ++ mktemp + local LAST_ERR=/tmp/tmp.6ttTJEhjIp + local exit_status=0 + local timeout=4 ++ seq 0 2 ++ mktemp + for i in '$(seq 0 2)' + set +e + kubectl get ns + local LAST_OUT=/tmp/tmp.b0oWETlDrq ++ mktemp + local LAST_ERR=/tmp/tmp.SWYzF3ziNu + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl delete namespace upgrade-sharded-5631 --ignore-not-found + awk '{print$1}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.lTD5Ro2x8y + cat /tmp/tmp.6ttTJEhjIp + rm /tmp/tmp.lTD5Ro2x8y /tmp/tmp.6ttTJEhjIp + return 0 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.b0oWETlDrq + cat /tmp/tmp.SWYzF3ziNu + rm /tmp/tmp.b0oWETlDrq /tmp/tmp.SWYzF3ziNu + return 0 + kubectl_bin wait --for=delete namespace upgrade-sharded-5631 ++ mktemp + local LAST_OUT=/tmp/tmp.Dbh5EMgYAJ ++ mktemp + local LAST_ERR=/tmp/tmp.xhEo6tqpSt + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl wait --for=delete namespace upgrade-sharded-5631 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Dbh5EMgYAJ + cat /tmp/tmp.xhEo6tqpSt + rm /tmp/tmp.Dbh5EMgYAJ /tmp/tmp.xhEo6tqpSt + return 0 + desc 'create namespace upgrade-sharded-5631' + set +o xtrace ----------------------------------------------------------------------------------- create namespace upgrade-sharded-5631 ----------------------------------------------------------------------------------- + kubectl_bin create namespace upgrade-sharded-5631 ++ mktemp + local LAST_OUT=/tmp/tmp.e8mCGugXZs ++ mktemp + local LAST_ERR=/tmp/tmp.N0kAjDb5NJ + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace upgrade-sharded-5631 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.e8mCGugXZs namespace/upgrade-sharded-5631 created + cat /tmp/tmp.N0kAjDb5NJ + rm /tmp/tmp.e8mCGugXZs /tmp/tmp.N0kAjDb5NJ + return 0 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.lqEKBIvbQn +++ mktemp ++ local LAST_ERR=/tmp/tmp.fnOM7uK31X ++ 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.lqEKBIvbQn ++ cat /tmp/tmp.fnOM7uK31X ++ rm /tmp/tmp.lqEKBIvbQn /tmp/tmp.fnOM7uK31X ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-1561-964e15bc-4-cluster6 --namespace=upgrade-sharded-5631 ++ mktemp + local LAST_OUT=/tmp/tmp.yYwHG5Xq9p ++ mktemp + local LAST_ERR=/tmp/tmp.vlV7uoehuH + 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-1561-964e15bc-4-cluster6 --namespace=upgrade-sharded-5631 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.yYwHG5Xq9p Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-1561-964e15bc-4-cluster6" modified. + cat /tmp/tmp.vlV7uoehuH + rm /tmp/tmp.yYwHG5Xq9p /tmp/tmp.vlV7uoehuH + return 0 + deploy_cert_manager + desc 'deploy cert manager' + set +o xtrace ----------------------------------------------------------------------------------- deploy cert manager ----------------------------------------------------------------------------------- + kubectl_bin create namespace cert-manager ++ mktemp + local LAST_OUT=/tmp/tmp.GmjmClH1Nf ++ mktemp + local LAST_ERR=/tmp/tmp.ldT6v0pzz2 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create namespace cert-manager + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.GmjmClH1Nf namespace/cert-manager created + cat /tmp/tmp.ldT6v0pzz2 + rm /tmp/tmp.GmjmClH1Nf /tmp/tmp.ldT6v0pzz2 + return 0 + kubectl_bin label namespace cert-manager certmanager.k8s.io/disable-validation=true ++ mktemp + local LAST_OUT=/tmp/tmp.HBIgsGyJFE ++ mktemp + local LAST_ERR=/tmp/tmp.pDjUhbUved + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.HBIgsGyJFE namespace/cert-manager labeled + cat /tmp/tmp.pDjUhbUved + rm /tmp/tmp.HBIgsGyJFE /tmp/tmp.pDjUhbUved + return 0 + kubectl_bin apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml --validate=false ++ mktemp + local LAST_OUT=/tmp/tmp.aGkeXUCLO3 ++ mktemp + local LAST_ERR=/tmp/tmp.wSXUGg0sj3 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml --validate=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.aGkeXUCLO3 namespace/cert-manager configured customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io unchanged customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io unchanged customresourcedefinition.apiextensions.k8s.io/challenges.acme.cert-manager.io unchanged customresourcedefinition.apiextensions.k8s.io/clusterissuers.cert-manager.io unchanged customresourcedefinition.apiextensions.k8s.io/issuers.cert-manager.io unchanged customresourcedefinition.apiextensions.k8s.io/orders.acme.cert-manager.io unchanged serviceaccount/cert-manager-cainjector created serviceaccount/cert-manager created serviceaccount/cert-manager-webhook created clusterrole.rbac.authorization.k8s.io/cert-manager-cainjector unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-issuers unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-clusterissuers unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-certificates unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-orders unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-challenges unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-ingress-shim unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-cluster-view unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-view unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-edit unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-approve:cert-manager-io unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-controller-certificatesigningrequests unchanged clusterrole.rbac.authorization.k8s.io/cert-manager-webhook:subjectaccessreviews unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-cainjector unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-issuers unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-clusterissuers unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-certificates unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-orders unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-challenges unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-ingress-shim unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-approve:cert-manager-io unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-certificatesigningrequests unchanged clusterrolebinding.rbac.authorization.k8s.io/cert-manager-webhook:subjectaccessreviews configured role.rbac.authorization.k8s.io/cert-manager-cainjector:leaderelection unchanged role.rbac.authorization.k8s.io/cert-manager:leaderelection unchanged role.rbac.authorization.k8s.io/cert-manager-webhook:dynamic-serving created rolebinding.rbac.authorization.k8s.io/cert-manager-cainjector:leaderelection unchanged rolebinding.rbac.authorization.k8s.io/cert-manager:leaderelection configured rolebinding.rbac.authorization.k8s.io/cert-manager-webhook:dynamic-serving created service/cert-manager created service/cert-manager-webhook created deployment.apps/cert-manager-cainjector created deployment.apps/cert-manager created deployment.apps/cert-manager-webhook created mutatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook configured validatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook configured + cat /tmp/tmp.wSXUGg0sj3 Warning: resource namespaces/cert-manager is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically. + rm /tmp/tmp.aGkeXUCLO3 /tmp/tmp.wSXUGg0sj3 + return 0 + kubectl_bin -n cert-manager wait pod -l app.kubernetes.io/instance=cert-manager --for=condition=ready ++ mktemp + local LAST_OUT=/tmp/tmp.u2nnDgexS4 ++ mktemp + local LAST_ERR=/tmp/tmp.sMFeBcakPc + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl -n cert-manager wait pod -l app.kubernetes.io/instance=cert-manager --for=condition=ready + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.u2nnDgexS4 pod/cert-manager-5658d944df-fhxmb condition met pod/cert-manager-cainjector-cb99ff845-49nxk condition met pod/cert-manager-webhook-7fd74b8dc7-xdrwv condition met + cat /tmp/tmp.sMFeBcakPc + rm /tmp/tmp.u2nnDgexS4 /tmp/tmp.sMFeBcakPc + return 0 + sleep 120 + apply_s3_storage_secrets + desc 'create secrets for cloud storages' + set +o xtrace ----------------------------------------------------------------------------------- create secrets for cloud storages ----------------------------------------------------------------------------------- + '[' -z '' ']' + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/e2e-tests/conf/minio-secret.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/e2e-tests/conf/cloud-secret.yml ++ mktemp + local LAST_OUT=/tmp/tmp.pvHVQ5KRaq ++ mktemp + local LAST_ERR=/tmp/tmp.r55cDDa1Su + 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-1561/e2e-tests/conf/minio-secret.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/e2e-tests/conf/cloud-secret.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.pvHVQ5KRaq secret/minio-secret created secret/aws-s3-secret created secret/gcp-cs-secret created secret/azure-secret created + cat /tmp/tmp.r55cDDa1Su + rm /tmp/tmp.pvHVQ5KRaq /tmp/tmp.r55cDDa1Su + return 0 + deploy_minio + desc 'install Minio' + set +o xtrace ----------------------------------------------------------------------------------- install Minio ----------------------------------------------------------------------------------- + helm uninstall minio-service Error: uninstall: Release not loaded: minio-service: release: not found + : + helm repo remove minio "minio" has been removed from your repositories + helm repo add minio https://charts.min.io/ "minio" has been added to your repositories + retry 10 60 helm install minio-service --version 5.0.14 --set replicas=1 --set mode=standalone --set resources.requests.memory=256Mi --set rootUser=rootuser --set rootPassword=rootpass123 --set 'users[0].accessKey=some-access-key' --set 'users[0].secretKey=some-secret-key' --set 'users[0].policy=consoleAdmin' --set service.type=ClusterIP --set configPathmc=/tmp/.minio/ --set persistence.size=2G --set securityContext.enabled=false minio/minio + local max=10 + local delay=60 + shift 2 + local n=1 + helm install minio-service --version 5.0.14 --set replicas=1 --set mode=standalone --set resources.requests.memory=256Mi --set rootUser=rootuser --set rootPassword=rootpass123 --set 'users[0].accessKey=some-access-key' --set 'users[0].secretKey=some-secret-key' --set 'users[0].policy=consoleAdmin' --set service.type=ClusterIP --set configPathmc=/tmp/.minio/ --set persistence.size=2G --set securityContext.enabled=false minio/minio NAME: minio-service LAST DEPLOYED: Wed May 29 14:24:07 2024 NAMESPACE: upgrade-sharded-5631 STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: MinIO can be accessed via port 9000 on the following DNS name from within your cluster: minio-service.upgrade-sharded-5631.svc.cluster.local To access MinIO from localhost, run the below commands: 1. export POD_NAME=$(kubectl get pods --namespace upgrade-sharded-5631 -l "release=minio-service" -o jsonpath="{.items[0].metadata.name}") 2. kubectl port-forward $POD_NAME 9000 --namespace upgrade-sharded-5631 Read more about port forwarding here: http://kubernetes.io/docs/user-guide/kubectl/kubectl_port-forward/ You can now access MinIO server on http://localhost:9000. Follow the below steps to connect to MinIO server with mc client: 1. Download the MinIO mc client - https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart 2. export MC_HOST_minio-service-local=http://$(kubectl get secret --namespace upgrade-sharded-5631 minio-service -o jsonpath="{.data.rootUser}" | base64 --decode):$(kubectl get secret --namespace upgrade-sharded-5631 minio-service -o jsonpath="{.data.rootPassword}" | base64 --decode)@localhost:9000 3. mc ls minio-service-local ++ kubectl_bin get pods --selector=release=minio-service -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.XGeBSOgrMp +++ mktemp ++ local LAST_ERR=/tmp/tmp.NF8Y9Rca1e ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods --selector=release=minio-service -o 'jsonpath={.items[].metadata.name}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.XGeBSOgrMp ++ cat /tmp/tmp.NF8Y9Rca1e ++ rm /tmp/tmp.XGeBSOgrMp /tmp/tmp.NF8Y9Rca1e ++ return 0 + MINIO_POD=minio-service-57dd49b-fhg9b + wait_pod minio-service-57dd49b-fhg9b + local pod=minio-service-57dd49b-fhg9b + set +o xtrace waiting for pod/minio-service-57dd49b-fhg9b to be ready.OK + '[' -n psmdb-operator ']' + kubectl_bin create svc -n psmdb-operator externalname minio-service --external-name=minio-service.upgrade-sharded-5631.svc.cluster.local --tcp=9000 ++ mktemp + local LAST_OUT=/tmp/tmp.UVAedcFW2E ++ mktemp + local LAST_ERR=/tmp/tmp.B09BfKBKWQ + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl create svc -n psmdb-operator externalname minio-service --external-name=minio-service.upgrade-sharded-5631.svc.cluster.local --tcp=9000 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.UVAedcFW2E service/minio-service created + cat /tmp/tmp.B09BfKBKWQ + rm /tmp/tmp.UVAedcFW2E /tmp/tmp.B09BfKBKWQ + return 0 + kubectl_bin run -i --rm aws-cli --image=perconalab/awscli --restart=Never -- bash -c 'AWS_ACCESS_KEY_ID=some-access-key AWS_SECRET_ACCESS_KEY=some-secret-key AWS_DEFAULT_REGION=us-east-1 \ /usr/bin/aws --endpoint-url http://minio-service:9000 s3 mb s3://operator-testing' ++ mktemp + local LAST_OUT=/tmp/tmp.TOyncukT3u ++ mktemp + local LAST_ERR=/tmp/tmp.nDRngnbqxu + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl run -i --rm aws-cli --image=perconalab/awscli --restart=Never -- bash -c 'AWS_ACCESS_KEY_ID=some-access-key AWS_SECRET_ACCESS_KEY=some-secret-key AWS_DEFAULT_REGION=us-east-1 \ /usr/bin/aws --endpoint-url http://minio-service:9000 s3 mb s3://operator-testing' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.TOyncukT3u make_bucket: operator-testing pod "aws-cli" deleted + cat /tmp/tmp.nDRngnbqxu If you don't see a command prompt, try pressing enter. warning: couldn't attach to pod/aws-cli, falling back to streaming logs: unable to upgrade connection: container aws-cli not found in pod aws-cli_upgrade-sharded-5631 + rm /tmp/tmp.TOyncukT3u /tmp/tmp.nDRngnbqxu + return 0 + desc 'create secrets and start client' + set +o xtrace ----------------------------------------------------------------------------------- create secrets and start client ----------------------------------------------------------------------------------- + curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v1.16.0/deploy/secrets.yaml + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/e2e-tests/conf/client.yml -f /tmp/tmp.SUPwIfNhKD/secrets.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.HGRdDmALKj ++ mktemp + local LAST_ERR=/tmp/tmp.oEIb1xevAQ + 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-1561/e2e-tests/conf/client.yml -f /tmp/tmp.SUPwIfNhKD/secrets.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.HGRdDmALKj deployment.apps/psmdb-client created secret/my-cluster-name-secrets created + cat /tmp/tmp.oEIb1xevAQ + rm /tmp/tmp.HGRdDmALKj /tmp/tmp.oEIb1xevAQ + return 0 + desc 'create first PSMDB cluster upgrade-sharded' + set +o xtrace ----------------------------------------------------------------------------------- create first PSMDB cluster upgrade-sharded ----------------------------------------------------------------------------------- + local cr_yaml=/tmp/tmp.SUPwIfNhKD/cr_v1.16.0.yaml + prepare_cr_yaml /tmp/tmp.SUPwIfNhKD/cr_v1.16.0.yaml + local cr_yaml=/tmp/tmp.SUPwIfNhKD/cr_v1.16.0.yaml + curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v1.16.0/deploy/cr.yaml + yq eval ' .metadata.name = "upgrade-sharded" | .spec.upgradeOptions.apply = "disabled" | .spec.replsets[].size = 3 | .spec.replsets[].arbiter.enabled = false | .spec.backup.enabled = true | .spec.backup.tasks = [] | .spec.backup.pitr.enabled = false | .spec.backup.storages.minio.type = "s3" | .spec.backup.storages.minio.s3.credentialsSecret = "minio-secret" | .spec.backup.storages.minio.s3.region = "us-east-1" | .spec.backup.storages.minio.s3.bucket = "operator-testing" | .spec.backup.storages.minio.s3.endpointUrl = "http://minio-service:9000/" | .spec.backup.storages.minio.s3.insecureSkipTLSVerify = false | .spec.sharding.enabled = true | .spec.sharding.configsvrReplSet.size = 3 | .spec.sharding.mongos.size = 3 | .spec.image="" | .spec.image tag="!!null" | .spec.backup.image = "-backup" | .spec.pmm.image = "-pmm"' + apply_cluster /tmp/tmp.SUPwIfNhKD/cr_v1.16.0.yaml + '[' -z '' ']' + kubectl_bin apply -f - + cat_config /tmp/tmp.SUPwIfNhKD/cr_v1.16.0.yaml + cat /tmp/tmp.SUPwIfNhKD/cr_v1.16.0.yaml ++ mktemp + yq eval '.spec.upgradeOptions.apply="Never"' + yq eval '(.spec | select(has("initImage"))).initImage = "perconalab\/percona-server-mongodb-operator:1.16.0"' + local LAST_OUT=/tmp/tmp.eTn30TGRCX + yq eval '(.spec | select(has("backup"))).backup.image = "percona/percona-backup-mongodb:2.4.1"' + yq eval '(.spec | select(has("pmm"))).pmm.image = "percona/pmm-client:2.41.2"' + yq eval '(.spec | select(.image == null)).image = "percona/percona-server-mongodb:7.0.8-5"' ++ mktemp + local LAST_ERR=/tmp/tmp.FHAqvAuyDQ + 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.eTn30TGRCX perconaservermongodb.psmdb.percona.com/upgrade-sharded created + cat /tmp/tmp.FHAqvAuyDQ + rm /tmp/tmp.eTn30TGRCX /tmp/tmp.FHAqvAuyDQ + return 0 + desc 'check if all Pods started' + set +o xtrace ----------------------------------------------------------------------------------- check if all Pods started ----------------------------------------------------------------------------------- + wait_for_running upgrade-sharded-rs0 3 false + local name=upgrade-sharded-rs0 + let last_pod=2 + local check_cluster_readyness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=upgrade-sharded ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod upgrade-sharded-rs0-0 + local pod=upgrade-sharded-rs0-0 + set +o xtrace waiting for pod/upgrade-sharded-rs0-0 to be ready....................OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod upgrade-sharded-rs0-1 + local pod=upgrade-sharded-rs0-1 + set +o xtrace waiting for pod/upgrade-sharded-rs0-1 to be ready...........OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.kLrw4xOYPn +++ mktemp ++ local LAST_ERR=/tmp/tmp.ZvO4BWW2zH ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.kLrw4xOYPn ++ cat /tmp/tmp.ZvO4BWW2zH ++ rm /tmp/tmp.kLrw4xOYPn /tmp/tmp.ZvO4BWW2zH ++ return 0 + [[ false == \t\r\u\e ]] + wait_pod upgrade-sharded-rs0-2 + local pod=upgrade-sharded-rs0-2 + set +o xtrace waiting for pod/upgrade-sharded-rs0-2 to be ready........OK ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.CMLjdUMZsV +++ mktemp ++ local LAST_ERR=/tmp/tmp.gSnc6zcUrD ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.CMLjdUMZsV ++ cat /tmp/tmp.gSnc6zcUrD ++ rm /tmp/tmp.CMLjdUMZsV /tmp/tmp.gSnc6zcUrD ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ false == \t\r\u\e ]] + wait_for_running upgrade-sharded-cfg 3 false + local name=upgrade-sharded-cfg + let last_pod=2 + local check_cluster_readyness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=upgrade-sharded ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod upgrade-sharded-cfg-0 + local pod=upgrade-sharded-cfg-0 + set +o xtrace waiting for pod/upgrade-sharded-cfg-0 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod upgrade-sharded-cfg-1 + local pod=upgrade-sharded-cfg-1 + set +o xtrace waiting for pod/upgrade-sharded-cfg-1 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.M9IeELkeqv +++ mktemp ++ local LAST_ERR=/tmp/tmp.nxRi43lED2 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.M9IeELkeqv ++ cat /tmp/tmp.nxRi43lED2 ++ rm /tmp/tmp.M9IeELkeqv /tmp/tmp.nxRi43lED2 ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod upgrade-sharded-cfg-2 + local pod=upgrade-sharded-cfg-2 + set +o xtrace waiting for pod/upgrade-sharded-cfg-2 to be ready.OK ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.mxwG8H4qLR +++ mktemp ++ local LAST_ERR=/tmp/tmp.9kQKBqn6zq ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.mxwG8H4qLR ++ cat /tmp/tmp.9kQKBqn6zq ++ rm /tmp/tmp.mxwG8H4qLR /tmp/tmp.9kQKBqn6zq ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ false == \t\r\u\e ]] + wait_cluster_consistency upgrade-sharded + local retry=0 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.DPQPyzh0FI +++ mktemp ++ local LAST_ERR=/tmp/tmp.Sq4z3bWHku ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.DPQPyzh0FI ++ cat /tmp/tmp.Sq4z3bWHku ++ rm /tmp/tmp.DPQPyzh0FI /tmp/tmp.Sq4z3bWHku ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 1 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.7bHO8mIN5v +++ mktemp ++ local LAST_ERR=/tmp/tmp.pquQRsuxwn ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.7bHO8mIN5v ++ cat /tmp/tmp.pquQRsuxwn ++ rm /tmp/tmp.7bHO8mIN5v /tmp/tmp.pquQRsuxwn ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 2 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.TVWwo9T0bD +++ mktemp ++ local LAST_ERR=/tmp/tmp.0f1IhkMeHL ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.TVWwo9T0bD ++ cat /tmp/tmp.0f1IhkMeHL ++ rm /tmp/tmp.TVWwo9T0bD /tmp/tmp.0f1IhkMeHL ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 3 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.8l6XnKBB9a +++ mktemp ++ local LAST_ERR=/tmp/tmp.DgCknj8ICb ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.8l6XnKBB9a ++ cat /tmp/tmp.DgCknj8ICb ++ rm /tmp/tmp.8l6XnKBB9a /tmp/tmp.DgCknj8ICb ++ return 0 + [[ ready == \r\e\a\d\y ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.iZSK8nCRbw +++ mktemp ++ local LAST_ERR=/tmp/tmp.RPtuiGOOrb ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.iZSK8nCRbw ++ cat /tmp/tmp.RPtuiGOOrb ++ rm /tmp/tmp.iZSK8nCRbw /tmp/tmp.RPtuiGOOrb ++ return 0 + [[ 3 == \3 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.EZFGCjb4i7 +++ mktemp ++ local LAST_ERR=/tmp/tmp.G0zP8ejre6 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.EZFGCjb4i7 ++ cat /tmp/tmp.G0zP8ejre6 ++ rm /tmp/tmp.EZFGCjb4i7 /tmp/tmp.G0zP8ejre6 ++ return 0 + [[ 3 == \3 ]] + desc 'create user myApp' + set +o xtrace ----------------------------------------------------------------------------------- create user myApp ----------------------------------------------------------------------------------- + run_mongos 'db.createUser({user: "myApp", pwd: "myPass", roles: [{ db: "myApp", role: "readWrite" }]})' userAdmin:userAdmin123456@upgrade-sharded-mongos.upgrade-sharded-5631 + local 'command=db.createUser({user: "myApp", pwd: "myPass", roles: [{ db: "myApp", role: "readWrite" }]})' + local uri=userAdmin:userAdmin123456@upgrade-sharded-mongos.upgrade-sharded-5631 + local driver=mongodb + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.F01EYj6JJh +++ mktemp ++ local LAST_ERR=/tmp/tmp.sGzSMxYSJi ++ 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.F01EYj6JJh ++ cat /tmp/tmp.sGzSMxYSJi ++ rm /tmp/tmp.F01EYj6JJh /tmp/tmp.sGzSMxYSJi ++ return 0 + local client_container=psmdb-client-7469665986-l6qsl + local mongo_flag= + kubectl_bin exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''db.createUser({user: "myApp", pwd: "myPass", roles: [{ db: "myApp", role: "readWrite" }]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.B5z5UWoMc4 ++ mktemp + local LAST_ERR=/tmp/tmp.yzRKrrekGT + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''db.createUser({user: "myApp", pwd: "myPass", roles: [{ db: "myApp", role: "readWrite" }]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.B5z5UWoMc4 Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("77bc87ed-4c28-466c-a572-c5e84664b379") } Percona Server for MongoDB server version: v7.0.8-5 WARNING: shell and server versions do not match Successfully added user: { "user" : "myApp", "roles" : [ { "db" : "myApp", "role" : "readWrite" } ] } bye + cat /tmp/tmp.yzRKrrekGT + rm /tmp/tmp.B5z5UWoMc4 /tmp/tmp.yzRKrrekGT + return 0 + desc 'write data, read from all' + set +o xtrace ----------------------------------------------------------------------------------- write data, read from all ----------------------------------------------------------------------------------- + run_mongos 'use myApp\n db.test.insert({ x: 100500 })' myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local 'command=use myApp\n db.test.insert({ x: 100500 })' + local uri=myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local driver=mongodb + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.lyx3Zcxy5d +++ mktemp ++ local LAST_ERR=/tmp/tmp.83gpxHKqVz ++ 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.lyx3Zcxy5d ++ cat /tmp/tmp.83gpxHKqVz ++ rm /tmp/tmp.lyx3Zcxy5d /tmp/tmp.83gpxHKqVz ++ return 0 + local client_container=psmdb-client-7469665986-l6qsl + local mongo_flag= + kubectl_bin exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.hfP7bJ0kMs ++ mktemp + local LAST_ERR=/tmp/tmp.d3jfFEWGFF + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100500 })\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.hfP7bJ0kMs Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("eb97ca13-84d0-483f-aac9-dbebec8c1d14") } Percona Server for MongoDB server version: v7.0.8-5 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.d3jfFEWGFF + rm /tmp/tmp.hfP7bJ0kMs /tmp/tmp.d3jfFEWGFF + return 0 + compare_generation 1 statefulset upgrade-sharded-rs0 + local generation=1 + local resource=statefulset + local name=upgrade-sharded-rs0 + local current_generation ++ kubectl_bin get statefulset upgrade-sharded-rs0 -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.9HgePhEknU +++ mktemp ++ local LAST_ERR=/tmp/tmp.MFUMWIxKzF ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get statefulset upgrade-sharded-rs0 -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.9HgePhEknU ++ cat /tmp/tmp.MFUMWIxKzF ++ rm /tmp/tmp.9HgePhEknU /tmp/tmp.MFUMWIxKzF ++ return 0 + current_generation=1 + [[ 1 != \1 ]] + compare_generation 1 statefulset upgrade-sharded-cfg + local generation=1 + local resource=statefulset + local name=upgrade-sharded-cfg + local current_generation ++ kubectl_bin get statefulset upgrade-sharded-cfg -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.3Qt6Ergjy6 +++ mktemp ++ local LAST_ERR=/tmp/tmp.jifu3b5DQk ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get statefulset upgrade-sharded-cfg -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.3Qt6Ergjy6 ++ cat /tmp/tmp.jifu3b5DQk ++ rm /tmp/tmp.3Qt6Ergjy6 /tmp/tmp.jifu3b5DQk ++ return 0 + current_generation=1 + [[ 1 != \1 ]] + compare_generation 1 statefulset upgrade-sharded-mongos + local generation=1 + local resource=statefulset + local name=upgrade-sharded-mongos + local current_generation ++ kubectl_bin get statefulset upgrade-sharded-mongos -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.koct6pm9qf +++ mktemp ++ local LAST_ERR=/tmp/tmp.lqTnKuEviX ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get statefulset upgrade-sharded-mongos -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.koct6pm9qf ++ cat /tmp/tmp.lqTnKuEviX ++ rm /tmp/tmp.koct6pm9qf /tmp/tmp.lqTnKuEviX ++ return 0 + current_generation=1 + [[ 1 != \1 ]] + compare_generation 1 psmdb upgrade-sharded + local generation=1 + local resource=psmdb + local name=upgrade-sharded + local current_generation ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.xxexNnfRY0 +++ mktemp ++ local LAST_ERR=/tmp/tmp.dx68yo99AA ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.xxexNnfRY0 ++ cat /tmp/tmp.dx68yo99AA ++ rm /tmp/tmp.xxexNnfRY0 /tmp/tmp.dx68yo99AA ++ return 0 + current_generation=1 + [[ 1 != \1 ]] + backup_name_minio=backup-minio + desc 'create backup backup-minio' + set +o xtrace ----------------------------------------------------------------------------------- create backup backup-minio ----------------------------------------------------------------------------------- + wait_backup_agent upgrade-sharded-rs0-0 + local agent_pod=upgrade-sharded-rs0-0 + set +o xtrace upgrade-sharded-rs0-0 + wait_backup_agent upgrade-sharded-rs0-1 + local agent_pod=upgrade-sharded-rs0-1 + set +o xtrace upgrade-sharded-rs0-1 + wait_backup_agent upgrade-sharded-rs0-2 + local agent_pod=upgrade-sharded-rs0-2 + set +o xtrace upgrade-sharded-rs0-2 + wait_backup_agent upgrade-sharded-cfg-0 + local agent_pod=upgrade-sharded-cfg-0 + set +o xtrace upgrade-sharded-cfg-0 + wait_backup_agent upgrade-sharded-cfg-1 + local agent_pod=upgrade-sharded-cfg-1 + set +o xtrace upgrade-sharded-cfg-1 + wait_backup_agent upgrade-sharded-cfg-2 + local agent_pod=upgrade-sharded-cfg-2 + set +o xtrace upgrade-sharded-cfg-2 + run_backup minio + local storage=minio + local backup_name=backup-minio + desc 'run backup backup-minio' + set +o xtrace ----------------------------------------------------------------------------------- run backup backup-minio ----------------------------------------------------------------------------------- + yq eval '.metadata.name = "backup-minio" | .spec.storageName = "minio"' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/e2e-tests/upgrade-sharded/conf/backup-minio.yml + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.H4vecK6zTP ++ mktemp + local LAST_ERR=/tmp/tmp.yo9Lo7Am1T + 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.H4vecK6zTP perconaservermongodbbackup.psmdb.percona.com/backup-minio created + cat /tmp/tmp.yo9Lo7Am1T + rm /tmp/tmp.H4vecK6zTP /tmp/tmp.yo9Lo7Am1T + return 0 + wait_backup backup-minio + local backup_name=backup-minio + set +o xtrace backup-minio.................... + desc 'upgrade operator' + set +o xtrace ----------------------------------------------------------------------------------- upgrade operator ----------------------------------------------------------------------------------- + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.W58TdCujv2 ++ mktemp + local LAST_ERR=/tmp/tmp.fviiauuvf1 + 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-1561/deploy/crd.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.W58TdCujv2 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.fviiauuvf1 + rm /tmp/tmp.W58TdCujv2 /tmp/tmp.fviiauuvf1 + return 0 + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/deploy/cw-rbac.yaml -n psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.jqyp8Zti3b ++ mktemp + local LAST_ERR=/tmp/tmp.K8Cdwlp8KI + 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-1561/deploy/cw-rbac.yaml -n psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.jqyp8Zti3b clusterrole.rbac.authorization.k8s.io/percona-server-mongodb-operator unchanged serviceaccount/percona-server-mongodb-operator unchanged clusterrolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator unchanged + cat /tmp/tmp.K8Cdwlp8KI + rm /tmp/tmp.jqyp8Zti3b /tmp/tmp.K8Cdwlp8KI + return 0 + desc 'use new image perconalab/percona-server-mongodb-operator:PR-1561-964e15bc' + set +o xtrace ----------------------------------------------------------------------------------- use new image perconalab/percona-server-mongodb-operator:PR-1561-964e15bc ----------------------------------------------------------------------------------- + kubectl_bin patch deployment -n psmdb-operator percona-server-mongodb-operator '-p{"spec":{"template":{"spec":{"containers":[{"name":"percona-server-mongodb-operator","image":"perconalab/percona-server-mongodb-operator:PR-1561-964e15bc"}]}}}}' ++ mktemp + local LAST_OUT=/tmp/tmp.5jOqU855Xb ++ mktemp + local LAST_ERR=/tmp/tmp.qE5ZjF3s4U + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl patch deployment -n psmdb-operator percona-server-mongodb-operator '-p{"spec":{"template":{"spec":{"containers":[{"name":"percona-server-mongodb-operator","image":"perconalab/percona-server-mongodb-operator:PR-1561-964e15bc"}]}}}}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.5jOqU855Xb deployment.apps/percona-server-mongodb-operator patched + cat /tmp/tmp.qE5ZjF3s4U + rm /tmp/tmp.5jOqU855Xb /tmp/tmp.qE5ZjF3s4U + return 0 + kubectl_bin rollout status deployment/percona-server-mongodb-operator -n psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.KHhYuw6XpY ++ mktemp + local LAST_ERR=/tmp/tmp.ISTejyKcDR + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl rollout status deployment/percona-server-mongodb-operator -n psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.KHhYuw6XpY Waiting for deployment "percona-server-mongodb-operator" rollout to finish: 1 old replicas are pending termination... Waiting for deployment "percona-server-mongodb-operator" rollout to finish: 1 old replicas are pending termination... deployment "percona-server-mongodb-operator" successfully rolled out + cat /tmp/tmp.ISTejyKcDR + rm /tmp/tmp.KHhYuw6XpY /tmp/tmp.ISTejyKcDR + return 0 + desc 'wait for operator upgrade' + set +o xtrace ----------------------------------------------------------------------------------- wait for operator upgrade ----------------------------------------------------------------------------------- ++ kubectl_bin get pods -n psmdb-operator --selector=name=percona-server-mongodb-operator -o 'custom-columns=NAME:.metadata.name,IMAGE:.spec.containers[0].image' ++ grep -vc NAME ++ awk '{print $1}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.dcVEZ2iWpX +++ mktemp ++ local LAST_ERR=/tmp/tmp.60pwBtDkwg ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pods -n psmdb-operator --selector=name=percona-server-mongodb-operator -o 'custom-columns=NAME:.metadata.name,IMAGE:.spec.containers[0].image' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.dcVEZ2iWpX ++ cat /tmp/tmp.60pwBtDkwg ++ rm /tmp/tmp.dcVEZ2iWpX /tmp/tmp.60pwBtDkwg ++ return 0 + [[ 1 -eq 1 ]] + sleep 10 + desc 'check images and generation after operator upgrade' + set +o xtrace ----------------------------------------------------------------------------------- check images and generation after operator upgrade ----------------------------------------------------------------------------------- + wait_for_running upgrade-sharded-rs0 3 false + local name=upgrade-sharded-rs0 + let last_pod=2 + local check_cluster_readyness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=upgrade-sharded ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod upgrade-sharded-rs0-0 + local pod=upgrade-sharded-rs0-0 + set +o xtrace waiting for pod/upgrade-sharded-rs0-0 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod upgrade-sharded-rs0-1 + local pod=upgrade-sharded-rs0-1 + set +o xtrace waiting for pod/upgrade-sharded-rs0-1 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.UnqCya5VQ0 +++ mktemp ++ local LAST_ERR=/tmp/tmp.3kL2oDPEfw ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.UnqCya5VQ0 ++ cat /tmp/tmp.3kL2oDPEfw ++ rm /tmp/tmp.UnqCya5VQ0 /tmp/tmp.3kL2oDPEfw ++ return 0 + [[ false == \t\r\u\e ]] + wait_pod upgrade-sharded-rs0-2 + local pod=upgrade-sharded-rs0-2 + set +o xtrace waiting for pod/upgrade-sharded-rs0-2 to be ready.OK ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.4F51ZWTPF2 +++ mktemp ++ local LAST_ERR=/tmp/tmp.PaGcMS2LYp ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.4F51ZWTPF2 ++ cat /tmp/tmp.PaGcMS2LYp ++ rm /tmp/tmp.4F51ZWTPF2 /tmp/tmp.PaGcMS2LYp ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ false == \t\r\u\e ]] + wait_for_running upgrade-sharded-cfg 3 false + local name=upgrade-sharded-cfg + let last_pod=2 + local check_cluster_readyness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=upgrade-sharded ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod upgrade-sharded-cfg-0 + local pod=upgrade-sharded-cfg-0 + set +o xtrace waiting for pod/upgrade-sharded-cfg-0 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod upgrade-sharded-cfg-1 + local pod=upgrade-sharded-cfg-1 + set +o xtrace waiting for pod/upgrade-sharded-cfg-1 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.ynXLejTLUm +++ mktemp ++ local LAST_ERR=/tmp/tmp.tQsftxoe0Z ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.ynXLejTLUm ++ cat /tmp/tmp.tQsftxoe0Z ++ rm /tmp/tmp.ynXLejTLUm /tmp/tmp.tQsftxoe0Z ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod upgrade-sharded-cfg-2 + local pod=upgrade-sharded-cfg-2 + set +o xtrace waiting for pod/upgrade-sharded-cfg-2 to be ready.OK ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.turkOrAo3U +++ mktemp ++ local LAST_ERR=/tmp/tmp.BnUh3SvkkF ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.turkOrAo3U ++ cat /tmp/tmp.BnUh3SvkkF ++ rm /tmp/tmp.turkOrAo3U /tmp/tmp.BnUh3SvkkF ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ false == \t\r\u\e ]] + wait_cluster_consistency upgrade-sharded + local retry=0 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.cd6AB10uAP +++ mktemp ++ local LAST_ERR=/tmp/tmp.bAZ2Fzzr5x ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.cd6AB10uAP ++ cat /tmp/tmp.bAZ2Fzzr5x ++ rm /tmp/tmp.cd6AB10uAP /tmp/tmp.bAZ2Fzzr5x ++ return 0 + [[ ready == \r\e\a\d\y ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.J2MFv6nVG7 +++ mktemp ++ local LAST_ERR=/tmp/tmp.k2Hef5rD7l ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.J2MFv6nVG7 ++ cat /tmp/tmp.k2Hef5rD7l ++ rm /tmp/tmp.J2MFv6nVG7 /tmp/tmp.k2Hef5rD7l ++ return 0 + [[ 3 == \3 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.hLoFczuVI9 +++ mktemp ++ local LAST_ERR=/tmp/tmp.pXE0iScNH9 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.hLoFczuVI9 ++ cat /tmp/tmp.pXE0iScNH9 ++ rm /tmp/tmp.hLoFczuVI9 /tmp/tmp.pXE0iScNH9 ++ return 0 + [[ 3 == \3 ]] + check_applied_images operator + local updated_image=operator + case "${updated_image}" in ++ kubectl_bin get pod -n psmdb-operator --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[*].spec.containers[?(@.name == "percona-server-mongodb-operator")].image}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.SVOaQf3Jml +++ mktemp ++ local LAST_ERR=/tmp/tmp.UKw403y3fm ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pod -n psmdb-operator --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[*].spec.containers[?(@.name == "percona-server-mongodb-operator")].image}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.SVOaQf3Jml ++ cat /tmp/tmp.UKw403y3fm ++ rm /tmp/tmp.SVOaQf3Jml /tmp/tmp.UKw403y3fm ++ return 0 + [[ perconalab/percona-server-mongodb-operator:PR-1561-964e15bc == perconalab/percona-server-mongodb-operator:PR-1561-964e15bc ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.backup.image}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.WPYBFTDyv2 +++ mktemp ++ local LAST_ERR=/tmp/tmp.2aX9FwcaJv ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.backup.image}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.WPYBFTDyv2 ++ cat /tmp/tmp.2aX9FwcaJv ++ rm /tmp/tmp.WPYBFTDyv2 /tmp/tmp.2aX9FwcaJv ++ return 0 + [[ percona/percona-backup-mongodb:2.4.1 == percona/percona-backup-mongodb:2.4.1 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.pmm.image}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.FtjUNKRCmT +++ mktemp ++ local LAST_ERR=/tmp/tmp.5vCukC9dsu ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.pmm.image}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.FtjUNKRCmT ++ cat /tmp/tmp.5vCukC9dsu ++ rm /tmp/tmp.FtjUNKRCmT /tmp/tmp.5vCukC9dsu ++ return 0 + [[ percona/pmm-client:2.41.2 == percona/pmm-client:2.41.2 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.image}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.rIpdyKP9eF +++ mktemp ++ local LAST_ERR=/tmp/tmp.KXb28Eyjnl ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.image}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.rIpdyKP9eF ++ cat /tmp/tmp.KXb28Eyjnl ++ rm /tmp/tmp.rIpdyKP9eF /tmp/tmp.KXb28Eyjnl ++ return 0 + [[ percona/percona-server-mongodb:7.0.8-5 == percona/percona-server-mongodb:7.0.8-5 ]] + : Operator image has been updated correctly + compare_generation 1 statefulset upgrade-sharded-rs0 + local generation=1 + local resource=statefulset + local name=upgrade-sharded-rs0 + local current_generation ++ kubectl_bin get statefulset upgrade-sharded-rs0 -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.TBlc2A1YuI +++ mktemp ++ local LAST_ERR=/tmp/tmp.8FZAlKF6nL ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get statefulset upgrade-sharded-rs0 -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.TBlc2A1YuI ++ cat /tmp/tmp.8FZAlKF6nL ++ rm /tmp/tmp.TBlc2A1YuI /tmp/tmp.8FZAlKF6nL ++ return 0 + current_generation=1 + [[ 1 != \1 ]] + compare_generation 1 statefulset upgrade-sharded-cfg + local generation=1 + local resource=statefulset + local name=upgrade-sharded-cfg + local current_generation ++ kubectl_bin get statefulset upgrade-sharded-cfg -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.G8AVTGMEzb +++ mktemp ++ local LAST_ERR=/tmp/tmp.KAvMbDKKBz ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get statefulset upgrade-sharded-cfg -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.G8AVTGMEzb ++ cat /tmp/tmp.KAvMbDKKBz ++ rm /tmp/tmp.G8AVTGMEzb /tmp/tmp.KAvMbDKKBz ++ return 0 + current_generation=1 + [[ 1 != \1 ]] + compare_generation 1 statefulset upgrade-sharded-mongos + local generation=1 + local resource=statefulset + local name=upgrade-sharded-mongos + local current_generation ++ kubectl_bin get statefulset upgrade-sharded-mongos -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Gk6FxjCcXs +++ mktemp ++ local LAST_ERR=/tmp/tmp.hgi5fhsXey ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get statefulset upgrade-sharded-mongos -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.Gk6FxjCcXs ++ cat /tmp/tmp.hgi5fhsXey ++ rm /tmp/tmp.Gk6FxjCcXs /tmp/tmp.hgi5fhsXey ++ return 0 + current_generation=1 + [[ 1 != \1 ]] + compare_generation 1 psmdb upgrade-sharded + local generation=1 + local resource=psmdb + local name=upgrade-sharded + local current_generation ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.OyaueapIQ6 +++ mktemp ++ local LAST_ERR=/tmp/tmp.AdOKs1wYC3 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.OyaueapIQ6 ++ cat /tmp/tmp.AdOKs1wYC3 ++ rm /tmp/tmp.OyaueapIQ6 /tmp/tmp.AdOKs1wYC3 ++ return 0 + current_generation=1 + [[ 1 != \1 ]] + desc 'patch psmdb images and upgrade' + set +o xtrace ----------------------------------------------------------------------------------- patch psmdb images and upgrade ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb upgrade-sharded --type=merge --patch '{ "spec": { "crVersion": "1.17.0", "image": "perconalab/percona-server-mongodb-operator:main-mongod7.0", "pmm": { "image": "perconalab/pmm-client:dev-latest" }, "backup": { "image": "perconalab/percona-server-mongodb-operator:main-backup" } }}' ++ mktemp + local LAST_OUT=/tmp/tmp.vHzg0qJPXP ++ mktemp + local LAST_ERR=/tmp/tmp.7UAHiM8drR + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl patch psmdb upgrade-sharded --type=merge --patch '{ "spec": { "crVersion": "1.17.0", "image": "perconalab/percona-server-mongodb-operator:main-mongod7.0", "pmm": { "image": "perconalab/pmm-client:dev-latest" }, "backup": { "image": "perconalab/percona-server-mongodb-operator:main-backup" } }}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.vHzg0qJPXP perconaservermongodb.psmdb.percona.com/upgrade-sharded patched + cat /tmp/tmp.7UAHiM8drR + rm /tmp/tmp.vHzg0qJPXP /tmp/tmp.7UAHiM8drR + return 0 + sleep 10 + desc 'check cluster after full upgrade' + set +o xtrace ----------------------------------------------------------------------------------- check cluster after full upgrade ----------------------------------------------------------------------------------- + wait_for_running upgrade-sharded-rs0 3 false + local name=upgrade-sharded-rs0 + let last_pod=2 + local check_cluster_readyness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=upgrade-sharded ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod upgrade-sharded-rs0-0 + local pod=upgrade-sharded-rs0-0 + set +o xtrace waiting for pod/upgrade-sharded-rs0-0 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod upgrade-sharded-rs0-1 + local pod=upgrade-sharded-rs0-1 + set +o xtrace waiting for pod/upgrade-sharded-rs0-1 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.vtaNMDX215 +++ mktemp ++ local LAST_ERR=/tmp/tmp.DJSPxk2N4D ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.vtaNMDX215 ++ cat /tmp/tmp.DJSPxk2N4D ++ rm /tmp/tmp.vtaNMDX215 /tmp/tmp.DJSPxk2N4D ++ return 0 + [[ false == \t\r\u\e ]] + wait_pod upgrade-sharded-rs0-2 + local pod=upgrade-sharded-rs0-2 + set +o xtrace waiting for pod/upgrade-sharded-rs0-2 to be ready.OK ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.djQ1diyuv1 +++ mktemp ++ local LAST_ERR=/tmp/tmp.sewBwwFesp ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.djQ1diyuv1 ++ cat /tmp/tmp.sewBwwFesp ++ rm /tmp/tmp.djQ1diyuv1 /tmp/tmp.sewBwwFesp ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ false == \t\r\u\e ]] + wait_for_running upgrade-sharded-cfg 3 false + local name=upgrade-sharded-cfg + let last_pod=2 + local check_cluster_readyness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=upgrade-sharded ++ seq 0 2 + for i in '$(seq 0 $last_pod)' + [[ 0 -eq 2 ]] + wait_pod upgrade-sharded-cfg-0 + local pod=upgrade-sharded-cfg-0 + set +o xtrace waiting for pod/upgrade-sharded-cfg-0 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 1 -eq 2 ]] + wait_pod upgrade-sharded-cfg-1 + local pod=upgrade-sharded-cfg-1 + set +o xtrace waiting for pod/upgrade-sharded-cfg-1 to be ready.OK + for i in '$(seq 0 $last_pod)' + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.xGzYrLiBev +++ mktemp ++ local LAST_ERR=/tmp/tmp.IYcLDe9nEL ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.xGzYrLiBev ++ cat /tmp/tmp.IYcLDe9nEL ++ rm /tmp/tmp.xGzYrLiBev /tmp/tmp.IYcLDe9nEL ++ return 0 + [[ '' == \t\r\u\e ]] + wait_pod upgrade-sharded-cfg-2 + local pod=upgrade-sharded-cfg-2 + set +o xtrace waiting for pod/upgrade-sharded-cfg-2 to be ready....OK ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].non_voting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.LaFsLqgaVR +++ mktemp ++ local LAST_ERR=/tmp/tmp.2mT0K4gQ0j ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].non_voting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.LaFsLqgaVR ++ cat /tmp/tmp.2mT0K4gQ0j ++ rm /tmp/tmp.LaFsLqgaVR /tmp/tmp.2mT0K4gQ0j ++ return 0 + [[ '' == \t\r\u\e ]] + sleep 10 + [[ false == \t\r\u\e ]] + wait_cluster_consistency upgrade-sharded + local retry=0 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.LGPBLjI0ZK +++ mktemp ++ local LAST_ERR=/tmp/tmp.ZO0D63o93J ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.LGPBLjI0ZK ++ cat /tmp/tmp.ZO0D63o93J ++ rm /tmp/tmp.LGPBLjI0ZK /tmp/tmp.ZO0D63o93J ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 1 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.mGkXGFeIoB +++ mktemp ++ local LAST_ERR=/tmp/tmp.jkCVskB1Jj ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.mGkXGFeIoB ++ cat /tmp/tmp.jkCVskB1Jj ++ rm /tmp/tmp.mGkXGFeIoB /tmp/tmp.jkCVskB1Jj ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 2 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.dq1jtcWXZN +++ mktemp ++ local LAST_ERR=/tmp/tmp.fCzmfQmRw6 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.dq1jtcWXZN ++ cat /tmp/tmp.fCzmfQmRw6 ++ rm /tmp/tmp.dq1jtcWXZN /tmp/tmp.fCzmfQmRw6 ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 3 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.l2ZjMvJpZq +++ mktemp ++ local LAST_ERR=/tmp/tmp.YiLa76Aw6F ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.l2ZjMvJpZq ++ cat /tmp/tmp.YiLa76Aw6F ++ rm /tmp/tmp.l2ZjMvJpZq /tmp/tmp.YiLa76Aw6F ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 4 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.RVFuRxfjWF +++ mktemp ++ local LAST_ERR=/tmp/tmp.Jvrp945UYn ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.RVFuRxfjWF ++ cat /tmp/tmp.Jvrp945UYn ++ rm /tmp/tmp.RVFuRxfjWF /tmp/tmp.Jvrp945UYn ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 5 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.WMfUnGlxfZ +++ mktemp ++ local LAST_ERR=/tmp/tmp.t4gmgIPrgz ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.WMfUnGlxfZ ++ cat /tmp/tmp.t4gmgIPrgz ++ rm /tmp/tmp.WMfUnGlxfZ /tmp/tmp.t4gmgIPrgz ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 6 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.n3rt2mciEH +++ mktemp ++ local LAST_ERR=/tmp/tmp.TxkGKPi8uw ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.n3rt2mciEH ++ cat /tmp/tmp.TxkGKPi8uw ++ rm /tmp/tmp.n3rt2mciEH /tmp/tmp.TxkGKPi8uw ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 7 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.AhDNgbBCMo +++ mktemp ++ local LAST_ERR=/tmp/tmp.rj82xgCWSt ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.AhDNgbBCMo ++ cat /tmp/tmp.rj82xgCWSt ++ rm /tmp/tmp.AhDNgbBCMo /tmp/tmp.rj82xgCWSt ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 8 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.v9OrtaSYNw +++ mktemp ++ local LAST_ERR=/tmp/tmp.d9Xn6D6r95 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.v9OrtaSYNw ++ cat /tmp/tmp.d9Xn6D6r95 ++ rm /tmp/tmp.v9OrtaSYNw /tmp/tmp.d9Xn6D6r95 ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 9 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.3ACAfCGgnP +++ mktemp ++ local LAST_ERR=/tmp/tmp.SqAVDZwHCA ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.3ACAfCGgnP ++ cat /tmp/tmp.SqAVDZwHCA ++ rm /tmp/tmp.3ACAfCGgnP /tmp/tmp.SqAVDZwHCA ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 10 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.PKYUfdfv1M +++ mktemp ++ local LAST_ERR=/tmp/tmp.yFtjXKeFcj ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.PKYUfdfv1M ++ cat /tmp/tmp.yFtjXKeFcj ++ rm /tmp/tmp.PKYUfdfv1M /tmp/tmp.yFtjXKeFcj ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 11 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.MjbSBSIoaT +++ mktemp ++ local LAST_ERR=/tmp/tmp.M5sHjPgNmi ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.MjbSBSIoaT ++ cat /tmp/tmp.M5sHjPgNmi ++ rm /tmp/tmp.MjbSBSIoaT /tmp/tmp.M5sHjPgNmi ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 12 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.qBm7tKdjNh +++ mktemp ++ local LAST_ERR=/tmp/tmp.N4g6uVxcB9 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.qBm7tKdjNh ++ cat /tmp/tmp.N4g6uVxcB9 ++ rm /tmp/tmp.qBm7tKdjNh /tmp/tmp.N4g6uVxcB9 ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 13 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.faIqIevAyM +++ mktemp ++ local LAST_ERR=/tmp/tmp.ILddz0Uj7E ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.faIqIevAyM ++ cat /tmp/tmp.ILddz0Uj7E ++ rm /tmp/tmp.faIqIevAyM /tmp/tmp.ILddz0Uj7E ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 14 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.NWb10ihRVn +++ mktemp ++ local LAST_ERR=/tmp/tmp.7TVsv1TwyQ ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.NWb10ihRVn ++ cat /tmp/tmp.7TVsv1TwyQ ++ rm /tmp/tmp.NWb10ihRVn /tmp/tmp.7TVsv1TwyQ ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 15 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.hNLefIA0nz +++ mktemp ++ local LAST_ERR=/tmp/tmp.9eKJlLpchg ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.hNLefIA0nz ++ cat /tmp/tmp.9eKJlLpchg ++ rm /tmp/tmp.hNLefIA0nz /tmp/tmp.9eKJlLpchg ++ return 0 + [[ ready == \r\e\a\d\y ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.v0bXwJHxZl +++ mktemp ++ local LAST_ERR=/tmp/tmp.tuXCTW5BXL ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.v0bXwJHxZl ++ cat /tmp/tmp.tuXCTW5BXL ++ rm /tmp/tmp.v0bXwJHxZl /tmp/tmp.tuXCTW5BXL ++ return 0 + [[ 3 == \3 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.EdtZWnuOTh +++ mktemp ++ local LAST_ERR=/tmp/tmp.j9xEUiQ4ld ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.EdtZWnuOTh ++ cat /tmp/tmp.j9xEUiQ4ld ++ rm /tmp/tmp.EdtZWnuOTh /tmp/tmp.j9xEUiQ4ld ++ return 0 + [[ 3 == \3 ]] + simple_data_check upgrade-sharded 3 1 -mongos + local cluster_name=upgrade-sharded + let last_pod=3-1 + local isSharded=1 + local cluster_pfx=-mongos + '[' 1 -eq 1 ']' + sleep 10 + wait_cluster_consistency upgrade-sharded + local retry=0 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.tW8ZSgyAUX +++ mktemp ++ local LAST_ERR=/tmp/tmp.wstWOggRD2 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.tW8ZSgyAUX ++ cat /tmp/tmp.wstWOggRD2 ++ rm /tmp/tmp.tW8ZSgyAUX /tmp/tmp.wstWOggRD2 ++ return 0 + [[ ready == \r\e\a\d\y ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.CwOx6pR4MI +++ mktemp ++ local LAST_ERR=/tmp/tmp.C91MBh52Bp ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.CwOx6pR4MI ++ cat /tmp/tmp.C91MBh52Bp ++ rm /tmp/tmp.CwOx6pR4MI /tmp/tmp.C91MBh52Bp ++ return 0 + [[ 3 == \3 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.e5TZHYnfkM +++ mktemp ++ local LAST_ERR=/tmp/tmp.w8lKbHQY7n ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.e5TZHYnfkM ++ cat /tmp/tmp.w8lKbHQY7n ++ rm /tmp/tmp.e5TZHYnfkM /tmp/tmp.w8lKbHQY7n ++ return 0 + [[ 3 == \3 ]] + compare_mongos_cmd find myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local command=find + local uri=myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local postfix= + local suffix= + local database=myApp + local collection=test + run_mongos 'use myApp\n db.test.find()' myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 mongodb '' + local 'command=use myApp\n db.test.find()' + local uri=myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local driver=mongodb + egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + local suffix=.svc.cluster.local + /usr/bin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.NDRcgKI2oz +++ mktemp ++ local LAST_ERR=/tmp/tmp.o4W1lS0cG0 ++ 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.NDRcgKI2oz ++ cat /tmp/tmp.o4W1lS0cG0 ++ rm /tmp/tmp.NDRcgKI2oz /tmp/tmp.o4W1lS0cG0 ++ return 0 + local client_container=psmdb-client-7469665986-l6qsl + local mongo_flag= + kubectl_bin exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.e973zqBvof ++ mktemp + local LAST_ERR=/tmp/tmp.Fe2lCS7qId + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.e973zqBvof + cat /tmp/tmp.Fe2lCS7qId + rm /tmp/tmp.e973zqBvof /tmp/tmp.Fe2lCS7qId + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/e2e-tests/upgrade-sharded/compare/find.json /tmp/tmp.SUPwIfNhKD/find + check_applied_images all + local updated_image=all + case "${updated_image}" in ++ kubectl_bin get pod -n psmdb-operator --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[*].spec.containers[?(@.name == "percona-server-mongodb-operator")].image}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.AD5ageK9gG +++ mktemp ++ local LAST_ERR=/tmp/tmp.TT24KrU1LB ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pod -n psmdb-operator --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[*].spec.containers[?(@.name == "percona-server-mongodb-operator")].image}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.AD5ageK9gG ++ cat /tmp/tmp.TT24KrU1LB ++ rm /tmp/tmp.AD5ageK9gG /tmp/tmp.TT24KrU1LB ++ return 0 + [[ perconalab/percona-server-mongodb-operator:PR-1561-964e15bc == perconalab/percona-server-mongodb-operator:PR-1561-964e15bc ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.backup.image}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.xNxLVEC1Si +++ mktemp ++ local LAST_ERR=/tmp/tmp.QZxmdPc5YP ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.backup.image}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.xNxLVEC1Si ++ cat /tmp/tmp.QZxmdPc5YP ++ rm /tmp/tmp.xNxLVEC1Si /tmp/tmp.QZxmdPc5YP ++ return 0 + [[ perconalab/percona-server-mongodb-operator:main-backup == perconalab/percona-server-mongodb-operator:main-backup ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.pmm.image}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.7fNqHvSTRq +++ mktemp ++ local LAST_ERR=/tmp/tmp.BfoYHTRByc ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.pmm.image}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.7fNqHvSTRq ++ cat /tmp/tmp.BfoYHTRByc ++ rm /tmp/tmp.7fNqHvSTRq /tmp/tmp.BfoYHTRByc ++ return 0 + [[ perconalab/pmm-client:dev-latest == perconalab/pmm-client:dev-latest ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.spec.image}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.iPJB2MX3o5 +++ mktemp ++ local LAST_ERR=/tmp/tmp.9unwLDg7EN ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.spec.image}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.iPJB2MX3o5 ++ cat /tmp/tmp.9unwLDg7EN ++ rm /tmp/tmp.iPJB2MX3o5 /tmp/tmp.9unwLDg7EN ++ return 0 + [[ perconalab/percona-server-mongodb-operator:main-mongod7.0 == perconalab/percona-server-mongodb-operator:main-mongod7.0 ]] + : Cluster images have been updated correctly + compare_generation 2 statefulset upgrade-sharded-rs0 + local generation=2 + local resource=statefulset + local name=upgrade-sharded-rs0 + local current_generation ++ kubectl_bin get statefulset upgrade-sharded-rs0 -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.zbSXfFfNra +++ mktemp ++ local LAST_ERR=/tmp/tmp.R1ohelsFsV ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get statefulset upgrade-sharded-rs0 -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.zbSXfFfNra ++ cat /tmp/tmp.R1ohelsFsV ++ rm /tmp/tmp.zbSXfFfNra /tmp/tmp.R1ohelsFsV ++ return 0 + current_generation=2 + [[ 2 != \2 ]] + compare_generation 2 statefulset upgrade-sharded-cfg + local generation=2 + local resource=statefulset + local name=upgrade-sharded-cfg + local current_generation ++ kubectl_bin get statefulset upgrade-sharded-cfg -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.N2mAFuew0d +++ mktemp ++ local LAST_ERR=/tmp/tmp.ZUXR8ps4Gq ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get statefulset upgrade-sharded-cfg -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.N2mAFuew0d ++ cat /tmp/tmp.ZUXR8ps4Gq ++ rm /tmp/tmp.N2mAFuew0d /tmp/tmp.ZUXR8ps4Gq ++ return 0 + current_generation=2 + [[ 2 != \2 ]] + compare_generation 2 statefulset upgrade-sharded-mongos + local generation=2 + local resource=statefulset + local name=upgrade-sharded-mongos + local current_generation ++ kubectl_bin get statefulset upgrade-sharded-mongos -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.LOQJWXGsKR +++ mktemp ++ local LAST_ERR=/tmp/tmp.t83Urjtid8 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get statefulset upgrade-sharded-mongos -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.LOQJWXGsKR ++ cat /tmp/tmp.t83Urjtid8 ++ rm /tmp/tmp.LOQJWXGsKR /tmp/tmp.t83Urjtid8 ++ return 0 + current_generation=2 + [[ 2 != \2 ]] + compare_generation 2 psmdb upgrade-sharded + local generation=2 + local resource=psmdb + local name=upgrade-sharded + local current_generation ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.metadata.generation}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.hbEHE2OQw3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.t5iXGt2mFZ ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.metadata.generation}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.hbEHE2OQw3 ++ cat /tmp/tmp.t5iXGt2mFZ ++ rm /tmp/tmp.hbEHE2OQw3 /tmp/tmp.t5iXGt2mFZ ++ return 0 + current_generation=2 + [[ 2 != \2 ]] + desc 'check if upgrade order is cfg, rs0, mongos' + set +o xtrace ----------------------------------------------------------------------------------- check if upgrade order is cfg, rs0, mongos ----------------------------------------------------------------------------------- + sleep 60 + check_upgrade_order cfg 3 1 + local pod_type=cfg + local cluster_size=3 + local upgrade_order=1 + local start=1 + local end=3 ++ kubectl_bin get pod --sort-by=.status.startTime ++ sed -n 1,3p +++ mktemp ++ grep -c '\-cfg\-' ++ grep -vE '^NAME|client|operator|minio-service' ++ local LAST_OUT=/tmp/tmp.8yEUGCBTKv +++ mktemp ++ local LAST_ERR=/tmp/tmp.IRSMyuCVAY ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pod --sort-by=.status.startTime ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.8yEUGCBTKv ++ cat /tmp/tmp.IRSMyuCVAY ++ rm /tmp/tmp.8yEUGCBTKv /tmp/tmp.IRSMyuCVAY ++ return 0 + local nr=3 + [[ 3 -ne 3 ]] + echo 'cfg was upgraded 1!' cfg was upgraded 1! + check_upgrade_order rs0 3 2 + local pod_type=rs0 + local cluster_size=3 + local upgrade_order=2 + local start=4 + local end=6 ++ kubectl_bin get pod --sort-by=.status.startTime ++ grep -vE '^NAME|client|operator|minio-service' ++ grep -c '\-rs0\-' +++ mktemp ++ sed -n 4,6p ++ local LAST_OUT=/tmp/tmp.jmLG6ixAVW +++ mktemp ++ local LAST_ERR=/tmp/tmp.yKY0Ka4Fsq ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pod --sort-by=.status.startTime ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.jmLG6ixAVW ++ cat /tmp/tmp.yKY0Ka4Fsq ++ rm /tmp/tmp.jmLG6ixAVW /tmp/tmp.yKY0Ka4Fsq ++ return 0 + local nr=3 + [[ 3 -ne 3 ]] + echo 'rs0 was upgraded 2!' rs0 was upgraded 2! + check_upgrade_order mongos 3 3 + local pod_type=mongos + local cluster_size=3 + local upgrade_order=3 + local start=7 + local end=9 ++ grep -vE '^NAME|client|operator|minio-service' ++ kubectl_bin get pod --sort-by=.status.startTime +++ mktemp ++ grep -c '\-mongos\-' ++ local LAST_OUT=/tmp/tmp.iTtYYu8zZX ++ sed -n 7,9p +++ mktemp ++ local LAST_ERR=/tmp/tmp.PaNtUgEPNS ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get pod --sort-by=.status.startTime ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.iTtYYu8zZX ++ cat /tmp/tmp.PaNtUgEPNS ++ rm /tmp/tmp.iTtYYu8zZX /tmp/tmp.PaNtUgEPNS ++ return 0 + local nr=3 + [[ 3 -ne 3 ]] + echo 'mongos was upgraded 3!' mongos was upgraded 3! + desc 'drop collection and do restore with new version' + set +o xtrace ----------------------------------------------------------------------------------- drop collection and do restore with new version ----------------------------------------------------------------------------------- + run_mongos 'use myApp\n db.test.drop()' myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local 'command=use myApp\n db.test.drop()' + local uri=myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local driver=mongodb + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.gIo8HDhkUl +++ mktemp ++ local LAST_ERR=/tmp/tmp.VQ0twaBHPA ++ 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.gIo8HDhkUl ++ cat /tmp/tmp.VQ0twaBHPA ++ rm /tmp/tmp.gIo8HDhkUl /tmp/tmp.VQ0twaBHPA ++ return 0 + local client_container=psmdb-client-7469665986-l6qsl + local mongo_flag= + kubectl_bin exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.drop()\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.ZY26q8m0w6 ++ mktemp + local LAST_ERR=/tmp/tmp.e7pBuMOOVO + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.drop()\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ZY26q8m0w6 Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("aaf228a2-87d4-4027-abdb-671586698809") } Percona Server for MongoDB server version: v7.0.8-5 WARNING: shell and server versions do not match switched to db myApp true bye + cat /tmp/tmp.e7pBuMOOVO + rm /tmp/tmp.ZY26q8m0w6 /tmp/tmp.e7pBuMOOVO + return 0 ++ get_backup_dest backup-minio ++ local backup_name=backup-minio ++ kubectl_bin get psmdb-backup backup-minio -o 'jsonpath={.status.destination}' ++ sed -e 's/.json$//' ++ sed 's|s3://||' ++ sed 's|azure://||' +++ mktemp ++ local LAST_OUT=/tmp/tmp.KEv1KpCLN4 +++ mktemp ++ local LAST_ERR=/tmp/tmp.Od5KIW2eEZ ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb-backup backup-minio -o 'jsonpath={.status.destination}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.KEv1KpCLN4 ++ cat /tmp/tmp.Od5KIW2eEZ ++ rm /tmp/tmp.KEv1KpCLN4 /tmp/tmp.Od5KIW2eEZ ++ return 0 + backup_dest_minio=operator-testing/2024-05-29T14:28:40Z + grep myApp.test.gz + retry 3 5 kubectl_bin run -i --rm aws-cli --image=perconalab/awscli --restart=Never -- /usr/bin/env AWS_ACCESS_KEY_ID=some-access-key AWS_SECRET_ACCESS_KEY=some-secret-key AWS_DEFAULT_REGION=us-east-1 /usr/bin/aws --endpoint-url http://minio-service:9000 s3 ls s3://operator-testing/2024-05-29T14:28:40Z/rs0/ + local max=3 + local delay=5 + shift 2 + local n=1 + kubectl_bin run -i --rm aws-cli --image=perconalab/awscli --restart=Never -- /usr/bin/env AWS_ACCESS_KEY_ID=some-access-key AWS_SECRET_ACCESS_KEY=some-secret-key AWS_DEFAULT_REGION=us-east-1 /usr/bin/aws --endpoint-url http://minio-service:9000 s3 ls s3://operator-testing/2024-05-29T14:28:40Z/rs0/ ++ mktemp + local LAST_OUT=/tmp/tmp.SXjByKeEdw ++ mktemp + local LAST_ERR=/tmp/tmp.uhqFmljwGR + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl run -i --rm aws-cli --image=perconalab/awscli --restart=Never -- /usr/bin/env AWS_ACCESS_KEY_ID=some-access-key AWS_SECRET_ACCESS_KEY=some-secret-key AWS_DEFAULT_REGION=us-east-1 /usr/bin/aws --endpoint-url http://minio-service:9000 s3 ls s3://operator-testing/2024-05-29T14:28:40Z/rs0/ + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.SXjByKeEdw + cat /tmp/tmp.uhqFmljwGR If you don't see a command prompt, try pressing enter. warning: couldn't attach to pod/aws-cli, falling back to streaming logs: unable to upgrade connection: container aws-cli not found in pod aws-cli_upgrade-sharded-5631 + rm /tmp/tmp.SXjByKeEdw /tmp/tmp.uhqFmljwGR + return 0 2024-05-29 14:28:44 55 myApp.test.gz + run_mongos 'use myApp\n db.test.insert({ x: 100501 })' myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local 'command=use myApp\n db.test.insert({ x: 100501 })' + local uri=myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local driver=mongodb + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.5Fp7yzvHUj +++ mktemp ++ local LAST_ERR=/tmp/tmp.3rssoW2tEc ++ 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.5Fp7yzvHUj ++ cat /tmp/tmp.3rssoW2tEc ++ rm /tmp/tmp.5Fp7yzvHUj /tmp/tmp.3rssoW2tEc ++ return 0 + local client_container=psmdb-client-7469665986-l6qsl + local mongo_flag= + kubectl_bin exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100501 })\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.Ygbr1wluEg ++ mktemp + local LAST_ERR=/tmp/tmp.58d1wXfMAK + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.insert({ x: 100501 })\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Ygbr1wluEg Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("0c0c8a16-f2cd-4cfa-8981-154ca495168b") } Percona Server for MongoDB server version: v7.0.8-5 WARNING: shell and server versions do not match switched to db myApp WriteResult({ "nInserted" : 1 }) bye + cat /tmp/tmp.58d1wXfMAK + rm /tmp/tmp.Ygbr1wluEg /tmp/tmp.58d1wXfMAK + return 0 + compare_mongos_cmd find myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 -2nd .svc.cluster.local myApp test + local command=find + local uri=myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local postfix=-2nd + local suffix=.svc.cluster.local + local database=myApp + local collection=test + run_mongos 'use myApp\n db.test.find()' myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 mongodb .svc.cluster.local + local 'command=use myApp\n db.test.find()' + egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + local uri=myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local driver=mongodb + local suffix=.svc.cluster.local + /usr/bin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.cDgrr7eBbf +++ mktemp ++ local LAST_ERR=/tmp/tmp.S4Mx84syU1 ++ 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.cDgrr7eBbf ++ cat /tmp/tmp.S4Mx84syU1 ++ rm /tmp/tmp.cDgrr7eBbf /tmp/tmp.S4Mx84syU1 ++ return 0 + local client_container=psmdb-client-7469665986-l6qsl + local mongo_flag= + kubectl_bin exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.LseCgoMkYU ++ mktemp + local LAST_ERR=/tmp/tmp.pzVIXgvVhm + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.LseCgoMkYU + cat /tmp/tmp.pzVIXgvVhm + rm /tmp/tmp.LseCgoMkYU /tmp/tmp.pzVIXgvVhm + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/e2e-tests/upgrade-sharded/compare/find-2nd.json /tmp/tmp.SUPwIfNhKD/find-2nd + run_restore backup-minio + local backup_name=backup-minio + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/e2e-tests/upgrade-sharded/conf/restore.yml + /usr/bin/sed -e 's/backupName:/backupName: backup-minio/' + /usr/bin/sed -e 's/name:/name: restore-backup-minio/' + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.ePudzVNYQj ++ mktemp + local LAST_ERR=/tmp/tmp.Vmz8SMe1tJ + 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.ePudzVNYQj perconaservermongodbrestore.psmdb.percona.com/restore-backup-minio created + cat /tmp/tmp.Vmz8SMe1tJ + rm /tmp/tmp.ePudzVNYQj /tmp/tmp.Vmz8SMe1tJ + return 0 + wait_restore backup-minio upgrade-sharded + local backup_name=backup-minio + local cluster_name=upgrade-sharded + local target_state=ready + local wait_cluster_consistency=1 + local wait_time=780 + set +o xtrace waiting psmdb-restore/backup-minio to reach ready state............ + '[' 1 -eq 1 ']' + wait_cluster_consistency upgrade-sharded + local retry=0 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.quv0Q4uoZQ +++ mktemp ++ local LAST_ERR=/tmp/tmp.Myg8RongyM ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.quv0Q4uoZQ ++ cat /tmp/tmp.Myg8RongyM ++ rm /tmp/tmp.quv0Q4uoZQ /tmp/tmp.Myg8RongyM ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 1 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.dYecmxvJ4Y +++ mktemp ++ local LAST_ERR=/tmp/tmp.ssB0btOR4M ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.dYecmxvJ4Y ++ cat /tmp/tmp.ssB0btOR4M ++ rm /tmp/tmp.dYecmxvJ4Y /tmp/tmp.ssB0btOR4M ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 2 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.3WuEY7er31 +++ mktemp ++ local LAST_ERR=/tmp/tmp.EilO2NaJmk ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.3WuEY7er31 ++ cat /tmp/tmp.EilO2NaJmk ++ rm /tmp/tmp.3WuEY7er31 /tmp/tmp.EilO2NaJmk ++ return 0 + [[ initializing == \r\e\a\d\y ]] + let retry+=1 + '[' 3 -ge 32 ']' + echo 'waiting for cluster readyness' waiting for cluster readyness + sleep 20 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.iIX8TAkoZl +++ mktemp ++ local LAST_ERR=/tmp/tmp.dgHuh1kZgQ ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.iIX8TAkoZl ++ cat /tmp/tmp.dgHuh1kZgQ ++ rm /tmp/tmp.iIX8TAkoZl /tmp/tmp.dgHuh1kZgQ ++ return 0 + [[ ready == \r\e\a\d\y ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.BkAq8O9AXF +++ mktemp ++ local LAST_ERR=/tmp/tmp.nOE7jTurgz ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.BkAq8O9AXF ++ cat /tmp/tmp.nOE7jTurgz ++ rm /tmp/tmp.BkAq8O9AXF /tmp/tmp.nOE7jTurgz ++ return 0 + [[ 3 == \3 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.0KnosYX6pL +++ mktemp ++ local LAST_ERR=/tmp/tmp.GjVao9JZIB ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.0KnosYX6pL ++ cat /tmp/tmp.GjVao9JZIB ++ rm /tmp/tmp.0KnosYX6pL /tmp/tmp.GjVao9JZIB ++ return 0 + [[ 3 == \3 ]] + simple_data_check upgrade-sharded 3 1 -mongos + local cluster_name=upgrade-sharded + let last_pod=3-1 + local isSharded=1 + local cluster_pfx=-mongos + '[' 1 -eq 1 ']' + sleep 10 + wait_cluster_consistency upgrade-sharded + local retry=0 ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.EYFxsr4P1t +++ mktemp ++ local LAST_ERR=/tmp/tmp.0MDEIBHC28 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.EYFxsr4P1t ++ cat /tmp/tmp.0MDEIBHC28 ++ rm /tmp/tmp.EYFxsr4P1t /tmp/tmp.0MDEIBHC28 ++ return 0 + [[ ready == \r\e\a\d\y ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Ul44Y33DmL +++ mktemp ++ local LAST_ERR=/tmp/tmp.OK3kOzAKAm ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.rs0.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.Ul44Y33DmL ++ cat /tmp/tmp.OK3kOzAKAm ++ rm /tmp/tmp.Ul44Y33DmL /tmp/tmp.OK3kOzAKAm ++ return 0 + [[ 3 == \3 ]] ++ kubectl_bin get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.DBBpSXXa8K +++ mktemp ++ local LAST_ERR=/tmp/tmp.5WG3RzEjql ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in '$(seq 0 2)' ++ set +e ++ kubectl get psmdb upgrade-sharded -o 'jsonpath={.status.replsets.cfg.ready}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.DBBpSXXa8K ++ cat /tmp/tmp.5WG3RzEjql ++ rm /tmp/tmp.DBBpSXXa8K /tmp/tmp.5WG3RzEjql ++ return 0 + [[ 3 == \3 ]] + compare_mongos_cmd find myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local command=find + local uri=myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local postfix= + local suffix= + local database=myApp + local collection=test + /usr/bin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/' + run_mongos 'use myApp\n db.test.find()' myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 mongodb '' + local 'command=use myApp\n db.test.find()' + local uri=myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631 + local driver=mongodb + local suffix=.svc.cluster.local ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Cjxi05VbuE +++ mktemp + egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' ++ local LAST_ERR=/tmp/tmp.tM8XUY4Ef7 ++ 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.Cjxi05VbuE ++ cat /tmp/tmp.tM8XUY4Ef7 ++ rm /tmp/tmp.Cjxi05VbuE /tmp/tmp.tM8XUY4Ef7 ++ return 0 + local client_container=psmdb-client-7469665986-l6qsl + local mongo_flag= + kubectl_bin exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.MAdwTQbkHx ++ mktemp + local LAST_ERR=/tmp/tmp.nrBVQbNw2N + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in '$(seq 0 2)' + set +e + kubectl exec psmdb-client-7469665986-l6qsl -- bash -c 'printf '\''use myApp\n db.test.find()\n'\'' | mongo mongodb://myApp:myPass@upgrade-sharded-mongos.upgrade-sharded-5631.svc.cluster.local/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.MAdwTQbkHx + cat /tmp/tmp.nrBVQbNw2N + rm /tmp/tmp.MAdwTQbkHx /tmp/tmp.nrBVQbNw2N + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/e2e-tests/upgrade-sharded/compare/find.json /tmp/tmp.SUPwIfNhKD/find + desc cleanup + set +o xtrace ----------------------------------------------------------------------------------- cleanup ----------------------------------------------------------------------------------- + destroy upgrade-sharded-5631 + local namespace=upgrade-sharded-5631 + 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-1561/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.xvWImekIBe ++ mktemp + local LAST_ERR=/tmp/tmp.l4amNIAvIK + 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-1561/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.xvWImekIBe 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.l4amNIAvIK + rm /tmp/tmp.xvWImekIBe /tmp/tmp.l4amNIAvIK + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-1561/deploy/crd.yaml ++ grep -v '\-\-\-' + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + kubectl get perconaservermongodbbackups.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbbackups.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbbackups" + kubectl patch perconaservermongodbbackups.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbbackups" + : + kubectl_bin wait --for=delete crd perconaservermongodbbackups.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.MFd2Flq74U ++ mktemp + local LAST_ERR=/tmp/tmp.Q77KuYJBap + 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.MFd2Flq74U + cat /tmp/tmp.Q77KuYJBap + rm /tmp/tmp.MFd2Flq74U /tmp/tmp.Q77KuYJBap + 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.2zDnz5qFLX ++ mktemp + local LAST_ERR=/tmp/tmp.iHcT2qFtDy + 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.2zDnz5qFLX + cat /tmp/tmp.iHcT2qFtDy + rm /tmp/tmp.2zDnz5qFLX /tmp/tmp.iHcT2qFtDy + return 0 + for crd_name in '$(yq eval '\''.metadata.name'\'' "${src_dir}/deploy/crd.yaml" | grep -v '\''\-\-\-'\'')' + grep -v NAMESPACE + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' + kubectl patch perconaservermongodbs.psmdb.percona.com -n upgrade-sharded-5631 upgrade-sharded --type=merge -p '{"metadata":{"finalizers":[]}}' perconaservermongodb.psmdb.percona.com/upgrade-sharded patched + kubectl_bin wait --for=delete crd perconaservermongodbs.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.8uUm0KwtnV ++ mktemp + local LAST_ERR=/tmp/tmp.yYVt2lPms6 + 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.8uUm0KwtnV customresourcedefinition.apiextensions.k8s.io/perconaservermongodbs.psmdb.percona.com condition met + cat /tmp/tmp.yYVt2lPms6 + rm /tmp/tmp.8uUm0KwtnV /tmp/tmp.yYVt2lPms6 + 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-1561/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.vwR0a8XIhV ++ mktemp + local LAST_ERR=/tmp/tmp.6umWpDsJwc + 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-1561/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.vwR0a8XIhV 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.6umWpDsJwc + rm /tmp/tmp.vwR0a8XIhV /tmp/tmp.6umWpDsJwc + return 0 + kubectl_bin delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml namespace "cert-manager" deleted customresourcedefinition.apiextensions.k8s.io "certificaterequests.cert-manager.io" deleted customresourcedefinition.apiextensions.k8s.io "certificates.cert-manager.io" deleted customresourcedefinition.apiextensions.k8s.io "challenges.acme.cert-manager.io" deleted customresourcedefinition.apiextensions.k8s.io "clusterissuers.cert-manager.io" deleted customresourcedefinition.apiextensions.k8s.io "issuers.cert-manager.io" deleted customresourcedefinition.apiextensions.k8s.io "orders.acme.cert-manager.io" deleted serviceaccount "cert-manager-cainjector" deleted serviceaccount "cert-manager" deleted serviceaccount "cert-manager-webhook" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-cainjector" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-issuers" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-certificates" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-orders" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-challenges" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-cluster-view" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-view" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-edit" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" deleted clusterrole.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-cainjector" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-issuers" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-certificates" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-orders" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-challenges" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" deleted clusterrolebinding.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" deleted role.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" deleted role.rbac.authorization.k8s.io "cert-manager:leaderelection" deleted rolebinding.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" deleted rolebinding.rbac.authorization.k8s.io "cert-manager:leaderelection" deleted mutatingwebhookconfiguration.admissionregistration.k8s.io "cert-manager-webhook" deleted validatingwebhookconfiguration.admissionregistration.k8s.io "cert-manager-webhook" deleted namespace "cert-manager" deleted + : + '[' -n '' ']' + '[' -n psmdb-operator ']' + kubectl_bin delete --grace-period=0 --force=true namespace upgrade-sharded-5631 + rm -rf /tmp/tmp.SUPwIfNhKD + kubectl_bin delete --grace-period=0 --force=true namespace psmdb-operator ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.V23bA3WLrz + desc 'test passed' ++ mktemp + set +o xtrace + local LAST_OUT=/tmp/tmp.7NHvvHaAAd ----------------------------------------------------------------------------------- test passed ----------------------------------------------------------------------------------- ++ mktemp + local LAST_ERR=/tmp/tmp.3hnlA9SKVi + local exit_status=0 + local timeout=4 ++ seq 0 2 + local LAST_ERR=/tmp/tmp.wIBzN0vLge + 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 upgrade-sharded-5631 + for i in '$(seq 0 2)' + set +e + kubectl delete --grace-period=0 --force=true namespace psmdb-operator