Skip to content

Commit

Permalink
Adjust logic on bmh controller
Browse files Browse the repository at this point in the history
- we no longer need the currentError stored, since we don't clear
  the ErrorType before calling Service.
- include dirty when changing the Status.Provisioning.Firmware, this
  is to ensure we would run an actionUpdate.

Signed-off-by: Iury Gregory Melo Ferreira <[email protected]>
  • Loading branch information
iurygregory committed Nov 5, 2024
1 parent 93c9382 commit 1f8fc87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/metal3.io/baremetalhost_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,6 @@ func (r *BareMetalHostReconciler) doServiceIfNeeded(prov provisioner.Provisioner
// succeed before leaving this state (e.g. by deprovisioning) we lose the signal that the
// update didn't actually happen. This is deemed an acceptable risk for the moment since it is only
// going to impact a small subset of Firmware Settings implementations.
currentError := info.host.Status.ErrorType
if info.host.Status.OperationalStatus != metal3api.OperationalStatusServicing {
info.host.Status.OperationalStatus = metal3api.OperationalStatusServicing
return actionUpdate{}
Expand All @@ -1424,6 +1423,7 @@ func (r *BareMetalHostReconciler) doServiceIfNeeded(prov provisioner.Provisioner

if started && fwDirty {
info.host.Status.Provisioning.Firmware = info.host.Spec.Firmware.DeepCopy()
d
}

if provResult.Dirty {
Expand Down

0 comments on commit 1f8fc87

Please sign in to comment.