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

Missing finalizer on hostfirmwarecomponents CR

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      When deleting a namespace containing the BMH (used in assisted-installer), the HostFirmwareComponents CR for a BMH gets removed before the BMH is completely deprovisioned.

       

      This leaves the BMH stuck in deprovisioning.

       

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

      Using OCP 4.18.26

      How reproducible:

      100%

      Steps to Reproduce:

      1. Create a BMH with inspection enabled and automatedCleaningMode set to metadata
      2. Create an InfraEnv in the same NS
      3. Once the BMH is in state provisioning, delete the namespace

      Actual results:

      BMH is stuck in state deprovisioning.

      Relevant BMO logs:

      2025-11-03T18:32:57.018918266Z {"level":"info","ts":1762194777.0188787,"logger":"controllers.BareMetalHost","msg":"created new hostFirmwareComponents resource","baremetalhost":{"name":"ostest-extraworker-4","namespace":"spoke-cluster"},"provisioningState":"registering"}
      2025-11-03T19:45:07.081996926Z {"level":"error","ts":1762199107.0819695,"msg":"Reconciler error","controller":"hostfirmwarecomponents","controllerGroup":"metal3.io","controllerKind":"HostFirmwareComponents","HostFirmwareComponents":{"name":"ostest-extraworker-4","namespace":"spoke-cluster"},"namespace":"spoke-cluster","name":"ostest-extraworker-4","reconcileID":"77bf968c-03d6-4356-9b9f-d7302e8508bd","error":"HostFirmwareComponents.metal3.io \"ostest-extraworker-4\" not found","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler\n\t/go/src/github.com/metal3-io/baremetal-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem\n\t/go/src/github.com/metal3-io/baremetal-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:263\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2\n\t/go/src/github.com/metal3-io/baremetal-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:224"}
      2025-11-03T19:28:58.193797706Z {"level":"info","ts":1762198138.1937754,"logger":"controllers.BareMetalHost","msg":"will not attempt to create new hostFirmwareSettings and hostFirmwareComponents in spoke-cluster","baremetalhost":{"name":"ostest-extraworker-4","namespace":"spoke-cluster"},"provisioningState":"deprovisioning"}

      Expected results:

      BMH is deprovisioned and deleted cleanly

      Additional info:

      Based on the logs, I guess the hostfirmwarecomponent CR was created originally and because the namespace is wiped in one go, it gets removed prematurely.

       

      Logs for openshift-machine-api namespace + manual collection of CRs in BMH namespace: https://drive.google.com/file/d/15HRgOq_b-6XtBKBw-2Ml9J8dPDh58Ipl/view?usp=sharing

              rhn-engineering-hpokorny Honza Pokorny
              cchun@redhat.com Crystal Chun
              None
              None
              Jad Haj Yahya Jad Haj Yahya
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: