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

BareMetalHost CR gets stuck if delete before installing starts

XMLWordPrintable

    • No
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, when you attempted to delete a `BareMetalHost` object before the installation started, the metal3 Operator attempted to create a `PreprovImage` image. The process of creating this image caused the `BareMetalHost` object to still exist in certain processes. With this release, an exception is added for this situation so that the `BareMetalHost` object is deleted without impacting running processes. (link:https://issues.redhat.com/browse/OCPBUGS-33048[*OCPBUGS-33048*])
      Show
      * Previously, when you attempted to delete a `BareMetalHost` object before the installation started, the metal3 Operator attempted to create a `PreprovImage` image. The process of creating this image caused the `BareMetalHost` object to still exist in certain processes. With this release, an exception is added for this situation so that the `BareMetalHost` object is deleted without impacting running processes. (link: https://issues.redhat.com/browse/OCPBUGS-33048 [* OCPBUGS-33048 *])
    • Bug Fix
    • Done

      Description of problem:

      When you delete a cluster, or just a BMH, before the installation starts (Assisted Service takes the control), the metal3-operator tries to generate a PreprovisioningImage.

      In previous versions, it was created a fix that, during some first installation phases the creation of the PreprovisioningImage was not invoked:

      https://github.com/openshift/baremetal-operator/pull/262/files#diff-a69d9029388ab766ed36b32180145f52785a9d4a153775510dbddfa928a72e1cR787

      it was based on the status "StateDeleting".

      Recently, it was added a new status "StatePoweringOffBeforeDelete":

      https://github.com/openshift/baremetal-operator/commit/6f65d8e75ef6ed921863ebaf793cccda61de8bcb#diff-eeed3703d04e4c23a7d7af8cd0b7931b6b7990f23d826c49bdbc31c5f0a50291

      but this status is not covered on the previous fix. And during this new phase there should not be tried to create the image.

      The problem of trying create the PreprovisioningImage, when it should not, it is that create problems on ZTP. Where the BMH and all the objects are deleted at the same time. And the operator cannot create the image because the NS is been deleted.

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

      4.14    

      How reproducible:

          

      Steps to Reproduce:

          1.Create a cluster
          2.Wait until the provisioing phase
          3.Delete the cluster
          4.The metal3-operator tries to create the PreprovisioningImage wrongly. 
          

      Actual results:

          

      Expected results:

          

      Additional info:

          

            jgato@redhat.com Jose Gato Luis
            jgato@redhat.com Jose Gato Luis
            Alexander Chuzhoy Alexander Chuzhoy
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: