Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-5059

duplicate entry in spec.plugins will cause console panic

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done-Errata
    • Major
    • 4.14.0
    • 4.13
    • Management Console
    • None
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, when enabling a single plugin in the console operator's configuration, the redeployed console will fail. With this update, the list of plugins is now unique and pods run as expected. (link:https://issues.redhat.com/browse/OCPBUGS-5059[*OCPBUGS-5059*])
      Show
      Previously, when enabling a single plugin in the console operator's configuration, the redeployed console will fail. With this update, the list of plugins is now unique and pods run as expected. (link: https://issues.redhat.com/browse/OCPBUGS-5059 [* OCPBUGS-5059 *])
    • Bug Fix
    • Done

    Description

      Description of problem:

      console will have panic error when duplicate entry is set in spec.plugins

      Version-Release number of selected component (if applicable):

      4.13.0-0.nightly-2022-12-19-122634

      How reproducible:

      Always

      Steps to Reproduce:

      1. Create console-demo-plugin manifests
      $ oc apply -f dynamic-demo-plugin/oc-manifest.yaml 
      namespace/console-demo-plugin created
      deployment.apps/console-demo-plugin created
      service/console-demo-plugin created
      consoleplugin.console.openshift.io/console-demo-plugin created 
      2.Enable console-demo-plugin
      $ oc patch consoles.operator.openshift.io cluster --patch '{ "spec": { "plugins": ["console-demo-plugin"] } }' --type=merge 
      console.operator.openshift.io/cluster patched
      3. Add a duplicate entry in spec.plugins in consoles.operator/cluster 
      $ oc patch consoles.operator.openshift.io cluster --patch '{ "spec": { "plugins": ["console-demo-plugin", "console-demo-plugin"] } }' --type=merge  console.operator.openshift.io/cluster patched
      $ oc get consoles.operator cluster -o json | jq .spec.plugins
      [
        "console-demo-plugin",
        "console-demo-plugin"
      ]
      4. check console pods status
      $ oc get pods -n openshift-console                        
      NAME                         READY   STATUS             RESTARTS      AGE
      console-6bcc87c7b4-6g2cf     0/1     CrashLoopBackOff   1 (21s ago)   50s
      console-6bcc87c7b4-9g6kk     0/1     CrashLoopBackOff   3 (3s ago)    50s
      console-7dc78ffd78-sxvcv     1/1     Running            0             2m58s
      downloads-758fc74758-9k426   1/1     Running            0             3h18m
      downloads-758fc74758-k4q72   1/1     Running            0             3h21m
      

      Actual results:

      3. console pods will be in CrashLoopBackOff status
      $ oc logs console-6bcc87c7b4-9g6kk -n openshift-console
      W1220 06:48:37.279871       1 main.go:228] Flag inactivity-timeout is set to less then 300 seconds and will be ignored!
      I1220 06:48:37.279889       1 main.go:238] The following console plugins are enabled:
      I1220 06:48:37.279898       1 main.go:240]  - console-demo-plugin
      I1220 06:48:37.279911       1 main.go:354] cookies are secure!
      I1220 06:48:37.331802       1 server.go:607] The following console endpoints are now proxied to these services:
      I1220 06:48:37.331843       1 server.go:610]  - /api/proxy/plugin/console-demo-plugin/thanos-querier/ -> https://thanos-querier.openshift-monitoring.svc.cluster.local:9091
      I1220 06:48:37.331884       1 server.go:610]  - /api/proxy/plugin/console-demo-plugin/thanos-querier/ -> https://thanos-querier.openshift-monitoring.svc.cluster.local:9091
      panic: http: multiple registrations for /api/proxy/plugin/console-demo-plugin/thanos-querier/goroutine 1 [running]:
      net/http.(*ServeMux).Handle(0xc0005b6600, {0xc0005d9a40, 0x35}, {0x35aaf60?, 0xc000735260})
          /usr/lib/golang/src/net/http/server.go:2503 +0x239
      github.com/openshift/console/pkg/server.(*Server).HTTPHandler.func1({0xc0005d9940?, 0x35?}, {0x35aaf60, 0xc000735260})
          /go/src/github.com/openshift/console/pkg/server/server.go:245 +0x149
      github.com/openshift/console/pkg/server.(*Server).HTTPHandler(0xc000056c00)
          /go/src/github.com/openshift/console/pkg/server/server.go:621 +0x330b
      main.main()
          /go/src/github.com/openshift/console/cmd/bridge/main.go:785 +0x5ff5

      Expected results:

      3. console pods should be running well

      Additional info:

       

       

       

       

      Attachments

        Issue Links

          Activity

            People

              jhadvig@redhat.com Jakub Hadvig
              rhn-support-yapei YaDan Pei
              YaDan Pei YaDan Pei
              Olivia Payne Olivia Payne
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: