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

openstack-baremetal-operator-controller-manager-xxxx pod fails with segmentation violation error

XMLWordPrintable

    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • ?
    • ?
    • ?
    • None
    • Important

      While provisioning a un-provisioned node using
      OpenStackDataPlaneNodeSet, the openstack-baremetal-operator-controller-manager-xxxx pod fails with the following error. 

      2024-09-27T12:25:07Z INFO Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference {"controller": "openstackbaremetalset", "controllerGroup": "baremetal.openstack.org", "controllerKind": "OpenStackBaremetalSet", "OpenStackBaremetalSet": {"name":"openstack-compute2-up","namespace":"openstack"}, "namespace": "openstack", "name": "openstack-compute2-up", "reconcileID": "e685fd31-b2fa-4884-9a42-ecbcdba845f1"}
      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=0x0 pc=0x17bd237]
      goroutine 190 [running]:
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
       /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/internal/controller/controller.go:116 +0x1fa
      panic({0x19bbf00, 0x2b71a10})
       /usr/lib/golang/src/runtime/panic.go:884 +0x213
      github.com/openstack-k8s-operators/openstack-baremetal-operator/pkg/openstackbaremetalset.BaremetalHostProvision({0x1ea22b0, 0xc00238d830}, 0xc0000fd290, 0xc0022f6f00, {0xc0005f7440, 0xc}, {0xc003fba640, 0xc}, {0xc001f07d10, 0x11}, ...)
       /remote-source/app/pkg/openstackbaremetalset/baremetalhost.go:256 +0xf57
      github.com/openstack-k8s-operators/openstack-baremetal-operator/controllers.(*OpenStackBaremetalSetReconciler).ensureBaremetalHosts(0x1ea22b0?, {0x1ea22b0, 0xc00238d830}, 0xc0000fd290, 0xc0022f6f00, 0xc0022f83c0, 0x0?, 0x5?, 0xc003728fb0?, 0xc001e89030)
       /remote-source/app/controllers/openstackbaremetalset_controller.go:624 +0x6bc
      github.com/openstack-k8s-operators/openstack-baremetal-operator/controllers.(*OpenStackBaremetalSetReconciler).reconcileNormal(0xc00030a140, {0x1ea22b0, 0xc00238d830}, 0xc0022f6f00, 0xc0000fd290)
       /remote-source/app/controllers/openstackbaremetalset_controller.go:419 +0xe54
      github.com/openstack-k8s-operators/openstack-baremetal-operator/controllers.(*OpenStackBaremetalSetReconciler).Reconcile(0xc00030a140, {0x1ea22b0, 0xc00238d830}, {{{0xc003fba610?, 0x5?}, {0xc001f07ce0?, 0xc001e89d48?}}})
       /remote-source/app/controllers/openstackbaremetalset_controller.go:157 +0xbdb
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x1ea48a0?, {0x1ea22b0?, 0xc00238d830?}, {{{0xc003fba610?, 0xb?}, {0xc001f07ce0?, 0x0?}}})
       /remote-source/deps/gomod/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(0xc0005780a0, {0x1ea2208, 0xc000576f50}, {0x1a66e80?, 0xc00041b9a0?})
       /remote-source/deps/gomod/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(0xc0005780a0, {0x1ea2208, 0xc000576f50})
       /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/internal/controller/controller.go:266 +0x1d9
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
       /remote-source/deps/gomod/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
       /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/internal/controller/controller.go:223 +0x587

      I have attached the `OpenStackDataPlaneNodeSet` and the full error log with this report. 
       
      Please note that the node's networks do not have DHCP and require static IP configuration both during the initial introspection and during the provisioning. I have noticed that the error is probably occurring while trying to build the 'networkData' template. Additionally, the 'networkdata' cloud-init secret is missing from the list of secrets in the 'openstack' namespace.
       
      Workaround:
      Add the `networkData` to the corresponding nodes individually 

      nodes:
         osp-compute2: 
           networkData:
             name: openstack-compute-up-cloudinit-networkdata-osp-compute2
             namespace: openstack

      and add the following secret to `openstack` namespace

       kind: Secret
      apiVersion: v1
      metadata:
        name: openstack-compute-up-cloudinit-networkdata-osp-compute1
        namespace: openstack
        uid: ab6fe6b1-55dd-4dbb-bf87-3153a472f53f
        resourceVersion: '63734839'
        creationTimestamp: '2024-09-26T17:08:45Z'
        labels:
          environment.metal3.io: baremetal
      data:
        networkData: bGlua3M6Ci0gbmFtZTogZW5wMXMwCiAgaWQ6IGVucDFzMAogIHR5cGU6IHZpZgpuZXR3b3JrczoKLSBsaW5rOiBlbnAxczAKICBpZDogZW5wMXMwCiAgdHlwZTogaXB2NAogIGlwX2FkZHJlc3M6IDE5Mi4xNjguMTIyLjk5CiAgbmV0bWFzazogMjU1LjI1NS4yNTUuMAogIHJvdXRlczoKICAtIG5ldHdvcms6IDAuMC4wLjAKICAgIG5ldG1hc2s6IDAuMC4wLjAKICAgIGdhdGV3YXk6IDE5Mi4xNjguMTIyLjEKc2VydmljZXM6Ci0gdHlwZTogZG5zLW5hbWVzZXJ2ZXIKICBhZGRyZXNzOgogICAgLSAxOTIuMTY4LjEyMi44MAogIHNlYXJjaDoKICAgIC0gZXhhbXBsZS5jb20K
      type: Opaque
         

      the `networkData` is the rendering of https://github.com/openstack-k8s-operators/openstack-baremetal-operator/blob/e850b77c09c662aec43e4764f3ff7bdc5f9b1d33/templates/openstackbaremetalset/cloudinit/networkdata

              Unassigned Unassigned
              mputhenp Mohammed Salih Puthenpurayil Kunju Mohamed
              rhos-dfg-hardprov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: