Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-8066

Openstack-operator panics when rabbit is missing annotations in os ctlplane CR

XMLWordPrintable

    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • ?
    • ?
    • ?
    • None
    • Moderate

      • related compose
        • Upstream operator images with downstream service images
        • _$ oc get pods -n openstack-operators openstack-operator-controller-manager-7bd4bbb99c-c6lq2 -oyaml | grep image | grep openstack-operator
              image: quay.io/openstack-k8s-operators/openstack-operator@sha256:c036f2eed4ad0c850bed365d7214a1b4145ce82456deb33698d8600347c91f6b_
      • How reproducible
        • Everytime
      • _Expected result
        _
        • The openstack-operator doesn't let the user to apply such a CR. The annotations field could be made required
        • Other option would be to check the CR in code and output a log describing what's the issue. Panick doesn't tell the user anything unfortunatelly
      • Actual results
        • Openstack-operator panicks and doesn't inform the user about why except for a stack trace.
      • Additional info:
        • Stack trace
        • 2024-06-27T13:13:50.417Z    INFO    Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference    {"controller": "openstackcontrolplane", "controllerGroup": "core.openstack.org", "controllerKind": "OpenStackControlPlane", "OpenStackControlPlane": {"name":"openstack-galera-network-isolation","namespace":"openstack"}, "namespace": "openstack", "name": "openstack-galera-network-isolation", "reconcileID": "ed0c0116-5aab-4b33-bc65-abfe027fd577"}
          panic: runtime error: invalid memory address or nil pointer dereference [recovered]
              panic: runtime error: invalid memory address or nil pointer dereference
          [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x1a84773]goroutine 907 [running]:
          sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
              /opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/internal/controller/controller.go:116 +0x1fa
          panic({0x1cf5f60, 0x321dc60})
              /usr/lib/golang/src/runtime/panic.go:884 +0x213
          github.com/openstack-k8s-operators/openstack-operator/pkg/openstack.reconcileRabbitMQ.func1()
              /remote-source/pkg/openstack/rabbitmq.go:331 +0x753
          sigs.k8s.io/controller-runtime/pkg/controller/controllerutil.mutate(0x1cd7d60?, {{0xc00054ed90?, 0x1fc2c3c?}, {0xc00054ffe0?, 0x22cfea0?}}, {0x22ebd78, 0xc001ee8000})
              /opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/controller/controllerutil/controllerutil.go:340 +0x4f
          sigs.k8s.io/controller-runtime/pkg/controller/controllerutil.CreateOrPatch({0x22cfea0, 0xc00630e3c0}, {0x22da940, 0xc0001e7830}, {0x22ebd78?, 0xc001ee8000}, 0xc0016eeae8)
              /opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/controller/controllerutil/controllerutil.go:275 +0x4cf
          github.com/openstack-k8s-operators/openstack-operator/pkg/openstack.reconcileRabbitMQ({_, _}, _, _, _, {_, _}, {{0xc00202f8e8, {{0xc00054ffc0, 0x9}, ...}, ...}})
              /remote-source/pkg/openstack/rabbitmq.go:297 +0x189b
          github.com/openstack-k8s-operators/openstack-operator/pkg/openstack.ReconcileRabbitMQs({0x22cfea0, 0xc00630e3c0}, 0xc006312000, 0xc000a2ae00?, 0xc002da6580?)
              /remote-source/pkg/openstack/rabbitmq.go:58 +0x285
          github.com/openstack-k8s-operators/openstack-operator/controllers/core.(*OpenStackControlPlaneReconciler).reconcileNormal(0x22d2640?, {0x22cfea0, 0xc00630e3c0}, 0x22eb170?, 0xc000a2ae00?, 0x22da940?)
              /remote-source/controllers/core/openstackcontrolplane_controller.go:303 +0xc5
          github.com/openstack-k8s-operators/openstack-operator/controllers/core.(*OpenStackControlPlaneReconciler).Reconcile(0xc000522540, {0x22cfea0, 0xc00630e3c0}, {{{0xc0006b1006?, 0x5?}, {0xc0006c4120?, 0xc000a4ad08?}}})
              /remote-source/controllers/core/openstackcontrolplane_controller.go:226 +0xb3e
          sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x22d2640?, {0x22cfea0?, 0xc00630e3c0?}, {{{0xc0006b1006?, 0xb?}, {0xc0006c4120?, 0x0?}}})
              /opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/internal/controller/controller.go:119 +0xc8
          sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0005170e0, {0x22cfdf8, 0xc0002c0960}, {0x1dc2ec0?, 0xc00013ce80?})
              /opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/internal/controller/controller.go:316 +0x3ca
          sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0005170e0, {0x22cfdf8, 0xc0002c0960})
              /opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/internal/controller/controller.go:266 +0x1c5
          sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
              /opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/internal/controller/controller.go:227 +0x85
          created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2
              /opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/internal/controller/controller.go:223 +0x587 
        • Related part of the openstackcontrolplane CR
        •     rabbitmq:
                enabled: true
                templates:
                  rabbitmq:
                    delayStartSeconds: 30
                    override:
                      service:
                        spec:
                          type: LoadBalancer
                    persistence:
                      storage: 10Gi
                    rabbitmq: {}
                    replicas: 1
                    resources:
                      limits:
                        cpu: "2"
                        memory: 2Gi
                      requests:
                        cpu: 500m
                        memory: 500Mi
                    secretBackend:
                      externalSecret: {}
                    service:
                      type: ClusterIP
                    terminationGracePeriodSeconds: 604800
                    tls: {}
                  rabbitmq-cell1:
                    delayStartSeconds: 30
                    override:
                      service:
                        metadata:
                          annotations:
                            metallb.universe.tf/address-pool: internalapi
                            metallb.universe.tf/loadBalancerIPs: 172.17.0.86
                        spec:
                          type: LoadBalancer
                    persistence:
                      storage: 10Gi
                    rabbitmq: {}
                    replicas: 1
                    resources:
                      limits:
                        cpu: "2"
                        memory: 2Gi
                      requests:
                        cpu: 500m
                        memory: 500Mi
                    secretBackend:
                      externalSecret: {}
                    service:
                      type: ClusterIP
                    terminationGracePeriodSeconds: 604800
                    tls: {} 

              rhn-support-mschuppe Martin Schuppert
              rh-ee-jwysogla Jaromir Wysoglad
              rhos-dfg-ospk8s
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: