fix: skip nodedrain coordination when cluster is unready to prevent p… - #315
Merged
Conversation
Collaborator
|
Let's start to add unit tests for all things :) |
noctarius
reviewed
Jul 9, 2026
| if clusterCR, err := utils.ResolveClusterCR(ctx, r.Client, snCR.Namespace, snCR.Spec.ClusterName); err == nil { | ||
| if clusterCR.Status.Status == utils.ClusterStatusUnready { | ||
| if activateErr := maybeActivateCluster(ctx, apiClient, clusterUUID, snCR, r); activateErr != nil { | ||
| log.Info("Activation conditions not yet met", "reason", activateErr.Error()) |
Collaborator
There was a problem hiding this comment.
Don't we need to jump out and send a ctrl.Result?
Collaborator
Author
There was a problem hiding this comment.
No, we would want this continue incase we have other operations.
sending ctrl.Result will block this reconcilation and other operation
… storage-node DaemonSet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…remature PDB creation
Summary
Skip nodedrain coordination and PDB pre-creation when the cluster is in
unreadystate to prevent interference with the initial node provisioning flow.Problem
During initial cluster setup the cluster status is
unreadyuntil enough storage nodes join for the first activation. The nodedrain controller was running its full reconcile loop — including pre-creating blocking PDBs — before the cluster was ready. This caused:pollNodeOnlinetimed out waiting for nodes that couldn't come online yet (cluster not activated)Changes
ClusterStatusUnready = "unready"tointernal/utils/constants.goNodeDrainCoordinatorReconciler.Reconcilethat requeues at 30s whenclusterCR.Status.Status == "unready", skipping all drain coordination and PDB creationdegraded,suspended) are intentionally unaffected — drain coordination should continue for thoseBehaviour
unreadyactivedegraded/suspended