Skip to content

fix(role): never choose a cordoned standby as the voter that comes in - #239

Merged
Mearman merged 1 commit into
mainfrom
fix/role-skip-cordoned-standby
Nov 7, 2026
Merged

Mearman merged 1 commit into
mainfrom
fix/role-skip-cordoned-standby

Conversation

@Mearman

@Mearman Mearman commented Nov 7, 2026

Copy link
Copy Markdown
Member

A standby the operator has cordoned is no longer a candidate for an etcd vote. The decision program listed standbys by the eligibility label alone, so a cordoned host (one under repair, say) could rank first, and a swap finishes by uncordoning the node that comes in.

scripts/fleet-role.jq now reads spec.unschedulable for each node, reports it as cordoned in the host's status, and skips such a standby when choosing the voter that comes in. A test cordons the only fit standby and expects no swap; with the filter removed it fails.

The decision program read only the eligibility label when listing
standbys that could replace an unfit voter, so a host the operator had
cordoned (for instance one under repair) ranked as a candidate. A swap
then ends by uncordoning the incoming node, which would return the host
to service.

Read the node's unschedulable flag, report it per host, and leave a
cordoned standby out of the candidates.
@Mearman
Mearman marked this pull request as ready for review November 7, 2026 11:21
@Mearman
Mearman merged commit 2f758e8 into main Nov 7, 2026
35 checks passed
@Mearman
Mearman deleted the fix/role-skip-cordoned-standby branch November 7, 2026 11:21
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.44.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant