Skip to content

Commit

Permalink
Merge pull request #51 from almaslennikov/pending-reboot-fix
Browse files Browse the repository at this point in the history
fix: Set device status to PendingReboot if needed after spec validation
  • Loading branch information
almaslennikov authored Nov 13, 2024
2 parents 176a715 + 89469db commit b676b51
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/controller/nicdevice_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,13 @@ func (r *NicDeviceReconciler) handleSpecValidation(ctx context.Context, statuses
status.nvConfigUpdateRequired = false
status.rebootRequired = false
status.lastStageError = errors.New(consts.FwConfigNotAppliedAfterRebootErrorMsg)
default:
// If reboot hasn't happened yet, proceed as normal and set PendingReboot status
log.Log.V(2).Info("reboot pending for device", "device", status.device.Name)
err = r.updateDeviceStatusCondition(ctx, status.device, consts.PendingRebootReason, metav1.ConditionTrue, "")
if err != nil {
status.lastStageError = err
}
}
}
}(i)
Expand Down

0 comments on commit b676b51

Please sign in to comment.