Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/logs/custom-users-roles-sharded.log Warning: version difference between client (1.36) and server (1.33) exceeds the supported minor version skew of +/-1 Warning: version difference between client (1.36) and server (1.33) exceeds the supported minor version skew of +/-1 Warning: version difference between client (1.36) and server (1.33) exceeds the supported minor version skew of +/-1 + cluster=some-name + create_infra custom-users-roles-sharded-635 + local ns=custom-users-roles-sharded-635 + [[ 1 == 1 ]] + delete_crd + desc 'get and delete old CRDs and RBAC' + set +o xtrace ----------------------------------------------------------------------------------- get and delete old CRDs and RBAC ----------------------------------------------------------------------------------- + kubectl_bin delete -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.zjsfwiseG8 ++ mktemp + local LAST_ERR=/tmp/tmp.NXO8CHIZn5 + 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-2277/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.zjsfwiseG8 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.NXO8CHIZn5 + rm /tmp/tmp.zjsfwiseG8 /tmp/tmp.NXO8CHIZn5 + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/deploy/crd.yaml ++ grep -v '\-\-\-' grep: warning: stray \ before - grep: warning: stray \ before - + 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.guZO6iEARk ++ mktemp + local LAST_ERR=/tmp/tmp.h17kxvHnA5 + 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.guZO6iEARk + cat /tmp/tmp.h17kxvHnA5 + rm /tmp/tmp.guZO6iEARk /tmp/tmp.h17kxvHnA5 + 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.PiuuJjno2B ++ mktemp + local LAST_ERR=/tmp/tmp.RzTJrbmzTU + 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.PiuuJjno2B + cat /tmp/tmp.RzTJrbmzTU + rm /tmp/tmp.PiuuJjno2B /tmp/tmp.RzTJrbmzTU + return 0 + for crd_name in $(yq eval '.metadata.name' "${src_dir}/deploy/crd.yaml" | grep -v '\-\-\-') + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbs" + kubectl patch perconaservermongodbs.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbs" + : + kubectl_bin wait --for=delete crd perconaservermongodbs.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.ccIUG7CZCG ++ mktemp + local LAST_ERR=/tmp/tmp.UoYxSe5V2S + 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.ccIUG7CZCG + cat /tmp/tmp.UoYxSe5V2S + rm /tmp/tmp.ccIUG7CZCG /tmp/tmp.UoYxSe5V2S + 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-2277/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.CrhONPKuk1 ++ mktemp + local LAST_ERR=/tmp/tmp.cvQUDx9BZ5 + 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-2277/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.CrhONPKuk1 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.cvQUDx9BZ5 + rm /tmp/tmp.CrhONPKuk1 /tmp/tmp.cvQUDx9BZ5 + return 0 + check_crd_for_deletion PR-2277-1aff7fd55 + local git_tag=PR-2277-1aff7fd55 ++ curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/PR-2277-1aff7fd55/deploy/crd.yaml ++ yq eval .metadata.name ++ /usr/sbin/sed s/---//g ++ /usr/sbin/sed ':a;N;$!ba;s/\n/ /g' + for crd_name in $(curl -s https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/${git_tag}/deploy/crd.yaml | yq eval '.metadata.name' | $sed 's/---//g' | $sed ':a;N;$!ba;s/\n/ /g') ++ kubectl_bin get crd/null -o 'jsonpath={.status.conditions[-1].type}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.B7eXsv4Hc3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.CaMubKQymU ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get crd/null -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=1 ++ set -e ++ '[' 1 '!=' 0 -a -n 1 ']' ++ cat /tmp/tmp.B7eXsv4Hc3 ++ cat /tmp/tmp.CaMubKQymU Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 0 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get crd/null -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=1 ++ set -e ++ '[' 1 '!=' 0 -a -n 1 ']' ++ cat /tmp/tmp.B7eXsv4Hc3 ++ cat /tmp/tmp.CaMubKQymU Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 4 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get crd/null -o 'jsonpath={.status.conditions[-1].type}' ++ exit_status=1 ++ set -e ++ '[' 1 '!=' 0 -a -n 1 ']' ++ cat /tmp/tmp.B7eXsv4Hc3 ++ cat /tmp/tmp.CaMubKQymU Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ sleep 8 ++ cat /tmp/tmp.B7eXsv4Hc3 ++ cat /tmp/tmp.CaMubKQymU Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "null" not found ++ rm /tmp/tmp.B7eXsv4Hc3 /tmp/tmp.CaMubKQymU ++ return 1 + [[ '' == Terminating ]] + '[' -n psmdb-operator ']' + create_namespace psmdb-operator + local namespace=psmdb-operator + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + kubectl_bin get ns + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + awk '{print$1}' ++ mktemp + '[' -n '' ']' + desc 'cleaned up old namespaces psmdb-operator' + xargs kubectl delete ns + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces psmdb-operator ----------------------------------------------------------------------------------- + kubectl_bin delete namespace psmdb-operator --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.nXJX91drEo + local LAST_OUT=/tmp/tmp.ECuaDGPKvW ++ mktemp ++ mktemp + local LAST_ERR=/tmp/tmp.kd8kje5vOR + local exit_status=0 + local timeout=4 ++ seq 0 2 + local LAST_ERR=/tmp/tmp.yl3AKMdajP + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get ns + for i in $(seq 0 2) + set +e + kubectl delete namespace psmdb-operator --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ECuaDGPKvW + cat /tmp/tmp.yl3AKMdajP + rm /tmp/tmp.ECuaDGPKvW /tmp/tmp.yl3AKMdajP + return 0 namespace "custom-users-roles-sharded-6602" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.nXJX91drEo namespace "psmdb-operator" deleted + cat /tmp/tmp.kd8kje5vOR + rm /tmp/tmp.nXJX91drEo /tmp/tmp.kd8kje5vOR + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.Dv7VZZuCKi ++ mktemp + local LAST_ERR=/tmp/tmp.UcES5u9KZu + 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.Dv7VZZuCKi + cat /tmp/tmp.UcES5u9KZu + rm /tmp/tmp.Dv7VZZuCKi /tmp/tmp.UcES5u9KZu + 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.CGjIMuThRZ ++ mktemp + local LAST_ERR=/tmp/tmp.uIpGJzwsEJ + 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.CGjIMuThRZ namespace/psmdb-operator created + cat /tmp/tmp.uIpGJzwsEJ + rm /tmp/tmp.CGjIMuThRZ /tmp/tmp.uIpGJzwsEJ + return 0 + set_kube_ctx psmdb-operator + local namespace=psmdb-operator ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.oDNg1FOu8A +++ mktemp ++ local LAST_ERR=/tmp/tmp.YdzbT7SQdw ++ 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.oDNg1FOu8A ++ cat /tmp/tmp.YdzbT7SQdw ++ rm /tmp/tmp.oDNg1FOu8A /tmp/tmp.YdzbT7SQdw ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2277-1aff7fd55-12-cluster7 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.e2qDBOzuW7 ++ mktemp + local LAST_ERR=/tmp/tmp.GLUmV76niG + 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-2277-1aff7fd55-12-cluster7 --namespace=psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.e2qDBOzuW7 Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2277-1aff7fd55-12-cluster7" modified. + cat /tmp/tmp.GLUmV76niG + rm /tmp/tmp.e2qDBOzuW7 /tmp/tmp.GLUmV76niG + return 0 + deploy_operator + desc 'start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2277-1aff7fd55' + set +o xtrace ----------------------------------------------------------------------------------- start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2277-1aff7fd55 ----------------------------------------------------------------------------------- + local cr_file + '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.jCP1TRpO3J ++ mktemp + local LAST_ERR=/tmp/tmp.WHdEcQK5jo + 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-2277/deploy/crd.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.jCP1TRpO3J 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.WHdEcQK5jo + rm /tmp/tmp.jCP1TRpO3J /tmp/tmp.WHdEcQK5jo + return 0 + '[' -n psmdb-operator ']' + apply_rbac cw-rbac + local operator_namespace=psmdb-operator + local rbac=cw-rbac + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/deploy/cw-rbac.yaml + sed -e 's^namespace: .*^namespace: psmdb-operator^' + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.0gepqsNvPC ++ mktemp + local LAST_ERR=/tmp/tmp.bpa8huSwM2 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl apply -n psmdb-operator -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.0gepqsNvPC clusterrole.rbac.authorization.k8s.io/percona-server-mongodb-operator created serviceaccount/percona-server-mongodb-operator created clusterrolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator created + cat /tmp/tmp.bpa8huSwM2 + rm /tmp/tmp.0gepqsNvPC /tmp/tmp.bpa8huSwM2 + return 0 + yq eval $'\n\t\t\t(.spec.template.spec.containers[].image = "docker.io/perconalab/percona-server-mongodb-operator:PR-2277-1aff7fd55") |\n\t\t\t((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") |\n\t\t\t((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/deploy/cw-operator.yaml + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.VWOnKIXBCo ++ mktemp + local LAST_ERR=/tmp/tmp.fNUYBEdKT3 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl apply -n psmdb-operator -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.VWOnKIXBCo deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.fNUYBEdKT3 + rm /tmp/tmp.VWOnKIXBCo /tmp/tmp.fNUYBEdKT3 + return 0 + sleep 20 ++ 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.G4vrXVjzHW +++ mktemp ++ local LAST_ERR=/tmp/tmp.ofnZ67GhUb ++ 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.G4vrXVjzHW ++ cat /tmp/tmp.ofnZ67GhUb ++ rm /tmp/tmp.G4vrXVjzHW /tmp/tmp.ofnZ67GhUb ++ return 0 + wait_operator_pod percona-server-mongodb-operator-864569776d-scfn5 + local pod=percona-server-mongodb-operator-864569776d-scfn5 + set +o xtrace waiting for pod/percona-server-mongodb-operator-864569776d-scfn5 to be ready.OK + echo 'Print operator info from log' Print operator info from log + grep 'Manager starting up' ++ get_operator_pod ++ kubectl_bin get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator +++ mktemp ++ local LAST_OUT=/tmp/tmp.Lv2VcvGY1E +++ mktemp ++ local LAST_ERR=/tmp/tmp.IDty1Umcjh ++ 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.Lv2VcvGY1E ++ cat /tmp/tmp.IDty1Umcjh ++ rm /tmp/tmp.Lv2VcvGY1E /tmp/tmp.IDty1Umcjh ++ return 0 + kubectl_bin logs -n psmdb-operator percona-server-mongodb-operator-864569776d-scfn5 ++ mktemp + local LAST_OUT=/tmp/tmp.q9nvpXoIhF ++ mktemp + local LAST_ERR=/tmp/tmp.ejMllpR5Cl + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl logs -n psmdb-operator percona-server-mongodb-operator-864569776d-scfn5 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.q9nvpXoIhF + cat /tmp/tmp.ejMllpR5Cl + rm /tmp/tmp.q9nvpXoIhF /tmp/tmp.ejMllpR5Cl + return 0 2026-06-05T09:59:34.271Z INFO setup Manager starting up {"gitCommit": "1aff7fd5595155253be95693b98777d74dbed88e", "gitBranch": "PR-2277-1aff7fd55", "buildTime": "", "goVersion": "go1.26.4", "os": "linux", "arch": "amd64"} + create_namespace custom-users-roles-sharded-635 + local namespace=custom-users-roles-sharded-635 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ grep chaos-mesh ++ awk '{print $1}' ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + kubectl_bin get ns + '[' -n '' ']' + desc 'cleaned up old namespaces custom-users-roles-sharded-635' + set +o xtrace + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' ----------------------------------------------------------------------------------- cleaned up old namespaces custom-users-roles-sharded-635 ----------------------------------------------------------------------------------- + awk '{print$1}' + kubectl_bin delete namespace custom-users-roles-sharded-635 --ignore-not-found + xargs kubectl delete ns ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.xFCrkukI9l ++ mktemp + local LAST_OUT=/tmp/tmp.sHR5gT8ckq ++ mktemp + local LAST_ERR=/tmp/tmp.OzLepcPoWW + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get ns + local LAST_ERR=/tmp/tmp.HrfnM2V6tU + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl delete namespace custom-users-roles-sharded-635 --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.xFCrkukI9l + cat /tmp/tmp.OzLepcPoWW + rm /tmp/tmp.xFCrkukI9l /tmp/tmp.OzLepcPoWW + 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.sHR5gT8ckq + cat /tmp/tmp.HrfnM2V6tU + rm /tmp/tmp.sHR5gT8ckq /tmp/tmp.HrfnM2V6tU + return 0 + kubectl_bin wait --for=delete namespace custom-users-roles-sharded-635 ++ mktemp + local LAST_OUT=/tmp/tmp.PCClL1OcYf ++ mktemp + local LAST_ERR=/tmp/tmp.xXT0u9yPbs + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl wait --for=delete namespace custom-users-roles-sharded-635 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.PCClL1OcYf + cat /tmp/tmp.xXT0u9yPbs + rm /tmp/tmp.PCClL1OcYf /tmp/tmp.xXT0u9yPbs + return 0 + desc 'create namespace custom-users-roles-sharded-635' + set +o xtrace ----------------------------------------------------------------------------------- create namespace custom-users-roles-sharded-635 ----------------------------------------------------------------------------------- + kubectl_bin create namespace custom-users-roles-sharded-635 ++ mktemp + local LAST_OUT=/tmp/tmp.pid4RVVZkV ++ mktemp + local LAST_ERR=/tmp/tmp.5LWE2SkmPy + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl create namespace custom-users-roles-sharded-635 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.pid4RVVZkV namespace/custom-users-roles-sharded-635 created + cat /tmp/tmp.5LWE2SkmPy + rm /tmp/tmp.pid4RVVZkV /tmp/tmp.5LWE2SkmPy + return 0 + set_kube_ctx custom-users-roles-sharded-635 + local namespace=custom-users-roles-sharded-635 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.egi0utujp2 +++ mktemp ++ local LAST_ERR=/tmp/tmp.Cr7zmePBKz ++ 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.egi0utujp2 ++ cat /tmp/tmp.Cr7zmePBKz ++ rm /tmp/tmp.egi0utujp2 /tmp/tmp.Cr7zmePBKz ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2277-1aff7fd55-12-cluster7 --namespace=custom-users-roles-sharded-635 ++ mktemp + local LAST_OUT=/tmp/tmp.QasLkXt78a ++ mktemp + local LAST_ERR=/tmp/tmp.Q5B380rizG + 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-2277-1aff7fd55-12-cluster7 --namespace=custom-users-roles-sharded-635 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.QasLkXt78a Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2277-1aff7fd55-12-cluster7" modified. + cat /tmp/tmp.Q5B380rizG + rm /tmp/tmp.QasLkXt78a /tmp/tmp.Q5B380rizG + return 0 + mongosUri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + desc 'create secrets and start client' + set +o xtrace ----------------------------------------------------------------------------------- create secrets and start client ----------------------------------------------------------------------------------- + kubectl_bin apply -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/conf/client.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/conf/app-user-secrets.yml ++ mktemp + local LAST_OUT=/tmp/tmp.QQ5p0ARMa8 ++ mktemp + local LAST_ERR=/tmp/tmp.CgqpNVRWjc + 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-2277/e2e-tests/conf/client.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/conf/secrets.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/conf/app-user-secrets.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.QQ5p0ARMa8 deployment.apps/psmdb-client created secret/some-users created secret/user-one created secret/user-two created + cat /tmp/tmp.CgqpNVRWjc + rm /tmp/tmp.QQ5p0ARMa8 /tmp/tmp.CgqpNVRWjc + return 0 + 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-2277/e2e-tests/conf/minio-secret.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/conf/cloud-secret.yml ++ mktemp + local LAST_OUT=/tmp/tmp.HkpuwiSfro ++ mktemp + local LAST_ERR=/tmp/tmp.u9usFrqjmh + 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-2277/e2e-tests/conf/minio-secret.yml -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/conf/cloud-secret.yml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.HkpuwiSfro secret/minio-secret created secret/aws-s3-secret created secret/alibaba-cloud-secret created secret/gcp-cs-secret created secret/azure-secret created secret/gcp-cs-sa-key-secret created + cat /tmp/tmp.u9usFrqjmh + rm /tmp/tmp.HkpuwiSfro /tmp/tmp.u9usFrqjmh + return 0 + version_gt 1.19 ++ echo '1.33 >= 1.19' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + '[' 0 -ne 1 ']' + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/conf/container-rc.yaml + /usr/sbin/sed s/docker/runc/g + kubectl_bin apply -f - ++ mktemp + local LAST_OUT=/tmp/tmp.CNdGGapfM7 ++ mktemp + local LAST_ERR=/tmp/tmp.2yQLmhngmV + 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.CNdGGapfM7 runtimeclass.node.k8s.io/container-rc unchanged + cat /tmp/tmp.2yQLmhngmV + rm /tmp/tmp.CNdGGapfM7 /tmp/tmp.2yQLmhngmV + return 0 + desc 'create first PSMDB cluster' + set +o xtrace ----------------------------------------------------------------------------------- create first PSMDB cluster ----------------------------------------------------------------------------------- + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/conf/some-name-rs0.yml + '[' -z '' ']' + kubectl_bin apply -f - + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/conf/some-name-rs0.yml ++ mktemp + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/conf/some-name-rs0.yml + yq eval '(.spec | select(.image == null)).image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0"' + yq eval '(.spec | select(has("pmm"))).pmm.image = "docker.io/percona/pmm-client:2.44.1-1"' + yq eval '(.spec | select(has("backup"))).backup.image = "docker.io/perconalab/percona-server-mongodb-operator:main-backup"' + yq eval '(.spec | select(has("initImage"))).initImage = "docker.io/perconalab/percona-server-mongodb-operator:PR-2277-1aff7fd55"' + /usr/sbin/sed -e s/NAME_SPACE/custom-users-roles-sharded-635/g + local LAST_OUT=/tmp/tmp.TqJDLRJ0kC ++ mktemp + yq eval '.spec.upgradeOptions.apply="Never"' + local LAST_ERR=/tmp/tmp.miKxImExDp + 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.TqJDLRJ0kC perconaservermongodb.psmdb.percona.com/some-name created + cat /tmp/tmp.miKxImExDp + rm /tmp/tmp.TqJDLRJ0kC /tmp/tmp.miKxImExDp + return 0 + desc 'check if all 3 Pods started' + set +o xtrace ----------------------------------------------------------------------------------- check if all 3 Pods started ----------------------------------------------------------------------------------- + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready............OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready.............OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.vjVNkMg2vL +++ mktemp ++ local LAST_ERR=/tmp/tmp.xHyYcfncEd ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.vjVNkMg2vL ++ cat /tmp/tmp.xHyYcfncEd ++ rm /tmp/tmp.vjVNkMg2vL /tmp/tmp.xHyYcfncEd ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready...........OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.khHGTJpkeh +++ mktemp ++ local LAST_ERR=/tmp/tmp.7lcfeGhLDC ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.khHGTJpkeh ++ cat /tmp/tmp.7lcfeGhLDC ++ rm /tmp/tmp.khHGTJpkeh /tmp/tmp.7lcfeGhLDC ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.T58KPfJZ3z +++ mktemp ++ local LAST_ERR=/tmp/tmp.ZrKldIgEDA ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.T58KPfJZ3z ++ cat /tmp/tmp.ZrKldIgEDA ++ rm /tmp/tmp.T58KPfJZ3z /tmp/tmp.ZrKldIgEDA ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness.......................... + wait_for_running some-name-cfg 3 false + local name=some-name-cfg + let last_pod=2 + local check_cluster_readyness=false + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=cfg + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-cfg-0 + local pod=some-name-cfg-0 + set +o xtrace waiting for pod/some-name-cfg-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-cfg-1 + local pod=some-name-cfg-1 + set +o xtrace waiting for pod/some-name-cfg-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.zWyrzIdp1a +++ mktemp ++ local LAST_ERR=/tmp/tmp.foFPx7ETvM ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.zWyrzIdp1a ++ cat /tmp/tmp.foFPx7ETvM ++ rm /tmp/tmp.zWyrzIdp1a /tmp/tmp.foFPx7ETvM ++ return 0 + [[ '' == true ]] + wait_pod some-name-cfg-2 + local pod=some-name-cfg-2 + set +o xtrace waiting for pod/some-name-cfg-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.frv896kwwy +++ mktemp ++ local LAST_ERR=/tmp/tmp.MhYZK60vWa ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.frv896kwwy ++ cat /tmp/tmp.MhYZK60vWa ++ rm /tmp/tmp.frv896kwwy /tmp/tmp.MhYZK60vWa ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.OJzwhCenSN +++ mktemp ++ local LAST_ERR=/tmp/tmp.WERz9vdsJX ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="cfg")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.OJzwhCenSN ++ cat /tmp/tmp.WERz9vdsJX ++ rm /tmp/tmp.OJzwhCenSN /tmp/tmp.WERz9vdsJX ++ return 0 + [[ '' == true ]] + sleep 10 + [[ false == true ]] + wait_for_running some-name-mongos 3 + local name=some-name-mongos + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=mongos + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-mongos-0 + local pod=some-name-mongos-0 + set +o xtrace waiting for pod/some-name-mongos-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-mongos-1 + local pod=some-name-mongos-1 + set +o xtrace waiting for pod/some-name-mongos-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.KjzEaw2Wjr +++ mktemp ++ local LAST_ERR=/tmp/tmp.wLujQzQkVZ ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.KjzEaw2Wjr ++ cat /tmp/tmp.wLujQzQkVZ ++ rm /tmp/tmp.KjzEaw2Wjr /tmp/tmp.wLujQzQkVZ ++ return 0 + [[ '' == true ]] + wait_pod some-name-mongos-2 + local pod=some-name-mongos-2 + set +o xtrace waiting for pod/some-name-mongos-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Tj9AS7oY2M +++ mktemp ++ local LAST_ERR=/tmp/tmp.v62K74aWgb ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.Tj9AS7oY2M ++ cat /tmp/tmp.v62K74aWgb ++ rm /tmp/tmp.Tj9AS7oY2M /tmp/tmp.v62K74aWgb ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.SSq3SWBHlo +++ mktemp ++ local LAST_ERR=/tmp/tmp.d3vhvXS39r ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="mongos")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.SSq3SWBHlo ++ cat /tmp/tmp.d3vhvXS39r ++ rm /tmp/tmp.SSq3SWBHlo /tmp/tmp.d3vhvXS39r ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness + wait_cluster_consistency some-name + local cluster_name=some-name + local wait_time=32 + retry=0 + sleep 7 + echo -n 'waiting for cluster readyness' waiting for cluster readyness++ kubectl_bin get psmdb some-name -o 'jsonpath={.status.state}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.hB4buZeDVq +++ mktemp ++ local LAST_ERR=/tmp/tmp.plreGcdiea ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.status.state}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.hB4buZeDVq ++ cat /tmp/tmp.plreGcdiea ++ rm /tmp/tmp.hB4buZeDVq /tmp/tmp.plreGcdiea ++ return 0 + [[ ready == ready ]] + echo .OK .OK + desc 'check if service and statefulset created with expected config' + set +o xtrace ----------------------------------------------------------------------------------- check if service and statefulset created with expected config ----------------------------------------------------------------------------------- + compare_kubectl statefulset/some-name-rs0 + local resource=statefulset/some-name-rs0 + local postfix= + local skip_generation_check= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-rs0.yml + local new_result=/tmp/tmp.GrKY0GUnUh/statefulset_some-name-rs0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-rs0-oc.yml ']' + kubectl_bin get -o yaml statefulset/some-name-rs0 + yq eval $'\n\t\t\tdel(.metadata.ownerReferences[].apiVersion) |\n\t\t\tdel(.metadata.managedFields) |\n\t\t\tdel(.. | select(has("creationTimestamp")).creationTimestamp) |\n\t\t\tdel(.. | select(has("namespace")).namespace) |\n\t\t\tdel(.. | select(has("uid")).uid) |\n\t\t\tdel(.metadata.resourceVersion) |\n\t\t\tdel(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) |\n\t\t\tdel(.metadata.selfLink) |\n\t\t\tdel(.metadata.annotations."cloud.google.com/neg") |\n\t\t\tdel(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") |\n\t\t\tdel(.. | select(has("image")).image) |\n\t\t\tdel(.. | select(has("clusterIP")).clusterIP) |\n\t\t\tdel(.. | select(has("clusterIPs")).clusterIPs) |\n\t\t\tdel(.. | select(has("dataSource")).dataSource) |\n\t\t\tdel(.. | select(has("procMount")).procMount) |\n\t\t\tdel(.. | select(has("storageClassName")).storageClassName) |\n\t\t\tdel(.. | select(has("finalizers")).finalizers) |\n\t\t\tdel(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") |\n\t\t\tdel(.. | select(has("volumeName")).volumeName) |\n\t\t\tdel(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.spec.volumeMode) |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") |\n\t\t\tdel(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") |\n\t\t\tdel(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") |\n\t\t\tdel(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) |\n\t\t\tdel(.. | select(has("healthCheckNodePort")).healthCheckNodePort) |\n\t\t\tdel(.. | select(has("nodePort")).nodePort) |\n\t\t\tdel(.status) |\n\t\t\t(.. | select(tag == "!!str")) |= sub("custom-users-roles-sharded-635", "NAME_SPACE") |\n\t\t\tdel(.spec.volumeClaimTemplates[].apiVersion) |\n\t\t\tdel(.spec.volumeClaimTemplates[].kind) |\n\t\t\tdel(.spec.ipFamilies) |\n\t\t\tdel(.spec.ipFamilyPolicy) |\n\t\t\t(.. | select(. == "extensions/v1beta1")) = "apps/v1" |\n\t\t\t(.. | select(. == "batch/v1beta1")) = "batch/v1" ' - ++ mktemp + local LAST_OUT=/tmp/tmp.WGL19gvQUp ++ mktemp + local LAST_ERR=/tmp/tmp.btRBgjCq8m + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get -o yaml statefulset/some-name-rs0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.WGL19gvQUp + cat /tmp/tmp.btRBgjCq8m + rm /tmp/tmp.WGL19gvQUp /tmp/tmp.btRBgjCq8m + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.GrKY0GUnUh/statefulset_some-name-rs0.yml + version_gt 1.22 ++ echo '1.33 >= 1.22' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.GrKY0GUnUh/statefulset_some-name-rs0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.GrKY0GUnUh/statefulset_some-name-rs0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-rs0.yml == */cronjob* ]] + '[' -n '' ']' + [[ 0 -eq 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-rs0.yml /tmp/tmp.GrKY0GUnUh/statefulset_some-name-rs0.yml + log 'compare_kubectl: statefulset/some-name-rs0 OK' + set +o xtrace [2026-06-05T10:03:29+0000] compare_kubectl: statefulset/some-name-rs0 OK + compare_kubectl statefulset/some-name-cfg + local resource=statefulset/some-name-cfg + local postfix= + local skip_generation_check= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-cfg.yml + local new_result=/tmp/tmp.GrKY0GUnUh/statefulset_some-name-cfg.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-cfg-oc.yml ']' + kubectl_bin get -o yaml statefulset/some-name-cfg + yq eval $'\n\t\t\tdel(.metadata.ownerReferences[].apiVersion) |\n\t\t\tdel(.metadata.managedFields) |\n\t\t\tdel(.. | select(has("creationTimestamp")).creationTimestamp) |\n\t\t\tdel(.. | select(has("namespace")).namespace) |\n\t\t\tdel(.. | select(has("uid")).uid) |\n\t\t\tdel(.metadata.resourceVersion) |\n\t\t\tdel(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) |\n\t\t\tdel(.metadata.selfLink) |\n\t\t\tdel(.metadata.annotations."cloud.google.com/neg") |\n\t\t\tdel(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") |\n\t\t\tdel(.. | select(has("image")).image) |\n\t\t\tdel(.. | select(has("clusterIP")).clusterIP) |\n\t\t\tdel(.. | select(has("clusterIPs")).clusterIPs) |\n\t\t\tdel(.. | select(has("dataSource")).dataSource) |\n\t\t\tdel(.. | select(has("procMount")).procMount) |\n\t\t\tdel(.. | select(has("storageClassName")).storageClassName) |\n\t\t\tdel(.. | select(has("finalizers")).finalizers) |\n\t\t\tdel(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") |\n\t\t\tdel(.. | select(has("volumeName")).volumeName) |\n\t\t\tdel(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.spec.volumeMode) |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") |\n\t\t\tdel(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") |\n\t\t\tdel(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") |\n\t\t\tdel(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) |\n\t\t\tdel(.. | select(has("healthCheckNodePort")).healthCheckNodePort) |\n\t\t\tdel(.. | select(has("nodePort")).nodePort) |\n\t\t\tdel(.status) |\n\t\t\t(.. | select(tag == "!!str")) |= sub("custom-users-roles-sharded-635", "NAME_SPACE") |\n\t\t\tdel(.spec.volumeClaimTemplates[].apiVersion) |\n\t\t\tdel(.spec.volumeClaimTemplates[].kind) |\n\t\t\tdel(.spec.ipFamilies) |\n\t\t\tdel(.spec.ipFamilyPolicy) |\n\t\t\t(.. | select(. == "extensions/v1beta1")) = "apps/v1" |\n\t\t\t(.. | select(. == "batch/v1beta1")) = "batch/v1" ' - ++ mktemp + local LAST_OUT=/tmp/tmp.aKGMwOiWA8 ++ mktemp + local LAST_ERR=/tmp/tmp.cjTuoWVMXA + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get -o yaml statefulset/some-name-cfg + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.aKGMwOiWA8 + cat /tmp/tmp.cjTuoWVMXA + rm /tmp/tmp.aKGMwOiWA8 /tmp/tmp.cjTuoWVMXA + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.GrKY0GUnUh/statefulset_some-name-cfg.yml + version_gt 1.22 ++ echo '1.33 >= 1.22' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.GrKY0GUnUh/statefulset_some-name-cfg.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.GrKY0GUnUh/statefulset_some-name-cfg.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-cfg.yml == */cronjob* ]] + '[' -n '' ']' + [[ 0 -eq 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-cfg.yml /tmp/tmp.GrKY0GUnUh/statefulset_some-name-cfg.yml + log 'compare_kubectl: statefulset/some-name-cfg OK' + set +o xtrace [2026-06-05T10:03:30+0000] compare_kubectl: statefulset/some-name-cfg OK + compare_kubectl statefulset/some-name-mongos '' + local resource=statefulset/some-name-mongos + local postfix= + local skip_generation_check= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-mongos.yml + local new_result=/tmp/tmp.GrKY0GUnUh/statefulset_some-name-mongos.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-mongos-oc.yml ']' + kubectl_bin get -o yaml statefulset/some-name-mongos + yq eval $'\n\t\t\tdel(.metadata.ownerReferences[].apiVersion) |\n\t\t\tdel(.metadata.managedFields) |\n\t\t\tdel(.. | select(has("creationTimestamp")).creationTimestamp) |\n\t\t\tdel(.. | select(has("namespace")).namespace) |\n\t\t\tdel(.. | select(has("uid")).uid) |\n\t\t\tdel(.metadata.resourceVersion) |\n\t\t\tdel(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) |\n\t\t\tdel(.metadata.selfLink) |\n\t\t\tdel(.metadata.annotations."cloud.google.com/neg") |\n\t\t\tdel(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") |\n\t\t\tdel(.. | select(has("image")).image) |\n\t\t\tdel(.. | select(has("clusterIP")).clusterIP) |\n\t\t\tdel(.. | select(has("clusterIPs")).clusterIPs) |\n\t\t\tdel(.. | select(has("dataSource")).dataSource) |\n\t\t\tdel(.. | select(has("procMount")).procMount) |\n\t\t\tdel(.. | select(has("storageClassName")).storageClassName) |\n\t\t\tdel(.. | select(has("finalizers")).finalizers) |\n\t\t\tdel(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") |\n\t\t\tdel(.. | select(has("volumeName")).volumeName) |\n\t\t\tdel(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.spec.volumeMode) |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") |\n\t\t\tdel(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") |\n\t\t\tdel(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") |\n\t\t\tdel(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) |\n\t\t\tdel(.. | select(has("healthCheckNodePort")).healthCheckNodePort) |\n\t\t\tdel(.. | select(has("nodePort")).nodePort) |\n\t\t\tdel(.status) |\n\t\t\t(.. | select(tag == "!!str")) |= sub("custom-users-roles-sharded-635", "NAME_SPACE") |\n\t\t\tdel(.spec.volumeClaimTemplates[].apiVersion) |\n\t\t\tdel(.spec.volumeClaimTemplates[].kind) |\n\t\t\tdel(.spec.ipFamilies) |\n\t\t\tdel(.spec.ipFamilyPolicy) |\n\t\t\t(.. | select(. == "extensions/v1beta1")) = "apps/v1" |\n\t\t\t(.. | select(. == "batch/v1beta1")) = "batch/v1" ' - ++ mktemp + local LAST_OUT=/tmp/tmp.Wq3bXu013q ++ mktemp + local LAST_ERR=/tmp/tmp.FUYd5sd7Wq + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get -o yaml statefulset/some-name-mongos + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Wq3bXu013q + cat /tmp/tmp.FUYd5sd7Wq + rm /tmp/tmp.Wq3bXu013q /tmp/tmp.FUYd5sd7Wq + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.GrKY0GUnUh/statefulset_some-name-mongos.yml + version_gt 1.22 ++ echo '1.33 >= 1.22' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.GrKY0GUnUh/statefulset_some-name-mongos.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.GrKY0GUnUh/statefulset_some-name-mongos.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-mongos.yml == */cronjob* ]] + '[' -n '' ']' + [[ 0 -eq 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/statefulset_some-name-mongos.yml /tmp/tmp.GrKY0GUnUh/statefulset_some-name-mongos.yml + log 'compare_kubectl: statefulset/some-name-mongos OK' + set +o xtrace [2026-06-05T10:03:31+0000] compare_kubectl: statefulset/some-name-mongos OK + desc 'check user created on cluster creation' + set +o xtrace ----------------------------------------------------------------------------------- check user created on cluster creation ----------------------------------------------------------------------------------- + userOne=user-one ++ getSecretData user-one userOnePassKey ++ local secretName=user-one ++ local dataKey=userOnePassKey +++ kubectl get secrets/user-one '--template={{.data.userOnePassKey}}' +++ base64 -d ++ local data=clusterMonitor ++ echo clusterMonitor + userOnePass=clusterMonitor ++ get_user_cmd '"user-one"' ++ local 'user="user-one"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-one");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-one");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare admin $'(function() {\n\tvar user = db.getUser("user-one");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-one + local database=admin + local $'command=(function() {\n\tvar user = db.getUser("user-one");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-one + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar user = db.getUser("user-one");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use admin\\n (function() {\n\tvar user = db.getUser("user-one");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + grep -E -v 'I NETWORK|W NETWORK|F 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 driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.zY1xh0uCrO +++ mktemp ++ local LAST_ERR=/tmp/tmp.TEBrCh0xiT ++ 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.zY1xh0uCrO ++ cat /tmp/tmp.TEBrCh0xiT ++ rm /tmp/tmp.zY1xh0uCrO /tmp/tmp.TEBrCh0xiT ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-one");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.ZVq1wQPkCO ++ mktemp + local LAST_ERR=/tmp/tmp.buqH3Nbx55 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-one");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ZVq1wQPkCO + cat /tmp/tmp.buqH3Nbx55 + rm /tmp/tmp.ZVq1wQPkCO /tmp/tmp.buqH3Nbx55 + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-one.json /tmp/tmp.GrKY0GUnUh/user-one + check_auth user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 + local uri=user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 ++ run_mongos 'db.runCommand({ ping: 1 }).ok' user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 '' '' --quiet ++ local 'command=db.runCommand({ ping: 1 }).ok' ++ local uri=user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local mongo_flag=--quiet ++ local port=27017 ++ local mongo_bin=mongo ++ grep -E -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:' +++ echo .svc.cluster.local +++ awk -F: '{print $2}' ++ suffix_port= ++ [[ -z '' ]] ++ suffix=.svc.cluster.local:27017 +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.K4TLaYX67A ++++ mktemp +++ local LAST_ERR=/tmp/tmp.dBuOuIsWWc +++ 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.K4TLaYX67A +++ cat /tmp/tmp.dBuOuIsWWc +++ rm /tmp/tmp.K4TLaYX67A /tmp/tmp.dBuOuIsWWc +++ return 0 ++ local client_container=psmdb-client-bb8b97679-b5gjd ++ kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Rr2SJdT7s2 +++ mktemp ++ local LAST_ERR=/tmp/tmp.7ZakxkdjJ1 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.Rr2SJdT7s2 ++ cat /tmp/tmp.7ZakxkdjJ1 ++ rm /tmp/tmp.Rr2SJdT7s2 /tmp/tmp.7ZakxkdjJ1 ++ return 0 + ping=1 + desc 'ping return' + set +o xtrace ----------------------------------------------------------------------------------- ping return ----------------------------------------------------------------------------------- + '[' 1 '!=' 1 ']' + generatedUserSecret=some-name-custom-user-secret ++ base64 -d ++ kubectl_bin get secret some-name-custom-user-secret -o 'jsonpath={.data.user-gen}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.f4mhT4TjbP +++ mktemp ++ local LAST_ERR=/tmp/tmp.ZmTPtEwbkA ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get secret some-name-custom-user-secret -o 'jsonpath={.data.user-gen}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.f4mhT4TjbP ++ cat /tmp/tmp.ZmTPtEwbkA ++ rm /tmp/tmp.f4mhT4TjbP /tmp/tmp.ZmTPtEwbkA ++ return 0 + generatedPass=Ic2lOFSlbSf9nKjL ++ get_user_cmd '"user-gen"' ++ local 'user="user-gen"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-gen");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-gen");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare admin $'(function() {\n\tvar user = db.getUser("user-gen");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-gen + local database=admin + local $'command=(function() {\n\tvar user = db.getUser("user-gen");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-gen + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar user = db.getUser("user-gen");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use admin\\n (function() {\n\tvar user = db.getUser("user-gen");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + grep -E -v 'I NETWORK|W NETWORK|F 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:' ++ echo .svc.cluster.local + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' ++ awk -F: '{print $2}' + sed '/"userId"/d' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.VgVxxhZQQ4 +++ mktemp ++ local LAST_ERR=/tmp/tmp.7dgya04NNI ++ 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.VgVxxhZQQ4 ++ cat /tmp/tmp.7dgya04NNI ++ rm /tmp/tmp.VgVxxhZQQ4 /tmp/tmp.7dgya04NNI ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-gen");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.FjdCCDkGNW ++ mktemp + local LAST_ERR=/tmp/tmp.F8UuYrQHoU + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-gen");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.FjdCCDkGNW + cat /tmp/tmp.F8UuYrQHoU + rm /tmp/tmp.FjdCCDkGNW /tmp/tmp.F8UuYrQHoU + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-gen.json /tmp/tmp.GrKY0GUnUh/user-gen + check_auth user-gen:Ic2lOFSlbSf9nKjL@some-name-mongos.custom-users-roles-sharded-635 + local uri=user-gen:Ic2lOFSlbSf9nKjL@some-name-mongos.custom-users-roles-sharded-635 ++ run_mongos 'db.runCommand({ ping: 1 }).ok' user-gen:Ic2lOFSlbSf9nKjL@some-name-mongos.custom-users-roles-sharded-635 '' '' --quiet ++ local 'command=db.runCommand({ ping: 1 }).ok' ++ local uri=user-gen:Ic2lOFSlbSf9nKjL@some-name-mongos.custom-users-roles-sharded-635 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local mongo_flag=--quiet ++ local port=27017 ++ local mongo_bin=mongo ++ grep -E -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:' +++ echo .svc.cluster.local +++ awk -F: '{print $2}' ++ suffix_port= ++ [[ -z '' ]] ++ suffix=.svc.cluster.local:27017 +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.LVEOmgY4B3 ++++ mktemp +++ local LAST_ERR=/tmp/tmp.SVDiBkOH0q +++ 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.LVEOmgY4B3 +++ cat /tmp/tmp.SVDiBkOH0q +++ rm /tmp/tmp.LVEOmgY4B3 /tmp/tmp.SVDiBkOH0q +++ return 0 ++ local client_container=psmdb-client-bb8b97679-b5gjd ++ kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-gen:Ic2lOFSlbSf9nKjL@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' +++ mktemp ++ local LAST_OUT=/tmp/tmp.iu7e3Qwt09 +++ mktemp ++ local LAST_ERR=/tmp/tmp.bG1T3bAAED ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-gen:Ic2lOFSlbSf9nKjL@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.iu7e3Qwt09 ++ cat /tmp/tmp.bG1T3bAAED ++ rm /tmp/tmp.iu7e3Qwt09 /tmp/tmp.bG1T3bAAED ++ return 0 + ping=1 + desc 'ping return' + set +o xtrace ----------------------------------------------------------------------------------- ping return ----------------------------------------------------------------------------------- + '[' 1 '!=' 1 ']' ++ get_user_cmd '"user-external"' ++ local 'user="user-external"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-external");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-external");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare '$external' $'(function() {\n\tvar user = db.getUser("user-external");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-external + local 'database=$external' + local $'command=(function() {\n\tvar user = db.getUser("user-external");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-external + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use $external\\n (function() {\n\tvar user = db.getUser("user-external");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use $external\\n (function() {\n\tvar user = db.getUser("user-external");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + grep -E -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.ZqPs4swOkQ +++ mktemp ++ local LAST_ERR=/tmp/tmp.Q9ZcvYbwLp ++ 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.ZqPs4swOkQ ++ cat /tmp/tmp.Q9ZcvYbwLp ++ rm /tmp/tmp.ZqPs4swOkQ /tmp/tmp.Q9ZcvYbwLp ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use $external\\n (function() {\n\tvar user = db.getUser("user-external");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.kq4LuL9SeY ++ mktemp + local LAST_ERR=/tmp/tmp.fC0YQAIi1l + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use $external\\n (function() {\n\tvar user = db.getUser("user-external");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.kq4LuL9SeY + cat /tmp/tmp.fC0YQAIi1l + rm /tmp/tmp.kq4LuL9SeY /tmp/tmp.fC0YQAIi1l + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-external.json /tmp/tmp.GrKY0GUnUh/user-external + desc 'delete initial user from CR and create a new one' + set +o xtrace ----------------------------------------------------------------------------------- delete initial user from CR and create a new one ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"users":[\n\t\t\t{\n\t\t\t\t"name":"user-two",\n\t\t\t\t"db":"admin",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-two",\n\t\t\t\t\t"key": "userTwoPassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{"db":"admin","name":"userAdminAnyDatabase"}, \n\t\t\t\t\t{"db":"admin","name":"clusterAdmin"}\n\t\t\t\t]\n\t\t\t}\n\t\t]}\n\t}' ++ mktemp + local LAST_OUT=/tmp/tmp.57undIQbbP ++ mktemp + local LAST_ERR=/tmp/tmp.PWXKh9aS6d + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"users":[\n\t\t\t{\n\t\t\t\t"name":"user-two",\n\t\t\t\t"db":"admin",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-two",\n\t\t\t\t\t"key": "userTwoPassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{"db":"admin","name":"userAdminAnyDatabase"}, \n\t\t\t\t\t{"db":"admin","name":"clusterAdmin"}\n\t\t\t\t]\n\t\t\t}\n\t\t]}\n\t}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.57undIQbbP perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.PWXKh9aS6d + rm /tmp/tmp.57undIQbbP /tmp/tmp.PWXKh9aS6d + return 0 + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.TKQ3KrcWoA +++ mktemp ++ local LAST_ERR=/tmp/tmp.gvXWD65AtR ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.TKQ3KrcWoA ++ cat /tmp/tmp.gvXWD65AtR ++ rm /tmp/tmp.TKQ3KrcWoA /tmp/tmp.gvXWD65AtR ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.efDKYKgtgJ +++ mktemp ++ local LAST_ERR=/tmp/tmp.pJbodOaM7h ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.efDKYKgtgJ ++ cat /tmp/tmp.pJbodOaM7h ++ rm /tmp/tmp.efDKYKgtgJ /tmp/tmp.pJbodOaM7h ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.ZrtgA8TjE2 +++ mktemp ++ local LAST_ERR=/tmp/tmp.DybBPshf1d ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.ZrtgA8TjE2 ++ cat /tmp/tmp.DybBPshf1d ++ rm /tmp/tmp.ZrtgA8TjE2 /tmp/tmp.DybBPshf1d ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness ++ get_user_cmd '"user-two"' ++ local 'user="user-two"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare admin $'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-two + local database=admin + local $'command=(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-two + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + grep -E -v 'I NETWORK|W NETWORK|F 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:' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.9z3bpLyY2A +++ mktemp ++ local LAST_ERR=/tmp/tmp.eRVhSAaYUX ++ 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.9z3bpLyY2A ++ cat /tmp/tmp.eRVhSAaYUX ++ rm /tmp/tmp.9z3bpLyY2A /tmp/tmp.eRVhSAaYUX ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.HuJFEXbbZd ++ mktemp + local LAST_ERR=/tmp/tmp.51NWXGacqd + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.HuJFEXbbZd + cat /tmp/tmp.51NWXGacqd + rm /tmp/tmp.HuJFEXbbZd /tmp/tmp.51NWXGacqd + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-two.json /tmp/tmp.GrKY0GUnUh/user-two + userTwo=user-two ++ getSecretData user-two userTwoPassKey ++ local secretName=user-two ++ local dataKey=userTwoPassKey +++ kubectl get secrets/user-two '--template={{.data.userTwoPassKey}}' +++ base64 -d ++ local data=clusterMonitor ++ echo clusterMonitor + userTwoPass=clusterMonitor + check_auth user-two:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 + local uri=user-two:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 ++ run_mongos 'db.runCommand({ ping: 1 }).ok' user-two:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 '' '' --quiet ++ local 'command=db.runCommand({ ping: 1 }).ok' ++ grep -E -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=user-two:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local mongo_flag=--quiet ++ local port=27017 ++ local mongo_bin=mongo +++ awk -F: '{print $2}' +++ echo .svc.cluster.local ++ suffix_port= ++ [[ -z '' ]] ++ suffix=.svc.cluster.local:27017 +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.WxM447RuJl ++++ mktemp +++ local LAST_ERR=/tmp/tmp.rkIt1yI6Zl +++ 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.WxM447RuJl +++ cat /tmp/tmp.rkIt1yI6Zl +++ rm /tmp/tmp.WxM447RuJl /tmp/tmp.rkIt1yI6Zl +++ return 0 ++ local client_container=psmdb-client-bb8b97679-b5gjd ++ kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-two:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' +++ mktemp ++ local LAST_OUT=/tmp/tmp.V1NK0hdn9U +++ mktemp ++ local LAST_ERR=/tmp/tmp.hwTC3xOKjv ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-two:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.V1NK0hdn9U ++ cat /tmp/tmp.hwTC3xOKjv ++ rm /tmp/tmp.V1NK0hdn9U /tmp/tmp.hwTC3xOKjv ++ return 0 + ping=1 + desc 'ping return' + set +o xtrace ----------------------------------------------------------------------------------- ping return ----------------------------------------------------------------------------------- + '[' 1 '!=' 1 ']' + check_auth user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 + local uri=user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 ++ run_mongos 'db.runCommand({ ping: 1 }).ok' user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 '' '' --quiet ++ local 'command=db.runCommand({ ping: 1 }).ok' ++ local uri=user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local mongo_flag=--quiet ++ local port=27017 ++ local mongo_bin=mongo ++ grep -E -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:' +++ echo .svc.cluster.local +++ awk -F: '{print $2}' ++ suffix_port= ++ [[ -z '' ]] ++ suffix=.svc.cluster.local:27017 +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.D0CToFSjfF ++++ mktemp +++ local LAST_ERR=/tmp/tmp.mP3XMWRLAn +++ 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.D0CToFSjfF +++ cat /tmp/tmp.mP3XMWRLAn +++ rm /tmp/tmp.D0CToFSjfF /tmp/tmp.mP3XMWRLAn +++ return 0 ++ local client_container=psmdb-client-bb8b97679-b5gjd ++ kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' +++ mktemp ++ local LAST_OUT=/tmp/tmp.5cTN3ayCgk +++ mktemp ++ local LAST_ERR=/tmp/tmp.OpEHYnF33j ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-one:clusterMonitor@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.5cTN3ayCgk ++ cat /tmp/tmp.OpEHYnF33j ++ rm /tmp/tmp.5cTN3ayCgk /tmp/tmp.OpEHYnF33j ++ return 0 + ping=1 + desc 'ping return' + set +o xtrace ----------------------------------------------------------------------------------- ping return ----------------------------------------------------------------------------------- + '[' 1 '!=' 1 ']' + desc 'check password change' + set +o xtrace ----------------------------------------------------------------------------------- check password change ----------------------------------------------------------------------------------- + userTwoNewPass=new-user-two-password ++ base64 ++ echo -n new-user-two-password + patch_secret user-two userTwoPassKey bmV3LXVzZXItdHdvLXBhc3N3b3Jk + local secret=user-two + local key=userTwoPassKey + local value=bmV3LXVzZXItdHdvLXBhc3N3b3Jk + kubectl patch secret user-two '-p={"data":{"userTwoPassKey": "bmV3LXVzZXItdHdvLXBhc3N3b3Jk"}}' secret/user-two patched + sleep 20 + check_auth user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 + local uri=user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 ++ run_mongos 'db.runCommand({ ping: 1 }).ok' user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 '' '' --quiet ++ local 'command=db.runCommand({ ping: 1 }).ok' ++ local uri=user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ grep -E -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 mongo_flag=--quiet ++ local port=27017 ++ local mongo_bin=mongo +++ echo .svc.cluster.local +++ awk -F: '{print $2}' ++ suffix_port= ++ [[ -z '' ]] ++ suffix=.svc.cluster.local:27017 +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.bYPoUIdmWp ++++ mktemp +++ local LAST_ERR=/tmp/tmp.gJnMFzFO22 +++ 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.bYPoUIdmWp +++ cat /tmp/tmp.gJnMFzFO22 +++ rm /tmp/tmp.bYPoUIdmWp /tmp/tmp.gJnMFzFO22 +++ return 0 ++ local client_container=psmdb-client-bb8b97679-b5gjd ++ kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' +++ mktemp ++ local LAST_OUT=/tmp/tmp.LgLue1FiEc +++ mktemp ++ local LAST_ERR=/tmp/tmp.PB52a4I8Gw ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.LgLue1FiEc ++ cat /tmp/tmp.PB52a4I8Gw ++ rm /tmp/tmp.LgLue1FiEc /tmp/tmp.PB52a4I8Gw ++ return 0 + ping=1 + desc 'ping return' + set +o xtrace ----------------------------------------------------------------------------------- ping return ----------------------------------------------------------------------------------- + '[' 1 '!=' 1 ']' + desc 'check user roles update from CR' + set +o xtrace ----------------------------------------------------------------------------------- check user roles update from CR ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"users":[\n\t\t\t{\n\t\t\t\t"name":"user-two",\n\t\t\t\t"db":"admin",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-two",\n\t\t\t\t\t"key": "userTwoPassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{"db":"admin","name":"clusterAdmin"}\n\t\t\t\t]\n\t\t\t}\n\t\t]}\n\t}' ++ mktemp + local LAST_OUT=/tmp/tmp.X0ZJ6sH60k ++ mktemp + local LAST_ERR=/tmp/tmp.CahYqx3Ya0 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"users":[\n\t\t\t{\n\t\t\t\t"name":"user-two",\n\t\t\t\t"db":"admin",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-two",\n\t\t\t\t\t"key": "userTwoPassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{"db":"admin","name":"clusterAdmin"}\n\t\t\t\t]\n\t\t\t}\n\t\t]}\n\t}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.X0ZJ6sH60k perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.CahYqx3Ya0 + rm /tmp/tmp.X0ZJ6sH60k /tmp/tmp.CahYqx3Ya0 + return 0 + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.51Z2TEkCmW +++ mktemp ++ local LAST_ERR=/tmp/tmp.6Ksi0h9fLL ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.51Z2TEkCmW ++ cat /tmp/tmp.6Ksi0h9fLL ++ rm /tmp/tmp.51Z2TEkCmW /tmp/tmp.6Ksi0h9fLL ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.vyiNTKhzGw +++ mktemp ++ local LAST_ERR=/tmp/tmp.gye7W5f2Gd ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.vyiNTKhzGw ++ cat /tmp/tmp.gye7W5f2Gd ++ rm /tmp/tmp.vyiNTKhzGw /tmp/tmp.gye7W5f2Gd ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.4Z4HMaDGeB +++ mktemp ++ local LAST_ERR=/tmp/tmp.SDXkVAWsXo ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.4Z4HMaDGeB ++ cat /tmp/tmp.SDXkVAWsXo ++ rm /tmp/tmp.4Z4HMaDGeB /tmp/tmp.SDXkVAWsXo ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness ++ get_user_cmd '"user-two"' ++ local 'user="user-two"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare admin $'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-two-update-roles + local database=admin + local $'command=(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-two-update-roles + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + grep -E -v 'I NETWORK|W NETWORK|F 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:' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + sed '/"userId"/d' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.EZihjX6IXz +++ mktemp ++ local LAST_ERR=/tmp/tmp.Wdj80gkkBQ ++ 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.EZihjX6IXz ++ cat /tmp/tmp.Wdj80gkkBQ ++ rm /tmp/tmp.EZihjX6IXz /tmp/tmp.Wdj80gkkBQ ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.qBe5cv6Vth ++ mktemp + local LAST_ERR=/tmp/tmp.WhjZMLgWbn + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.qBe5cv6Vth + cat /tmp/tmp.WhjZMLgWbn + rm /tmp/tmp.qBe5cv6Vth /tmp/tmp.WhjZMLgWbn + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-two-update-roles.json /tmp/tmp.GrKY0GUnUh/user-two-update-roles + desc 'check user roles update from DB' + set +o xtrace ----------------------------------------------------------------------------------- check user roles update from DB ----------------------------------------------------------------------------------- + run_mongos 'use admin\n db.updateUser("user-two", { roles : [{ role : "userAdminAnyDatabase", db: "admin"}]})' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local 'command=use admin\n db.updateUser("user-two", { roles : [{ role : "userAdminAnyDatabase", db: "admin"}]})' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.hVFmfoi0lL +++ mktemp ++ local LAST_ERR=/tmp/tmp.ETe94Bykke ++ 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.hVFmfoi0lL ++ cat /tmp/tmp.ETe94Bykke ++ rm /tmp/tmp.hVFmfoi0lL /tmp/tmp.ETe94Bykke ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''use admin\n db.updateUser("user-two", { roles : [{ role : "userAdminAnyDatabase", db: "admin"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.tSyQbffT5m ++ mktemp + local LAST_ERR=/tmp/tmp.G3W5gTNuUi + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''use admin\n db.updateUser("user-two", { roles : [{ role : "userAdminAnyDatabase", db: "admin"}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.tSyQbffT5m Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("ef135a59-3738-41cb-86a5-0d42dc7bd32b") } Percona Server for MongoDB server version: v8.0.23-10 WARNING: shell and server versions do not match switched to db admin bye + cat /tmp/tmp.G3W5gTNuUi + rm /tmp/tmp.tSyQbffT5m /tmp/tmp.G3W5gTNuUi + return 0 + sleep 15 ++ get_user_cmd '"user-two"' ++ local 'user="user-two"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare admin $'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-two-update-roles + local database=admin + local $'command=(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-two-update-roles + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + grep -E -v 'I NETWORK|W NETWORK|F 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=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Z2PH2mxi4y +++ mktemp ++ local LAST_ERR=/tmp/tmp.a2bU38e0Rl ++ 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.Z2PH2mxi4y ++ cat /tmp/tmp.a2bU38e0Rl ++ rm /tmp/tmp.Z2PH2mxi4y /tmp/tmp.a2bU38e0Rl ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.3zHkT7Eyh2 ++ mktemp + local LAST_ERR=/tmp/tmp.4Pc5URuT0l + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.3zHkT7Eyh2 + cat /tmp/tmp.4Pc5URuT0l + rm /tmp/tmp.3zHkT7Eyh2 /tmp/tmp.4Pc5URuT0l + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-two-update-roles.json /tmp/tmp.GrKY0GUnUh/user-two-update-roles + desc 'check user recreated after deleted from DB' + set +o xtrace ----------------------------------------------------------------------------------- check user recreated after deleted from DB ----------------------------------------------------------------------------------- + run_mongos 'use admin\n db.dropUser("user-two")' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local 'command=use admin\n db.dropUser("user-two")' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.g4zi47mkIC +++ mktemp ++ local LAST_ERR=/tmp/tmp.Cz4emXYxLU ++ 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.g4zi47mkIC ++ cat /tmp/tmp.Cz4emXYxLU ++ rm /tmp/tmp.g4zi47mkIC /tmp/tmp.Cz4emXYxLU ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''use admin\n db.dropUser("user-two")\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.lae8HRo6Yj ++ mktemp + local LAST_ERR=/tmp/tmp.QFd7mxK3Ne + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''use admin\n db.dropUser("user-two")\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.lae8HRo6Yj Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("75a84d04-f2ea-4258-89ff-f78bbaa665a9") } Percona Server for MongoDB server version: v8.0.23-10 WARNING: shell and server versions do not match switched to db admin true bye + cat /tmp/tmp.QFd7mxK3Ne + rm /tmp/tmp.lae8HRo6Yj /tmp/tmp.QFd7mxK3Ne + return 0 + sleep 15 ++ get_user_cmd '"user-two"' ++ local 'user="user-two"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare admin $'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-two-update-roles + local database=admin + local $'command=(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-two-update-roles + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + grep -E -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + local $'command=use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + sed '/"userId"/d' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.hW8UOJjqre +++ mktemp ++ local LAST_ERR=/tmp/tmp.7hioYYnhN0 ++ 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.hW8UOJjqre ++ cat /tmp/tmp.7hioYYnhN0 ++ rm /tmp/tmp.hW8UOJjqre /tmp/tmp.7hioYYnhN0 ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.p6SuXewJxz ++ mktemp + local LAST_ERR=/tmp/tmp.gibqPxLQ3K + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.p6SuXewJxz + cat /tmp/tmp.gibqPxLQ3K + rm /tmp/tmp.p6SuXewJxz /tmp/tmp.gibqPxLQ3K + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-two-update-roles.json /tmp/tmp.GrKY0GUnUh/user-two-update-roles + desc 'check new user created after updated user name via CR' + set +o xtrace ----------------------------------------------------------------------------------- check new user created after updated user name via CR ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"users":[\n\t\t\t{\n\t\t\t\t"name":"user-three",\n\t\t\t\t"db":"admin",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-two",\n\t\t\t\t\t"key": "userTwoPassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{"db":"admin","name":"clusterAdmin"}\n\t\t\t\t]\n\t\t\t}\n\t\t]}\n\t}' ++ mktemp + local LAST_OUT=/tmp/tmp.nT8c3F1xac ++ mktemp + local LAST_ERR=/tmp/tmp.OwI3xYb1Ia + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"users":[\n\t\t\t{\n\t\t\t\t"name":"user-three",\n\t\t\t\t"db":"admin",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-two",\n\t\t\t\t\t"key": "userTwoPassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{"db":"admin","name":"clusterAdmin"}\n\t\t\t\t]\n\t\t\t}\n\t\t]}\n\t}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.nT8c3F1xac perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.OwI3xYb1Ia + rm /tmp/tmp.nT8c3F1xac /tmp/tmp.OwI3xYb1Ia + return 0 + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.6HOznJS9cv +++ mktemp ++ local LAST_ERR=/tmp/tmp.ewk77tdDU6 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.6HOznJS9cv ++ cat /tmp/tmp.ewk77tdDU6 ++ rm /tmp/tmp.6HOznJS9cv /tmp/tmp.ewk77tdDU6 ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.ipPd0Vhz0g +++ mktemp ++ local LAST_ERR=/tmp/tmp.04hUoTlcoA ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.ipPd0Vhz0g ++ cat /tmp/tmp.04hUoTlcoA ++ rm /tmp/tmp.ipPd0Vhz0g /tmp/tmp.04hUoTlcoA ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.pxsvLmntZf +++ mktemp ++ local LAST_ERR=/tmp/tmp.1rSo2RrEWF ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.pxsvLmntZf ++ cat /tmp/tmp.1rSo2RrEWF ++ rm /tmp/tmp.pxsvLmntZf /tmp/tmp.1rSo2RrEWF ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness ++ get_user_cmd '"user-three"' ++ local 'user="user-three"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare admin $'(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-three-admin-db + local database=admin + local $'command=(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-three-admin-db + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + grep -E -v 'I NETWORK|W NETWORK|F 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:' + sed '/"userId"/d' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + local $'command=use admin\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.XP6IMvX1Kw +++ mktemp ++ local LAST_ERR=/tmp/tmp.RVZNKyVVEK ++ 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.XP6IMvX1Kw ++ cat /tmp/tmp.RVZNKyVVEK ++ rm /tmp/tmp.XP6IMvX1Kw /tmp/tmp.RVZNKyVVEK ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.nAApfJiEpH ++ mktemp + local LAST_ERR=/tmp/tmp.PKwcP9nIFe + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.nAApfJiEpH + cat /tmp/tmp.PKwcP9nIFe + rm /tmp/tmp.nAApfJiEpH /tmp/tmp.PKwcP9nIFe + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-three-admin-db.json /tmp/tmp.GrKY0GUnUh/user-three-admin-db ++ get_user_cmd '"user-two"' ++ local 'user="user-two"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare admin $'(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-two-update-roles + local database=admin + local $'command=(function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-two-update-roles + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + grep -E -v 'I NETWORK|W NETWORK|F 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 mongo_bin=mongo ++ echo .svc.cluster.local + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' ++ awk -F: '{print $2}' + sed '/"userId"/d' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.zsVh39iPd8 +++ mktemp ++ local LAST_ERR=/tmp/tmp.AVc9OoyANc ++ 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.zsVh39iPd8 ++ cat /tmp/tmp.AVc9OoyANc ++ rm /tmp/tmp.zsVh39iPd8 /tmp/tmp.AVc9OoyANc ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.niwgmEdD4G ++ mktemp + local LAST_ERR=/tmp/tmp.gjcA9X0W57 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-two");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.niwgmEdD4G + cat /tmp/tmp.gjcA9X0W57 + rm /tmp/tmp.niwgmEdD4G /tmp/tmp.gjcA9X0W57 + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-two-update-roles.json /tmp/tmp.GrKY0GUnUh/user-two-update-roles + check_auth user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 + local uri=user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 ++ run_mongos 'db.runCommand({ ping: 1 }).ok' user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 '' '' --quiet ++ local 'command=db.runCommand({ ping: 1 }).ok' ++ local uri=user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local mongo_flag=--quiet ++ local port=27017 ++ local mongo_bin=mongo ++ grep -E -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:' +++ echo .svc.cluster.local +++ awk -F: '{print $2}' ++ suffix_port= ++ [[ -z '' ]] ++ suffix=.svc.cluster.local:27017 +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.t0G3Vaks9e ++++ mktemp +++ local LAST_ERR=/tmp/tmp.eFrR1BdEqK +++ 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.t0G3Vaks9e +++ cat /tmp/tmp.eFrR1BdEqK +++ rm /tmp/tmp.t0G3Vaks9e /tmp/tmp.eFrR1BdEqK +++ return 0 ++ local client_container=psmdb-client-bb8b97679-b5gjd ++ kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' +++ mktemp ++ local LAST_OUT=/tmp/tmp.bMsOdjYvXc +++ mktemp ++ local LAST_ERR=/tmp/tmp.JqIBoPdHh4 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-two:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.bMsOdjYvXc ++ cat /tmp/tmp.JqIBoPdHh4 ++ rm /tmp/tmp.bMsOdjYvXc /tmp/tmp.JqIBoPdHh4 ++ return 0 + ping=1 + desc 'ping return' + set +o xtrace ----------------------------------------------------------------------------------- ping return ----------------------------------------------------------------------------------- + '[' 1 '!=' 1 ']' + check_auth user-three:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 + local uri=user-three:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 ++ run_mongos 'db.runCommand({ ping: 1 }).ok' user-three:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 '' '' --quiet ++ local 'command=db.runCommand({ ping: 1 }).ok' ++ grep -E -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=user-three:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635 ++ local driver=mongodb ++ local suffix=.svc.cluster.local ++ local mongo_flag=--quiet ++ local port=27017 ++ local mongo_bin=mongo +++ echo .svc.cluster.local +++ awk -F: '{print $2}' ++ suffix_port= ++ [[ -z '' ]] ++ suffix=.svc.cluster.local:27017 +++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' ++++ mktemp +++ local LAST_OUT=/tmp/tmp.wsRZ1shtmz ++++ mktemp +++ local LAST_ERR=/tmp/tmp.Ni8vbYZluW +++ 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.wsRZ1shtmz +++ cat /tmp/tmp.Ni8vbYZluW +++ rm /tmp/tmp.wsRZ1shtmz /tmp/tmp.Ni8vbYZluW +++ return 0 ++ local client_container=psmdb-client-bb8b97679-b5gjd ++ kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-three:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' +++ mktemp ++ local LAST_OUT=/tmp/tmp.4TasSZssYu +++ mktemp ++ local LAST_ERR=/tmp/tmp.gtGor5q7mP ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''db.runCommand({ ping: 1 }).ok\n'\'' | mongo mongodb://user-three:new-user-two-password@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin --quiet' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.4TasSZssYu ++ cat /tmp/tmp.gtGor5q7mP ++ rm /tmp/tmp.4TasSZssYu /tmp/tmp.gtGor5q7mP ++ return 0 + ping=1 + desc 'ping return' + set +o xtrace ----------------------------------------------------------------------------------- ping return ----------------------------------------------------------------------------------- + '[' 1 '!=' 1 ']' + desc 'check new user created after updated user db via CR' + set +o xtrace ----------------------------------------------------------------------------------- check new user created after updated user db via CR ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"users":[\n\t\t\t{\n\t\t\t\t"name":"user-three",\n\t\t\t\t"db":"newDb",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-two",\n\t\t\t\t\t"key": "userTwoPassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{"db":"admin","name":"clusterAdmin"}\n\t\t\t\t]\n\t\t\t}\n\t\t]}\n\t}' ++ mktemp + local LAST_OUT=/tmp/tmp.aqvWP05hax ++ mktemp + local LAST_ERR=/tmp/tmp.NmPjNGN10p + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"users":[\n\t\t\t{\n\t\t\t\t"name":"user-three",\n\t\t\t\t"db":"newDb",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-two",\n\t\t\t\t\t"key": "userTwoPassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{"db":"admin","name":"clusterAdmin"}\n\t\t\t\t]\n\t\t\t}\n\t\t]}\n\t}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.aqvWP05hax perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.NmPjNGN10p + rm /tmp/tmp.aqvWP05hax /tmp/tmp.NmPjNGN10p + return 0 + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.D38awcuton +++ mktemp ++ local LAST_ERR=/tmp/tmp.6lCCRhoBhD ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.D38awcuton ++ cat /tmp/tmp.6lCCRhoBhD ++ rm /tmp/tmp.D38awcuton /tmp/tmp.6lCCRhoBhD ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.fGvgezbJIz +++ mktemp ++ local LAST_ERR=/tmp/tmp.WxYqvuOsBa ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.fGvgezbJIz ++ cat /tmp/tmp.WxYqvuOsBa ++ rm /tmp/tmp.fGvgezbJIz /tmp/tmp.WxYqvuOsBa ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.xk0ija7uYs +++ mktemp ++ local LAST_ERR=/tmp/tmp.wWOfM6dt2D ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.xk0ija7uYs ++ cat /tmp/tmp.wWOfM6dt2D ++ rm /tmp/tmp.xk0ija7uYs /tmp/tmp.wWOfM6dt2D ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness ++ get_user_cmd '"user-three"' ++ local 'user="user-three"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare newDb $'(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-three-newDb-db + local database=newDb + local $'command=(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-three-newDb-db + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use newDb\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use newDb\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + grep -E -v 'I NETWORK|W NETWORK|F 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:' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.IJtOxtLqbz +++ mktemp ++ local LAST_ERR=/tmp/tmp.neSY5HmY4a ++ 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.IJtOxtLqbz ++ cat /tmp/tmp.neSY5HmY4a ++ rm /tmp/tmp.IJtOxtLqbz /tmp/tmp.neSY5HmY4a ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use newDb\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.6avO4BQlhY ++ mktemp + local LAST_ERR=/tmp/tmp.W4pSHZBsCn + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use newDb\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.6avO4BQlhY + cat /tmp/tmp.W4pSHZBsCn + rm /tmp/tmp.6avO4BQlhY /tmp/tmp.W4pSHZBsCn + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-three-newDb-db.json /tmp/tmp.GrKY0GUnUh/user-three-newDb-db ++ get_user_cmd '"user-three"' ++ local 'user="user-three"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare admin $'(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-three-admin-db + local database=admin + local $'command=(function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-three-admin-db + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + grep -E -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + local $'command=use admin\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.tvH1ZxOwzo +++ mktemp ++ local LAST_ERR=/tmp/tmp.1m4xhab9Bl ++ 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.tvH1ZxOwzo ++ cat /tmp/tmp.1m4xhab9Bl ++ rm /tmp/tmp.tvH1ZxOwzo /tmp/tmp.1m4xhab9Bl ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.2fwK7lJsJn ++ mktemp + local LAST_ERR=/tmp/tmp.E9QEiWKe8B + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-three");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.2fwK7lJsJn + cat /tmp/tmp.E9QEiWKe8B + rm /tmp/tmp.2fwK7lJsJn /tmp/tmp.E9QEiWKe8B + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-three-admin-db.json /tmp/tmp.GrKY0GUnUh/user-three-admin-db + desc 'check new user created with default db and secret password key' + set +o xtrace ----------------------------------------------------------------------------------- check new user created with default db and secret password key ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"users":[\n\t\t\t{\n\t\t\t\t"name":"user-four",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-two"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{"db":"admin","name":"clusterAdmin"}\n\t\t\t\t]\n\t\t\t}\n\t\t]}\n\t}' ++ mktemp + local LAST_OUT=/tmp/tmp.a3DpNRElkt ++ mktemp + local LAST_ERR=/tmp/tmp.MSK7qZhQ5h + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"users":[\n\t\t\t{\n\t\t\t\t"name":"user-four",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-two"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{"db":"admin","name":"clusterAdmin"}\n\t\t\t\t]\n\t\t\t}\n\t\t]}\n\t}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.a3DpNRElkt perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.MSK7qZhQ5h + rm /tmp/tmp.a3DpNRElkt /tmp/tmp.MSK7qZhQ5h + return 0 + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.FKPIfBkALV +++ mktemp ++ local LAST_ERR=/tmp/tmp.Hy23jOV6Ix ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.FKPIfBkALV ++ cat /tmp/tmp.Hy23jOV6Ix ++ rm /tmp/tmp.FKPIfBkALV /tmp/tmp.Hy23jOV6Ix ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.8JfdDqhJ8t +++ mktemp ++ local LAST_ERR=/tmp/tmp.xbIleNAs8G ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.8JfdDqhJ8t ++ cat /tmp/tmp.xbIleNAs8G ++ rm /tmp/tmp.8JfdDqhJ8t /tmp/tmp.xbIleNAs8G ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.k6alKnmwuL +++ mktemp ++ local LAST_ERR=/tmp/tmp.bCDimQrzfU ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.k6alKnmwuL ++ cat /tmp/tmp.bCDimQrzfU ++ rm /tmp/tmp.k6alKnmwuL /tmp/tmp.bCDimQrzfU ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness ++ get_user_cmd '"user-four"' ++ local 'user="user-four"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-four");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-four");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare admin $'(function() {\n\tvar user = db.getUser("user-four");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-four + local database=admin + local $'command=(function() {\n\tvar user = db.getUser("user-four");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-four + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar user = db.getUser("user-four");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use admin\\n (function() {\n\tvar user = db.getUser("user-four");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + grep -E -v 'I NETWORK|W NETWORK|F 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:' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + sed '/"userId"/d' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.vfzzy9vdSy +++ mktemp ++ local LAST_ERR=/tmp/tmp.rND8bYzlIp ++ 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.vfzzy9vdSy ++ cat /tmp/tmp.rND8bYzlIp ++ rm /tmp/tmp.vfzzy9vdSy /tmp/tmp.rND8bYzlIp ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-four");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.zetPscyRCh ++ mktemp + local LAST_ERR=/tmp/tmp.3U5Hb9UCDa + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar user = db.getUser("user-four");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.zetPscyRCh + cat /tmp/tmp.3U5Hb9UCDa + rm /tmp/tmp.zetPscyRCh /tmp/tmp.3U5Hb9UCDa + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-four.json /tmp/tmp.GrKY0GUnUh/user-four + desc 'check user role on cluster initialization' + set +o xtrace ----------------------------------------------------------------------------------- check user role on cluster initialization ----------------------------------------------------------------------------------- ++ get_role_cmd '"role-one"' ++ local 'role="role-one"' ++ cmd=$'(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' ++ echo $'(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + compare admin $'(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 role-one + local database=admin + local $'command=(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=role-one + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + grep -E -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.mntzhLQW2I +++ mktemp ++ local LAST_ERR=/tmp/tmp.vME4HxheUf ++ 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.mntzhLQW2I ++ cat /tmp/tmp.vME4HxheUf ++ rm /tmp/tmp.mntzhLQW2I /tmp/tmp.vME4HxheUf ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.UVcpgMt8Vq ++ mktemp + local LAST_ERR=/tmp/tmp.KXBd4o1bSw + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.UVcpgMt8Vq + cat /tmp/tmp.KXBd4o1bSw + rm /tmp/tmp.UVcpgMt8Vq /tmp/tmp.KXBd4o1bSw + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/role-one.json /tmp/tmp.GrKY0GUnUh/role-one + desc 'check role recreated after deleted from DB' + set +o xtrace ----------------------------------------------------------------------------------- check role recreated after deleted from DB ----------------------------------------------------------------------------------- + run_mongos 'use admin\n db.dropRole("role-one")' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local 'command=use admin\n db.dropRole("role-one")' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.7y5XF7Ebk0 +++ mktemp ++ local LAST_ERR=/tmp/tmp.JgkjScg7T3 ++ 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.7y5XF7Ebk0 ++ cat /tmp/tmp.JgkjScg7T3 ++ rm /tmp/tmp.7y5XF7Ebk0 /tmp/tmp.JgkjScg7T3 ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''use admin\n db.dropRole("role-one")\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.YLmn6nn26l ++ mktemp + local LAST_ERR=/tmp/tmp.7Twt6TjP3J + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''use admin\n db.dropRole("role-one")\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.YLmn6nn26l Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("e175b06b-ad68-4802-a727-0cbf5ac17403") } Percona Server for MongoDB server version: v8.0.23-10 WARNING: shell and server versions do not match switched to db admin true bye + cat /tmp/tmp.7Twt6TjP3J + rm /tmp/tmp.YLmn6nn26l /tmp/tmp.7Twt6TjP3J + return 0 + sleep 15 ++ get_role_cmd '"role-one"' ++ local 'role="role-one"' ++ cmd=$'(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' ++ echo $'(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + compare admin $'(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 role-one + local database=admin + local $'command=(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=role-one + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + grep -E -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.J2Ekq3Z9zL +++ mktemp ++ local LAST_ERR=/tmp/tmp.p4ImJ72p0z ++ 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.J2Ekq3Z9zL ++ cat /tmp/tmp.p4ImJ72p0z ++ rm /tmp/tmp.J2Ekq3Z9zL /tmp/tmp.p4ImJ72p0z ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.4hrLqaE1mf ++ mktemp + local LAST_ERR=/tmp/tmp.J0LNdWZ6xO + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.4hrLqaE1mf + cat /tmp/tmp.J0LNdWZ6xO + rm /tmp/tmp.4hrLqaE1mf /tmp/tmp.J0LNdWZ6xO + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/role-one.json /tmp/tmp.GrKY0GUnUh/role-one + desc 'delete initial role from CR and create a new one' + set +o xtrace ----------------------------------------------------------------------------------- delete initial role from CR and create a new one ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"roles":[\n\t\t\t{\n\t\t\t\t"role": "role-two",\n\t\t\t\t"db": "admin",\n\t\t\t\t"privileges": [\n\t\t\t\t\t{\n\t\t\t\t\t\t"resource": {\n\t\t\t\t\t\t\t"db": "config",\n\t\t\t\t\t\t\t"collection": ""\n\t\t\t\t\t\t},\n\t\t\t\t\t\t"actions": [\n\t\t\t\t\t\t\t"find"\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t"roles": [\n\t\t\t\t\t{\n\t\t\t\t\t\t"role": "read",\n\t\t\t\t\t\t"db": "admin"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t}}' ++ mktemp + local LAST_OUT=/tmp/tmp.UGdN2JZd1x ++ mktemp + local LAST_ERR=/tmp/tmp.P5mVmNUnB7 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"roles":[\n\t\t\t{\n\t\t\t\t"role": "role-two",\n\t\t\t\t"db": "admin",\n\t\t\t\t"privileges": [\n\t\t\t\t\t{\n\t\t\t\t\t\t"resource": {\n\t\t\t\t\t\t\t"db": "config",\n\t\t\t\t\t\t\t"collection": ""\n\t\t\t\t\t\t},\n\t\t\t\t\t\t"actions": [\n\t\t\t\t\t\t\t"find"\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t"roles": [\n\t\t\t\t\t{\n\t\t\t\t\t\t"role": "read",\n\t\t\t\t\t\t"db": "admin"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t}}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.UGdN2JZd1x perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.P5mVmNUnB7 + rm /tmp/tmp.UGdN2JZd1x /tmp/tmp.P5mVmNUnB7 + return 0 + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.vkJYna3hm6 +++ mktemp ++ local LAST_ERR=/tmp/tmp.6RxIxmtL2a ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.vkJYna3hm6 ++ cat /tmp/tmp.6RxIxmtL2a ++ rm /tmp/tmp.vkJYna3hm6 /tmp/tmp.6RxIxmtL2a ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.t4iXMFSprh +++ mktemp ++ local LAST_ERR=/tmp/tmp.LvaZJcdePi ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.t4iXMFSprh ++ cat /tmp/tmp.LvaZJcdePi ++ rm /tmp/tmp.t4iXMFSprh /tmp/tmp.LvaZJcdePi ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.BBDNAaV1a3 +++ mktemp ++ local LAST_ERR=/tmp/tmp.UHszfWQgRe ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.BBDNAaV1a3 ++ cat /tmp/tmp.UHszfWQgRe ++ rm /tmp/tmp.BBDNAaV1a3 /tmp/tmp.UHszfWQgRe ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness ++ get_role_cmd '"role-one"' ++ local 'role="role-one"' ++ cmd=$'(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' ++ echo $'(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + compare admin $'(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 role-one + local database=admin + local $'command=(function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=role-one + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + grep -E -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + local $'command=use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.o1uLu5uujP +++ mktemp ++ local LAST_ERR=/tmp/tmp.faXW0zfxnz ++ 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.o1uLu5uujP ++ cat /tmp/tmp.faXW0zfxnz ++ rm /tmp/tmp.o1uLu5uujP /tmp/tmp.faXW0zfxnz ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.CxehkluFLE ++ mktemp + local LAST_ERR=/tmp/tmp.nsvLCGetJd + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-one", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.CxehkluFLE + cat /tmp/tmp.nsvLCGetJd + rm /tmp/tmp.CxehkluFLE /tmp/tmp.nsvLCGetJd + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/role-one.json /tmp/tmp.GrKY0GUnUh/role-one ++ get_role_cmd '"role-two"' ++ local 'role="role-two"' ++ cmd=$'(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' ++ echo $'(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + compare admin $'(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 role-two + local database=admin + local $'command=(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=role-two + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + grep -E -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.tyQaAkyidk +++ mktemp ++ local LAST_ERR=/tmp/tmp.1X2YZ0BDpO ++ 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.tyQaAkyidk ++ cat /tmp/tmp.1X2YZ0BDpO ++ rm /tmp/tmp.tyQaAkyidk /tmp/tmp.1X2YZ0BDpO ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.DdtsJEvAgQ ++ mktemp + local LAST_ERR=/tmp/tmp.JdpxnvVewn + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.DdtsJEvAgQ + cat /tmp/tmp.JdpxnvVewn + rm /tmp/tmp.DdtsJEvAgQ /tmp/tmp.JdpxnvVewn + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/role-two.json /tmp/tmp.GrKY0GUnUh/role-two + desc 'check role update from CR' + set +o xtrace ----------------------------------------------------------------------------------- check role update from CR ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"roles":[\n\t\t\t{\n\t\t\t\t"role": "role-two",\n\t\t\t\t"db": "admin",\n\t\t\t\t"privileges": [\n\t\t\t\t\t{\n\t\t\t\t\t\t"resource": {\n\t\t\t\t\t\t\t"db": "config",\n\t\t\t\t\t\t\t"collection": ""\n\t\t\t\t\t\t},\n\t\t\t\t\t\t"actions": [\n\t\t\t\t\t\t\t"find"\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t}}' ++ mktemp + local LAST_OUT=/tmp/tmp.TtXqUXC0y3 ++ mktemp + local LAST_ERR=/tmp/tmp.z57VUXiUii + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"roles":[\n\t\t\t{\n\t\t\t\t"role": "role-two",\n\t\t\t\t"db": "admin",\n\t\t\t\t"privileges": [\n\t\t\t\t\t{\n\t\t\t\t\t\t"resource": {\n\t\t\t\t\t\t\t"db": "config",\n\t\t\t\t\t\t\t"collection": ""\n\t\t\t\t\t\t},\n\t\t\t\t\t\t"actions": [\n\t\t\t\t\t\t\t"find"\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t}}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.TtXqUXC0y3 perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.z57VUXiUii + rm /tmp/tmp.TtXqUXC0y3 /tmp/tmp.z57VUXiUii + return 0 + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.4b7FiMX4dN +++ mktemp ++ local LAST_ERR=/tmp/tmp.Ij6jDp9jXM ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.4b7FiMX4dN ++ cat /tmp/tmp.Ij6jDp9jXM ++ rm /tmp/tmp.4b7FiMX4dN /tmp/tmp.Ij6jDp9jXM ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.BkhPmPULZE +++ mktemp ++ local LAST_ERR=/tmp/tmp.BfVpVRb2ZK ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.BkhPmPULZE ++ cat /tmp/tmp.BfVpVRb2ZK ++ rm /tmp/tmp.BkhPmPULZE /tmp/tmp.BfVpVRb2ZK ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.tn7EQL4W34 +++ mktemp ++ local LAST_ERR=/tmp/tmp.umFirssHwK ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.tn7EQL4W34 ++ cat /tmp/tmp.umFirssHwK ++ rm /tmp/tmp.tn7EQL4W34 /tmp/tmp.umFirssHwK ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness ++ get_role_cmd '"role-two"' ++ local 'role="role-two"' ++ cmd=$'(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' ++ echo $'(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + compare admin $'(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 role-two-updated + local database=admin + local $'command=(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=role-two-updated + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + grep -E -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + local $'command=use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.CKZNfKDOLw +++ mktemp ++ local LAST_ERR=/tmp/tmp.tKXKK3XNTq ++ 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.CKZNfKDOLw ++ cat /tmp/tmp.tKXKK3XNTq ++ rm /tmp/tmp.CKZNfKDOLw /tmp/tmp.tKXKK3XNTq ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.IFE0eIxrxr ++ mktemp + local LAST_ERR=/tmp/tmp.q2lA2kwV8W + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.IFE0eIxrxr + cat /tmp/tmp.q2lA2kwV8W + rm /tmp/tmp.IFE0eIxrxr /tmp/tmp.q2lA2kwV8W + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/role-two-updated.json /tmp/tmp.GrKY0GUnUh/role-two-updated + desc 'check role update from DB' + set +o xtrace ----------------------------------------------------------------------------------- check role update from DB ----------------------------------------------------------------------------------- + run_mongos 'use admin\n db.updateRole( "role-two",{privileges:[{resource: {db:"config", collection:"" }, actions: ["find", "update"]}]})' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local 'command=use admin\n db.updateRole( "role-two",{privileges:[{resource: {db:"config", collection:"" }, actions: ["find", "update"]}]})' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.8eWfxxvz1g +++ mktemp ++ local LAST_ERR=/tmp/tmp.0by4wbHTZA ++ 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.8eWfxxvz1g ++ cat /tmp/tmp.0by4wbHTZA ++ rm /tmp/tmp.8eWfxxvz1g /tmp/tmp.0by4wbHTZA ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''use admin\n db.updateRole( "role-two",{privileges:[{resource: {db:"config", collection:"" }, actions: ["find", "update"]}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.tTYgEh5IgN ++ mktemp + local LAST_ERR=/tmp/tmp.8lwODwd0TT + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c 'printf '\''use admin\n db.updateRole( "role-two",{privileges:[{resource: {db:"config", collection:"" }, actions: ["find", "update"]}]})\n'\'' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.tTYgEh5IgN Percona Server for MongoDB shell version v4.4.29-28 connecting to: mongodb://some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("b07a5602-7d25-428b-b298-692553787ba3") } Percona Server for MongoDB server version: v8.0.23-10 WARNING: shell and server versions do not match switched to db admin bye + cat /tmp/tmp.8lwODwd0TT + rm /tmp/tmp.tTYgEh5IgN /tmp/tmp.8lwODwd0TT + return 0 + sleep 15 ++ get_role_cmd '"role-two"' ++ local 'role="role-two"' ++ cmd=$'(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' ++ echo $'(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + compare admin $'(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 role-two-updated + local database=admin + local $'command=(function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=role-two-updated + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + grep -E -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + local $'command=use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + sed '/"userId"/d' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.E3Vjn914SW +++ mktemp ++ local LAST_ERR=/tmp/tmp.7sOpxY6OMH ++ 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.E3Vjn914SW ++ cat /tmp/tmp.7sOpxY6OMH ++ rm /tmp/tmp.E3Vjn914SW /tmp/tmp.7sOpxY6OMH ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.tnnJR5rQNf ++ mktemp + local LAST_ERR=/tmp/tmp.VNnkNLBy2q + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-two", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.tnnJR5rQNf + cat /tmp/tmp.VNnkNLBy2q + rm /tmp/tmp.tnnJR5rQNf /tmp/tmp.VNnkNLBy2q + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/role-two-updated.json /tmp/tmp.GrKY0GUnUh/role-two-updated + desc 'check new role created after updated role name via CR' + set +o xtrace ----------------------------------------------------------------------------------- check new role created after updated role name via CR ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"roles":[\n\t\t\t{\n\t\t\t\t"role": "role-three",\n\t\t\t\t"db": "admin",\n\t\t\t\t"privileges": [\n\t\t\t\t\t{\n\t\t\t\t\t\t"resource": {\n\t\t\t\t\t\t\t"db": "config",\n\t\t\t\t\t\t\t"collection": ""\n\t\t\t\t\t\t},\n\t\t\t\t\t\t"actions": [\n\t\t\t\t\t\t\t"find"\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t}}' ++ mktemp + local LAST_OUT=/tmp/tmp.gRp8CtebEz ++ mktemp + local LAST_ERR=/tmp/tmp.7idAgWXIg9 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {"roles":[\n\t\t\t{\n\t\t\t\t"role": "role-three",\n\t\t\t\t"db": "admin",\n\t\t\t\t"privileges": [\n\t\t\t\t\t{\n\t\t\t\t\t\t"resource": {\n\t\t\t\t\t\t\t"db": "config",\n\t\t\t\t\t\t\t"collection": ""\n\t\t\t\t\t\t},\n\t\t\t\t\t\t"actions": [\n\t\t\t\t\t\t\t"find"\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t}}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.gRp8CtebEz perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.7idAgWXIg9 + rm /tmp/tmp.gRp8CtebEz /tmp/tmp.7idAgWXIg9 + return 0 + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Ys4cE0msEy +++ mktemp ++ local LAST_ERR=/tmp/tmp.csArtdY2zW ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.Ys4cE0msEy ++ cat /tmp/tmp.csArtdY2zW ++ rm /tmp/tmp.Ys4cE0msEy /tmp/tmp.csArtdY2zW ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.k6fRqHnssQ +++ mktemp ++ local LAST_ERR=/tmp/tmp.pOsL9rB945 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.k6fRqHnssQ ++ cat /tmp/tmp.pOsL9rB945 ++ rm /tmp/tmp.k6fRqHnssQ /tmp/tmp.pOsL9rB945 ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.nR5vyIoR8Y +++ mktemp ++ local LAST_ERR=/tmp/tmp.No0dKV7HvA ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.nR5vyIoR8Y ++ cat /tmp/tmp.No0dKV7HvA ++ rm /tmp/tmp.nR5vyIoR8Y /tmp/tmp.No0dKV7HvA ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness ++ get_role_cmd '"role-three"' ++ local 'role="role-three"' ++ cmd=$'(function() {\n\tvar role = db.getRole("role-three", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' ++ echo $'(function() {\n\tvar role = db.getRole("role-three", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + compare admin $'(function() {\n\tvar role = db.getRole("role-three", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 role-three + local database=admin + local $'command=(function() {\n\tvar role = db.getRole("role-three", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=role-three + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use admin\\n (function() {\n\tvar role = db.getRole("role-three", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + grep -E -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + local $'command=use admin\\n (function() {\n\tvar role = db.getRole("role-three", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + sed '/"userId"/d' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.Tsj9yuSSix +++ mktemp ++ local LAST_ERR=/tmp/tmp.0FLQQtnaRW ++ 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.Tsj9yuSSix ++ cat /tmp/tmp.0FLQQtnaRW ++ rm /tmp/tmp.Tsj9yuSSix /tmp/tmp.0FLQQtnaRW ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-three", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.vQjcnARvRJ ++ mktemp + local LAST_ERR=/tmp/tmp.oUzuhScZ3s + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use admin\\n (function() {\n\tvar role = db.getRole("role-three", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.vQjcnARvRJ + cat /tmp/tmp.oUzuhScZ3s + rm /tmp/tmp.vQjcnARvRJ /tmp/tmp.oUzuhScZ3s + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/role-three.json /tmp/tmp.GrKY0GUnUh/role-three + desc 'check creating multiple roles and the users in a single CR apply' + set +o xtrace ----------------------------------------------------------------------------------- check creating multiple roles and the users in a single CR apply ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {\n\t\t\t"roles": [\n\t\t\t\t{\n\t\t\t\t"role": "role-four",\n\t\t\t\t"db": "testAdmin1",\n\t\t\t\t"privileges": [\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin1",\n\t\t\t\t\t\t"collection": ""\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"find",\n\t\t\t\t\t\t"listIndexes",\n\t\t\t\t\t\t"listCollections"\n\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin1",\n\t\t\t\t\t\t"collection": "system.profile"\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"dbStats",\n\t\t\t\t\t\t"collStats",\n\t\t\t\t\t\t"indexStats"\n\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin1",\n\t\t\t\t\t\t"collection": "system.version"\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"find"\n\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t"role": "role-five",\n\t\t\t\t"db": "testAdmin2",\n\t\t\t\t"privileges": [\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin2",\n\t\t\t\t\t\t"collection": ""\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"find",\n\t\t\t\t\t\t"listIndexes",\n\t\t\t\t\t\t"listCollections"\n\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin2",\n\t\t\t\t\t\t"collection": "system.profile"\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"dbStats",\n\t\t\t\t\t\t"collStats",\n\t\t\t\t\t\t"indexStats"\n\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin2",\n\t\t\t\t\t\t"collection": "system.version"\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"find"\n\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t\t}\n\t\t\t],\n\t\t\t"users": [\n\t\t\t\t{\n\t\t\t\t"name": "user-five",\n\t\t\t\t"db": "testAdmin",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-one",\n\t\t\t\t\t"key": "userOnePassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{\n\t\t\t\t\t\t"name": "role-four",\n\t\t\t\t\t\t"db": "testAdmin1"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"name": "role-five",\n\t\t\t\t\t\t"db": "testAdmin2"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t"name": "user-six",\n\t\t\t\t"db": "testAdmin",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-one",\n\t\t\t\t\t"key": "userOnePassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{\n\t\t\t\t\t"name": "role-five",\n\t\t\t\t\t"db": "testAdmin2"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t}}' ++ mktemp + local LAST_OUT=/tmp/tmp.fUJtkY0Zvi ++ mktemp + local LAST_ERR=/tmp/tmp.fGwRLUb3a0 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=merge --patch $'{\n\t\t"spec": {\n\t\t\t"roles": [\n\t\t\t\t{\n\t\t\t\t"role": "role-four",\n\t\t\t\t"db": "testAdmin1",\n\t\t\t\t"privileges": [\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin1",\n\t\t\t\t\t\t"collection": ""\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"find",\n\t\t\t\t\t\t"listIndexes",\n\t\t\t\t\t\t"listCollections"\n\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin1",\n\t\t\t\t\t\t"collection": "system.profile"\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"dbStats",\n\t\t\t\t\t\t"collStats",\n\t\t\t\t\t\t"indexStats"\n\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin1",\n\t\t\t\t\t\t"collection": "system.version"\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"find"\n\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t"role": "role-five",\n\t\t\t\t"db": "testAdmin2",\n\t\t\t\t"privileges": [\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin2",\n\t\t\t\t\t\t"collection": ""\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"find",\n\t\t\t\t\t\t"listIndexes",\n\t\t\t\t\t\t"listCollections"\n\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin2",\n\t\t\t\t\t\t"collection": "system.profile"\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"dbStats",\n\t\t\t\t\t\t"collStats",\n\t\t\t\t\t\t"indexStats"\n\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t"resource": {\n\t\t\t\t\t\t"db": "testAdmin2",\n\t\t\t\t\t\t"collection": "system.version"\n\t\t\t\t\t},\n\t\t\t\t\t"actions": [\n\t\t\t\t\t\t"find"\n\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t\t}\n\t\t\t],\n\t\t\t"users": [\n\t\t\t\t{\n\t\t\t\t"name": "user-five",\n\t\t\t\t"db": "testAdmin",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-one",\n\t\t\t\t\t"key": "userOnePassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{\n\t\t\t\t\t\t"name": "role-four",\n\t\t\t\t\t\t"db": "testAdmin1"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t"name": "role-five",\n\t\t\t\t\t\t"db": "testAdmin2"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t"name": "user-six",\n\t\t\t\t"db": "testAdmin",\n\t\t\t\t"passwordSecretRef": {\n\t\t\t\t\t"name": "user-one",\n\t\t\t\t\t"key": "userOnePassKey"\n\t\t\t\t},\n\t\t\t\t"roles": [\n\t\t\t\t\t{\n\t\t\t\t\t"name": "role-five",\n\t\t\t\t\t"db": "testAdmin2"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t}}' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.fUJtkY0Zvi perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.fGwRLUb3a0 + rm /tmp/tmp.fUJtkY0Zvi /tmp/tmp.fGwRLUb3a0 + return 0 + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready.OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.sDrGy4Zd7D +++ mktemp ++ local LAST_ERR=/tmp/tmp.BCtloboHeS ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.sDrGy4Zd7D ++ cat /tmp/tmp.BCtloboHeS ++ rm /tmp/tmp.sDrGy4Zd7D /tmp/tmp.BCtloboHeS ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready.OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.M1N9niUFf9 +++ mktemp ++ local LAST_ERR=/tmp/tmp.Bic7OCJCpw ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.M1N9niUFf9 ++ cat /tmp/tmp.Bic7OCJCpw ++ rm /tmp/tmp.M1N9niUFf9 /tmp/tmp.Bic7OCJCpw ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.1QE4JSCzQo +++ mktemp ++ local LAST_ERR=/tmp/tmp.j21UQp8abe ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.1QE4JSCzQo ++ cat /tmp/tmp.j21UQp8abe ++ rm /tmp/tmp.1QE4JSCzQo /tmp/tmp.j21UQp8abe ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness ++ get_role_cmd '"role-four"' ++ local 'role="role-four"' ++ cmd=$'(function() {\n\tvar role = db.getRole("role-four", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' ++ echo $'(function() {\n\tvar role = db.getRole("role-four", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + compare testAdmin1 $'(function() {\n\tvar role = db.getRole("role-four", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 role-four + local database=testAdmin1 + local $'command=(function() {\n\tvar role = db.getRole("role-four", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=role-four + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use testAdmin1\\n (function() {\n\tvar role = db.getRole("role-four", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use testAdmin1\\n (function() {\n\tvar role = db.getRole("role-four", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + grep -E -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' ++ awk -F: '{print $2}' ++ echo .svc.cluster.local + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.OKtCyDg4WI +++ mktemp ++ local LAST_ERR=/tmp/tmp.Rq1MHrNHl5 ++ 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.OKtCyDg4WI ++ cat /tmp/tmp.Rq1MHrNHl5 ++ rm /tmp/tmp.OKtCyDg4WI /tmp/tmp.Rq1MHrNHl5 ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use testAdmin1\\n (function() {\n\tvar role = db.getRole("role-four", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.por2vArhrP ++ mktemp + local LAST_ERR=/tmp/tmp.T29HXQaMWq + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use testAdmin1\\n (function() {\n\tvar role = db.getRole("role-four", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.por2vArhrP + cat /tmp/tmp.T29HXQaMWq + rm /tmp/tmp.por2vArhrP /tmp/tmp.T29HXQaMWq + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/role-four.json /tmp/tmp.GrKY0GUnUh/role-four ++ get_role_cmd '"role-five"' ++ local 'role="role-five"' ++ cmd=$'(function() {\n\tvar role = db.getRole("role-five", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' ++ echo $'(function() {\n\tvar role = db.getRole("role-five", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + compare testAdmin2 $'(function() {\n\tvar role = db.getRole("role-five", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 role-five + local database=testAdmin2 + local $'command=(function() {\n\tvar role = db.getRole("role-five", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=role-five + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + grep -E -v 'I NETWORK|W NETWORK|F 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:' + run_mongos $'use testAdmin2\\n (function() {\n\tvar role = db.getRole("role-five", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + sed '/"userId"/d' + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + local $'command=use testAdmin2\\n (function() {\n\tvar role = db.getRole("role-five", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.mouGCOqGyI +++ mktemp ++ local LAST_ERR=/tmp/tmp.pM05iehqGe ++ 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.mouGCOqGyI ++ cat /tmp/tmp.pM05iehqGe ++ rm /tmp/tmp.mouGCOqGyI /tmp/tmp.pM05iehqGe ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use testAdmin2\\n (function() {\n\tvar role = db.getRole("role-five", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.Btq6OU32SR ++ mktemp + local LAST_ERR=/tmp/tmp.zZTBI622Pz + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use testAdmin2\\n (function() {\n\tvar role = db.getRole("role-five", {showPrivileges: true, showAuthenticationRestrictions: true});\n\tvar roles = role.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\trole.roles = roles;\n\tprintjson(role);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Btq6OU32SR + cat /tmp/tmp.zZTBI622Pz + rm /tmp/tmp.Btq6OU32SR /tmp/tmp.zZTBI622Pz + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/role-five.json /tmp/tmp.GrKY0GUnUh/role-five ++ get_user_cmd '"user-five"' ++ local 'user="user-five"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-five");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-five");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare testAdmin $'(function() {\n\tvar user = db.getUser("user-five");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-five + local database=testAdmin + local $'command=(function() {\n\tvar user = db.getUser("user-five");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-five + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use testAdmin\\n (function() {\n\tvar user = db.getUser("user-five");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use testAdmin\\n (function() {\n\tvar user = db.getUser("user-five");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + grep -E -v 'I NETWORK|W NETWORK|F 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 port=27017 + local mongo_bin=mongo + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' ++ echo .svc.cluster.local ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.WJOofFdSrM +++ mktemp ++ local LAST_ERR=/tmp/tmp.vtwYBuk1uq ++ 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.WJOofFdSrM ++ cat /tmp/tmp.vtwYBuk1uq ++ rm /tmp/tmp.WJOofFdSrM /tmp/tmp.vtwYBuk1uq ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use testAdmin\\n (function() {\n\tvar user = db.getUser("user-five");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.UhT5TMHEfZ ++ mktemp + local LAST_ERR=/tmp/tmp.v6cBkwM5em + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use testAdmin\\n (function() {\n\tvar user = db.getUser("user-five");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.UhT5TMHEfZ + cat /tmp/tmp.v6cBkwM5em + rm /tmp/tmp.UhT5TMHEfZ /tmp/tmp.v6cBkwM5em + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-five.json /tmp/tmp.GrKY0GUnUh/user-five ++ get_user_cmd '"user-six"' ++ local 'user="user-six"' ++ cmd=$'(function() {\n\tvar user = db.getUser("user-six");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' ++ echo $'(function() {\n\tvar user = db.getUser("user-six");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + compare testAdmin $'(function() {\n\tvar user = db.getUser("user-six");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 user-six + local database=testAdmin + local $'command=(function() {\n\tvar user = db.getUser("user-six");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local target=user-six + [[ docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0 =~ 5\.0 ]] + run_mongos $'use testAdmin\\n (function() {\n\tvar user = db.getUser("user-six");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 mongodb + local $'command=use testAdmin\\n (function() {\n\tvar user = db.getUser("user-six");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();' + local uri=userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635 + local driver=mongodb + local suffix=.svc.cluster.local + local mongo_flag= + local port=27017 + local mongo_bin=mongo + grep -E -v 'I NETWORK|W NETWORK|F 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:' ++ echo .svc.cluster.local + /usr/sbin/sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' + sed '/"userId"/d' ++ awk -F: '{print $2}' + suffix_port= + [[ -z '' ]] + suffix=.svc.cluster.local:27017 ++ kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.DeBMmlu6C1 +++ mktemp ++ local LAST_ERR=/tmp/tmp.P81eb0SdjI ++ 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.DeBMmlu6C1 ++ cat /tmp/tmp.P81eb0SdjI ++ rm /tmp/tmp.DeBMmlu6C1 /tmp/tmp.P81eb0SdjI ++ return 0 + local client_container=psmdb-client-bb8b97679-b5gjd + kubectl_bin exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use testAdmin\\n (function() {\n\tvar user = db.getUser("user-six");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' ++ mktemp + local LAST_OUT=/tmp/tmp.ZTtLZgqhUU ++ mktemp + local LAST_ERR=/tmp/tmp.WU9V2Po4Ek + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl exec psmdb-client-bb8b97679-b5gjd -- bash -c $'printf \'use testAdmin\\n (function() {\n\tvar user = db.getUser("user-six");\n\tvar roles = user.roles;\n\troles.sort((a, b) => {\n\t\tif (a.role < b.role) return -1;\n\t\tif (a.role > b.role) return 1;\n\t\treturn 0;\n\t});\n\tuser.roles = roles;\n\tprintjson(user);\n\t})();\\n\' | mongo mongodb://userAdmin:userAdmin123456@some-name-mongos.custom-users-roles-sharded-635.svc.cluster.local:27017/admin ' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ZTtLZgqhUU + cat /tmp/tmp.WU9V2Po4Ek + rm /tmp/tmp.ZTtLZgqhUU /tmp/tmp.WU9V2Po4Ek + return 0 + diff /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/e2e-tests/custom-users-roles-sharded/compare/user-six.json /tmp/tmp.GrKY0GUnUh/user-six + destroy custom-users-roles-sharded-635 + local namespace=custom-users-roles-sharded-635 + local ignore_logs=true + [[ 0 == 1 ]] + desc 'destroy cluster/operator and all other resources' + set +o xtrace ----------------------------------------------------------------------------------- destroy cluster/operator and all other resources ----------------------------------------------------------------------------------- + '[' true == false ']' + delete_backups + desc 'Delete psmdb-backup' + set +o xtrace ----------------------------------------------------------------------------------- Delete psmdb-backup ----------------------------------------------------------------------------------- ++ kubectl_bin get psmdb-backup --no-headers ++ wc -l +++ mktemp ++ local LAST_OUT=/tmp/tmp.oaoFC6aDde +++ mktemp ++ local LAST_ERR=/tmp/tmp.vVefOxiyio ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb-backup --no-headers ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.oaoFC6aDde ++ cat /tmp/tmp.vVefOxiyio No resources found in custom-users-roles-sharded-635 namespace. ++ rm /tmp/tmp.oaoFC6aDde /tmp/tmp.vVefOxiyio ++ return 0 + '[' 0 '!=' 0 ']' + 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-2277/deploy/crd.yaml --ignore-not-found --wait=false ++ mktemp + local LAST_OUT=/tmp/tmp.Qtfy2XMGyX ++ mktemp + local LAST_ERR=/tmp/tmp.gAdgTqJQOp + 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-2277/deploy/crd.yaml --ignore-not-found --wait=false + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Qtfy2XMGyX 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.gAdgTqJQOp + rm /tmp/tmp.Qtfy2XMGyX /tmp/tmp.gAdgTqJQOp + return 0 ++ yq eval .metadata.name /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2277/deploy/crd.yaml ++ grep -v '\-\-\-' grep: warning: stray \ before - grep: warning: stray \ before - + 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.maDpAQwror ++ mktemp + local LAST_ERR=/tmp/tmp.Q4127jXmvK + 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.maDpAQwror + cat /tmp/tmp.Q4127jXmvK + rm /tmp/tmp.maDpAQwror /tmp/tmp.Q4127jXmvK + return 0 + for crd_name in $(yq eval '.metadata.name' "${src_dir}/deploy/crd.yaml" | grep -v '\-\-\-') + grep -v NAMESPACE + kubectl get perconaservermongodbrestores.psmdb.percona.com --all-namespaces -o wide + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbrestores.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbrestores" + kubectl patch perconaservermongodbrestores.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbrestores" + : + kubectl_bin wait --for=delete crd perconaservermongodbrestores.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.I3IKcDsVDH ++ mktemp + local LAST_ERR=/tmp/tmp.uvMDsSb3Qj + 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.I3IKcDsVDH + cat /tmp/tmp.uvMDsSb3Qj + rm /tmp/tmp.I3IKcDsVDH /tmp/tmp.uvMDsSb3Qj + return 0 + for crd_name in $(yq eval '.metadata.name' "${src_dir}/deploy/crd.yaml" | grep -v '\-\-\-') + kubectl get perconaservermongodbs.psmdb.percona.com --all-namespaces -o wide + grep -v NAMESPACE + xargs -L 1 sh -xc 'kubectl patch perconaservermongodbs.psmdb.percona.com -n $0 $1 --type=merge -p "{\"metadata\":{\"finalizers\":[]}}"' error: the server doesn't have a resource type "perconaservermongodbs" + kubectl patch perconaservermongodbs.psmdb.percona.com -n sh --type=merge -p '{"metadata":{"finalizers":[]}}' error: the server doesn't have a resource type "perconaservermongodbs" + : + kubectl_bin wait --for=delete crd perconaservermongodbs.psmdb.percona.com ++ mktemp + local LAST_OUT=/tmp/tmp.i44EOvpeen ++ mktemp + local LAST_ERR=/tmp/tmp.aoeZLVt8Yy + 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.i44EOvpeen + cat /tmp/tmp.aoeZLVt8Yy + rm /tmp/tmp.i44EOvpeen /tmp/tmp.aoeZLVt8Yy + 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-2277/deploy/cw-rbac.yaml --ignore-not-found ++ mktemp + local LAST_OUT=/tmp/tmp.lY3drmxXIE ++ mktemp + local LAST_ERR=/tmp/tmp.UeqjAhdMKc + 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-2277/deploy/cw-rbac.yaml --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.lY3drmxXIE 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.UeqjAhdMKc + rm /tmp/tmp.lY3drmxXIE /tmp/tmp.UeqjAhdMKc + return 0 + destroy_cert_manager + kubectl_bin delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.io2HIA4ir8 ++ mktemp + local LAST_ERR=/tmp/tmp.7SLPt1IYxj + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml + exit_status=1 + set -e + '[' 1 '!=' 0 -a -n 1 ']' + cat /tmp/tmp.io2HIA4ir8 + cat /tmp/tmp.7SLPt1IYxj Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": namespaces "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "challenges.acme.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "orders.acme.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "certificaterequests.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "certificates.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "clusterissuers.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "issuers.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-issuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-certificates" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-orders" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-challenges" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-cluster-view" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-view" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-edit" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-issuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-certificates" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-orders" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-challenges" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-tokenrequest" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-webhook:dynamic-serving" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-tokenrequest" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-webhook:dynamic-serving" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": mutatingwebhookconfigurations.admissionregistration.k8s.io "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": validatingwebhookconfigurations.admissionregistration.k8s.io "cert-manager-webhook" not found + sleep 0 + for i in $(seq 0 2) + set +e + kubectl delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml + exit_status=1 + set -e + '[' 1 '!=' 0 -a -n 1 ']' + cat /tmp/tmp.io2HIA4ir8 + cat /tmp/tmp.7SLPt1IYxj Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": namespaces "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "challenges.acme.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "orders.acme.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "certificaterequests.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "certificates.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "clusterissuers.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "issuers.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-issuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-certificates" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-orders" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-challenges" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-cluster-view" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-view" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-edit" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-issuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-certificates" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-orders" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-challenges" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-tokenrequest" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-webhook:dynamic-serving" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-tokenrequest" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-webhook:dynamic-serving" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": mutatingwebhookconfigurations.admissionregistration.k8s.io "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": validatingwebhookconfigurations.admissionregistration.k8s.io "cert-manager-webhook" not found + sleep 4 + for i in $(seq 0 2) + set +e + kubectl delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml + exit_status=1 + set -e + '[' 1 '!=' 0 -a -n 1 ']' + cat /tmp/tmp.io2HIA4ir8 + cat /tmp/tmp.7SLPt1IYxj Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": namespaces "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "challenges.acme.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "orders.acme.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "certificaterequests.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "certificates.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "clusterissuers.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "issuers.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-issuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-certificates" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-orders" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-challenges" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-cluster-view" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-view" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-edit" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-issuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-certificates" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-orders" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-challenges" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-tokenrequest" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-webhook:dynamic-serving" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-tokenrequest" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-webhook:dynamic-serving" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": mutatingwebhookconfigurations.admissionregistration.k8s.io "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": validatingwebhookconfigurations.admissionregistration.k8s.io "cert-manager-webhook" not found + sleep 8 + cat /tmp/tmp.io2HIA4ir8 + cat /tmp/tmp.7SLPt1IYxj Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": namespaces "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "challenges.acme.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "orders.acme.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "certificaterequests.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "certificates.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "clusterissuers.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": customresourcedefinitions.apiextensions.k8s.io "issuers.cert-manager.io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": serviceaccounts "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-issuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-certificates" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-orders" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-challenges" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-cluster-view" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-view" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-edit" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterroles.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-issuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-certificates" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-orders" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-challenges" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": clusterrolebindings.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-tokenrequest" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": roles.rbac.authorization.k8s.io "cert-manager-webhook:dynamic-serving" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager:leaderelection" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-tokenrequest" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": rolebindings.rbac.authorization.k8s.io "cert-manager-webhook:dynamic-serving" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": services "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager-cainjector" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": deployments.apps "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": mutatingwebhookconfigurations.admissionregistration.k8s.io "cert-manager-webhook" not found Error from server (NotFound): error when deleting "https://github.com/cert-manager/cert-manager/releases/download/v1.19.3/cert-manager.yaml": validatingwebhookconfigurations.admissionregistration.k8s.io "cert-manager-webhook" not found + rm /tmp/tmp.io2HIA4ir8 /tmp/tmp.7SLPt1IYxj + return 1 + true + '[' -n '' ']' + '[' -n psmdb-operator ']' + kubectl_bin delete --grace-period=0 --force=true namespace custom-users-roles-sharded-635 + rm -rf /tmp/tmp.GrKY0GUnUh + kubectl_bin delete --grace-period=0 --force=true namespace psmdb-operator ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.LcTTrNrglr + local LAST_OUT=/tmp/tmp.0ByT26jAHN ++ mktemp + desc 'test passed' + set +o xtrace ----------------------------------------------------------------------------------- test passed ----------------------------------------------------------------------------------- ++ mktemp + local LAST_ERR=/tmp/tmp.oXQShLfwUo + 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 custom-users-roles-sharded-635 + local LAST_ERR=/tmp/tmp.AWecvTZOSi + 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 psmdb-operator