Skip to content

Retry moveMasterPodsOffNode on failure instead of aborting - #3179

Open
pdixit26 wants to merge 2 commits into
zalando:masterfrom
pdixit26:retry-move-master-pods-off-node
Open

Retry moveMasterPodsOffNode on failure instead of aborting#3179
pdixit26 wants to merge 2 commits into
zalando:masterfrom
pdixit26:retry-move-master-pods-off-node

Conversation

@pdixit26

@pdixit26 pdixit26 commented Sep 1, 2026

Copy link
Copy Markdown

What

moveMasterPodsOffNode gave up after a single failed attempt instead of
retrying over the configured master_pod_move_timeout. Any error from
attemptToMoveMasterPodsOffNode (e.g. no synced standby available yet)
was treated as terminal by retryutil.Retry, so the operator got one
~4-5s attempt and then permanently gave up, leaving the master stuck on
a draining node.

Fix

Log the failure and return (false, nil) on error so the retry loop
keeps polling every minute until master_pod_move_timeout expires,
matching the documented behavior.

Testing

Added TestMoveMasterPodsOffNodeRetriesOnError, which forces
attemptToMoveMasterPodsOffNode to fail and asserts the retry loop
runs to timeout rather than aborting on the first error.

Fixes #3176

attemptToMoveMasterPodsOffNode's transient errors (e.g. no synced
standby available yet) were treated as terminal, so the retry loop
gave up after a single ~4-5s attempt instead of retrying over
master_pod_move_timeout. This left masters stuck on draining nodes
indefinitely once a PodDisruptionBudget started rejecting evictions.

Log the failure and return (false, nil) so the retry loop keeps
polling every minute until the timeout expires.

Fixes zalando#3176
@pdixit26

pdixit26 commented Sep 1, 2026

Copy link
Copy Markdown
Author

This is a bugfix for #3176. I can't add the label myself.

@pdixit26

pdixit26 commented Sep 3, 2026

Copy link
Copy Markdown
Author

@FxKu Could I get review on this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

moveMasterPodsOffNode gives up after one failed retry instead of retrying

1 participant