Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-12846

Upgrade cant get jobs.batch when using non-admin user

XMLWordPrintable

      When using following series of commands:

      oc login -u admin -p admin <cluster>
      
      docker run --rm --entrypoint syndesis-operator -v $HOME/.kube/config:/tmp/kube/config:z syndesis/syndesis-operator:1.8.13 install cluster --config /tmp/kube/config --namespace avano-syndesis
      
      docker run --rm --entrypoint syndesis-operator -v $HOME/.kube/config:/tmp/kube/config:z syndesis/syndesis-operator:1.8.13 grant -u developer --config /tmp/kube/config --namespace avano-syndesis
      
      oc login -u developer -p developer <cluster>
      
      docker run --rm --entrypoint syndesis-operator -v $HOME/.kube/config:/tmp/kube/config:z syndesis/syndesis-operator:1.8.13 install operator --config /tmp/kube/config --namespace avano-syndesis
      
      docker run --rm --entrypoint syndesis-operator -v $HOME/.kube/config:/tmp/kube/config:z syndesis/syndesis-operator:1.8.13 install app --config /tmp/kube/config --namespace avano-syndesis
      
      <wait for syndesis deployment>
      
      oc login -u admin -p admin <cluster>
      
       docker run --rm --entrypoint syndesis-operator -v $HOME/.kube/config:/tmp/kube/config:z syndesis/syndesis-operator:1.9.1-20200127 install cluster --config /tmp/kube/config --namespace avano-syndesis
      
       docker run --rm --entrypoint syndesis-operator -v $HOME/.kube/config:/tmp/kube/config:z syndesis/syndesis-operator:1.9.1-20200127 grant -u developer --config /tmp/kube/config --namespace avano-syndesis
      
      oc login -u developer -p developer <cluster>
      
      docker run --rm --entrypoint syndesis-operator -v $HOME/.kube/config:/tmp/kube/config:z syndesis/syndesis-operator:1.9.1-20200127 install operator --config /tmp/kube/config --namespace avano-syndesis
      

      the operator can't create the job:

      {"level":"info","ts":1580114543.433892,"logger":"cmd","msg":"Go Version: go1.12"}
      {"level":"info","ts":1580114543.4339893,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
      {"level":"info","ts":1580114543.4340155,"logger":"cmd","msg":"Version of operator-sdk: v0.14.0"}
      {"level":"info","ts":1580114543.4340377,"logger":"cmd","msg":"Syndesis Operator Version: 1.9.1-20200127"}
      {"level":"info","ts":1580114543.434053,"logger":"cmd","msg":"Syndesis Operator Image: syndesis/syndesis-operator"}
      {"level":"info","ts":1580114543.4369488,"logger":"leader","msg":"Trying to become the leader."}
      {"level":"info","ts":1580114544.4096584,"logger":"leader","msg":"No pre-existing lock was found."}
      {"level":"info","ts":1580114544.430836,"logger":"leader","msg":"Became the leader."}
      {"level":"info","ts":1580114545.3868003,"logger":"controller-runtime.metrics","msg":"metrics server is starting to listen","addr":"0.0.0.0:8383"}
      {"level":"info","ts":1580114545.3875422,"logger":"cmd","msg":"registering resource schemes."}
      {"level":"info","ts":1580114547.408421,"logger":"metrics","msg":"Metrics Service object updated","Service.Name":"syndesis-operator-metrics","Service.Namespace":"avano-syndesis"}
      {"level":"info","ts":1580114547.408999,"logger":"controller-runtime.manager","msg":"starting metrics server","path":"/metrics"}
      {"level":"info","ts":1580114547.4104905,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"syndesis-controller","source":"kind source: /, Kind="}
      {"level":"info","ts":1580114547.51104,"logger":"controller-runtime.controller","msg":"Starting Controller","controller":"syndesis-controller"}
      {"level":"info","ts":1580114547.5111194,"logger":"controller-runtime.controller","msg":"Starting workers","controller":"syndesis-controller","worker count":1}
      {"level":"info","ts":1580114550.5227213,"logger":"controller","msg":"syndesis resource changed in the meantime, requeue and rerun in 5 seconds","name":"app"}
      {"level":"info","ts":1580114550.5229182,"logger":"action","msg":"Upgrading syndesis resource ","type":"upgrade","name":"app","current version":"1.8.13","target version":"1.9.1-20200127"}
      {"level":"info","ts":1580114550.5229359,"logger":"action","msg":"running step","type":"upgrade","step":"Scale down"}
      {"level":"info","ts":1580114550.5229497,"logger":"action","msg":"scale DeploymentConfig","type":"upgrade","direction":"down","deployments":["syndesis-meta","syndesis-server"]}
      {"level":"info","ts":1580114550.6235127,"logger":"action","msg":"scaling DeploymentConfigs","type":"upgrade","name":"syndesis-meta","desired replicas":0,"replicas":1}
      {"level":"info","ts":1580114550.6340306,"logger":"action","msg":"scaling DeploymentConfigs","type":"upgrade","name":"syndesis-server","desired replicas":0,"replicas":1}
      {"level":"info","ts":1580114550.6456394,"logger":"action","msg":"waiting for DeploymentConfig to scale","type":"upgrade","direction":"down","deployments":["syndesis-meta","syndesis-server"]}
      {"level":"info","ts":1580114560.6460214,"logger":"action","msg":"deploymentConfig successfully scaled","type":"upgrade","name":"syndesis-meta","desired replicas":0,"available replicas":0}
      {"level":"info","ts":1580114560.6462083,"logger":"action","msg":"deploymentConfig successfully scaled","type":"upgrade","name":"syndesis-server","desired replicas":0,"available replicas":0}
      {"level":"info","ts":1580114560.6462183,"logger":"action","msg":"running step","type":"upgrade","step":"Backup"}
      {"level":"info","ts":1580114560.6462681,"logger":"backup","msg":"starting backup for syndesis","action":"backup"}
      {"level":"info","ts":1580114561.9242184,"logger":"backup","msg":"backup for syndesis done","action":"backup"}
      {"level":"info","ts":1580114561.9242704,"logger":"action","msg":"running step","type":"upgrade","step":"Database migration"}
      {"level":"error","ts":1580114562.027408,"logger":"action","msg":"error while running migrations","type":"upgrade","step":"Database migration","error":"jobs.batch \"upgrade-db-migration\" is forbidden: User \"system:serviceaccount:avano-syndesis:syndesis-operator\" cannot get jobs.batch in the namespace \"avano-syndesis\": no RBAC policy matched","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/syndesisio/syndesis/install/operator/pkg/syndesis/upgrade.(*migration).run\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/syndesis/upgrade/migrations.go:75\ngithub.com/syndesisio/syndesis/install/operator/pkg/syndesis/upgrade.(*upgrade).Upgrade\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/syndesis/upgrade/upgrade.go:100\ngithub.com/syndesisio/syndesis/install/operator/pkg/syndesis/action.(*upgradeAction).Execute\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/syndesis/action/upgrade.go:58\ngithub.com/syndesisio/syndesis/install/operator/pkg/controller/syndesis.(*ReconcileSyndesis).Reconcile\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/controller/syndesis/syndesis_controller.go:125\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:256\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
      {"level":"error","ts":1580114562.0275862,"logger":"action","msg":"Failure while upgrading Syndesis","type":"upgrade","name":"app","target version":"1.9.1-20200127","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/syndesisio/syndesis/install/operator/pkg/syndesis/action.(*upgradeAction).Execute\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/syndesis/action/upgrade.go:65\ngithub.com/syndesisio/syndesis/install/operator/pkg/controller/syndesis.(*ReconcileSyndesis).Reconcile\n\tsrc/github.com/syndesisio/syndesis/install/operator/pkg/controller/syndesis/syndesis_controller.go:125\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:256\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\tsrc/github.com/syndesisio/syndesis/install/operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
      
      

              lgarciaac Luis GarcĂ­a Acosta
              avano@redhat.com Andrej Vano
              Andrej Vano Andrej Vano
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: