Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-7800

Invalid versions cause panic

XMLWordPrintable

      Invalid version causes `panic: odd number of arguments passed as key-value pairs for logging` on activemq-artemis-operator v1.0.10 because the number of arguments passed as key-value pairs for logging at the line controllers/activemqartemis_reconciler.go:180 is odd:
      ```
      reqLogger.Error(verr, "failed to get compact version for", customResource.Spec.Version)
      ```

      There is no way to reproduce this issue using the main branch because on the branch when a better validation stops the reconciliation before the line that is causing this issue. However, the wrong line is still there.

      See the stack trace for further details:
      ```
      goroutine 1051 [running]:
      go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00056cd80,

      {0xc00043ccc0, 0x1, 0x1})
      /home/dbruscin/go/pkg/mod/go.uber.org/zap@v1.19.1/zapcore/entry.go:232 +0x65c
      go.uber.org/zap.(*Logger).DPanic(0xc000735980, {0x28546d8, 0x3d}, {0xc00043ccc0, 0x1, 0x1}

      )
      /home/dbruscin/go/pkg/mod/go.uber.org/zap@v1.19.1/logger.go:220 +0x6b
      github.com/go-logr/zapr.(*zapLogger).handleFields(0xc00038fbc0, 0xffffffffffffffff,

      {0xc0009289e0, 0x1, 0x1}, {0xc00043cc40, 0x1, 0x1})
      /home/dbruscin/go/pkg/mod/github.com/go-logr/zapr@v1.2.0/zapr.go:145 +0xc89
      github.com/go-logr/zapr.(*zapLogger).Error(0xc00038fbc0, {0x29a38a0, 0xc00013cae0}, {0x2813e11, 0x21}, {0xc0009289e0, 0x1, 0x1}

      )
      /home/dbruscin/go/pkg/mod/github.com/go-logr/zapr@v1.2.0/zapr.go:204 +0x215
      github.com/go-logr/logr.Logger.Error({{0x29f98e8, 0xc00038fbc0}, 0x0},

      {0x29a38a0, 0xc00013cae0}

      ,

      {0x2813e11, 0x21}

      ,

      {0xc0009289e0, 0x1, 0x1}

      )
      /home/dbruscin/go/pkg/mod/github.com/go-logr/logr@v1.2.0/logr.go:265 +0x11d
      github.com/artemiscloud/activemq-artemis-operator/controllers.(*ActiveMQArtemisReconcilerImpl).NewPodTemplateSpecForCR(_, _, {{0xc0000535f0, 0x11}, {{0xc0000535f0, 0x11},

      {0x0, 0x0}, {0x27e2d04, 0x2}, ...}, ...}, ...)
      /home/dbruscin/Workspace/temp/activemq-artemis-operator/controllers/activemqartemis_reconciler.go:1805 +0x2fce
      github.com/artemiscloud/activemq-artemis-operator/controllers.(*ActiveMQArtemisReconcilerImpl).NewStatefulSetForCR(_, _, {{0xc0000535f0, 0x11}, {{0xc0000535f0, 0x11}, {0x0, 0x0}

      ,

      {0x27e2d04, 0x2}, ...}, ...}, ...)
      /home/dbruscin/Workspace/temp/activemq-artemis-operator/controllers/activemqartemis_reconciler.go:2492 +0x2a7
      github.com/artemiscloud/activemq-artemis-operator/controllers.(*ActiveMQArtemisReconcilerImpl).ProcessStatefulSet(_, _, {{0xc0000535f0, 0x11}, {{0xc0000535f0, 0x11}, {0x0, 0x0}, {0x27e2d04, 0x2}

      , ...}, ...}, ...)
      /home/dbruscin/Workspace/temp/activemq-artemis-operator/controllers/activemqartemis_reconciler.go:224 +0x43f
      github.com/artemiscloud/activemq-artemis-operator/controllers.(*ActiveMQArtemisReconcilerImpl).Process(_, _, {{0xc0000535f0, 0x11}, {{0xc0000535f0, 0x11},

      {0x0, 0x0}

      ,

      {0x27e2d04, 0x2}

      , ...}, ...}, ...)
      /home/dbruscin/Workspace/temp/activemq-artemis-operator/controllers/activemqartemis_reconciler.go:133 +0x529
      github.com/artemiscloud/activemq-artemis-operator/controllers.(*ActiveMQArtemisReconciler).Reconcile(0xc0000d2d00,

      {0x29db358, 0xc00059f170}, {0xc0007a2d86, 0x7}, {0xc0000535f0, 0x11})
      /home/dbruscin/Workspace/temp/activemq-artemis-operator/controllers/activemqartemis_controller.go:161 +0x807
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0xc00070a790, {0x29db358, 0xc00059f170}

      , {{

      {0xc0007a2d86, 0x7}

      ,

      {0xc0000535f0, 0x11}

      }})
      /home/dbruscin/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.1/pkg/internal/controller/controller.go:114 +0x370
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc00070a790,

      {0x29db358, 0xc00059f0b0}

      ,

      {0x2609ce0, 0xc0006b8540}

      )
      /home/dbruscin/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.1/pkg/internal/controller/controller.go:311 +0x430
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc00070a790,

      {0x29db2b0, 0xc000d0ed40}

      )
      /home/dbruscin/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.1/pkg/internal/controller/controller.go:266 +0x405
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
      /home/dbruscin/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.1/pkg/internal/controller/controller.go:227 +0xe8
      created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2
      /home/dbruscin/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.1/pkg/internal/controller/controller.go:223 +0x565
      ```

              dbruscin Domenico Francesco Bruscino
              rh-messaging-ci Messaging CI
              Roman Vais Roman Vais (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: