Skip to content

Commit

Permalink
nodereload controller fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohdan Siryk authored and Bohdan Siryk committed Nov 8, 2023
1 parent 7a6135a commit 0242c92
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions controllers/clusterresources/nodereload_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ func (r *NodeReloadReconciler) Reconcile(ctx context.Context, req ctrl.Request)
err = r.Status().Patch(ctx, nrs, patch)
if err != nil {
l.Error(err, "Failed to patch current operation status",
"node ID", nrs.Status.NodeInProgress.ID,
"currentOperationStatus", nodeReloadStatus,
)
r.EventRecorder.Eventf(nrs, models.Warning, models.FetchFailed,
Expand All @@ -177,18 +176,17 @@ func (r *NodeReloadReconciler) Reconcile(ctx context.Context, req ctrl.Request)

if nodeReloadStatus.Status != nodeReloadOperationStatusCompleted {
l.Info("Node Reload operation is not completed yet, please wait a few minutes",
"nodeID", nrs.Status.NodeInProgress,
"status", nrs.Status,
)

return models.ReconcileRequeue, nil
}

l.Info("The node has been successfully reloaded",
"Node ID", nrs.Status.NodeInProgress.ID,
"Node ID", nodeReloadStatus.NodeID,
)
r.EventRecorder.Eventf(nrs, models.Normal, models.UpdatedEvent,
"Node %s has been successfully reloaded", nrs.Status.NodeInProgress.ID,
"Node %s has been successfully reloaded", nodeReloadStatus.NodeID,
)

patch = nrs.NewPatch()
Expand Down

0 comments on commit 0242c92

Please sign in to comment.