diff --git a/controllers/metal3.io/baremetalhost_controller.go b/controllers/metal3.io/baremetalhost_controller.go index ccd8aff277..d632e30c24 100644 --- a/controllers/metal3.io/baremetalhost_controller.go +++ b/controllers/metal3.io/baremetalhost_controller.go @@ -1178,9 +1178,12 @@ func (r *BareMetalHostReconciler) actionPreparing(prov provisioner.Provisioner, info.log.Info("handling cleaning error in controller") clearHostProvisioningSettings(info.host) } - if hfcDirty { + if hfcDirty && hfc.Status.Updates != nil { info.log.Info("handling cleaning error during firmware update") hfc.Status.Updates = nil + if err := r.Status().Update(info.ctx, hfc); err != nil { + return actionError{errors.Wrap(err, "failed to update hostfirmwarecomponents status")} + } } return recordActionFailure(info, metal3api.PreparationError, provResult.ErrorMessage) }