Skip to content

fix(elasticsearch): gate the rolling-upgrade health wait on expected node count - #198

Merged
Oddly merged 1 commit into
mainfrom
fix/upgrade-wait-node-count
Aug 12, 2026
Merged

fix(elasticsearch): gate the rolling-upgrade health wait on expected node count#198
Oddly merged 1 commit into
mainfrom
fix/upgrade-wait-node-count

Conversation

@Oddly

@Oddly Oddly commented Aug 12, 2026

Copy link
Copy Markdown
Owner

The two wait for cluster health points in elasticsearch-rolling-upgrade.yml (before taking a node down, and after it comes back up) only checked .status. Because elasticsearch_api_host defaults to localhost, both waits query the local node — and immediately after a restart the local node briefly reports number_of_nodes: 1 while peer discovery is still running. In a 2-node mixed-version window the resulting cluster shape is status: yellow, unassigned_shards: 1 for the full retry budget (up to 15 min), even though the cluster is fine and just needs another few seconds to reform.

Both until clauses now also require number_of_nodes to have caught up to the expected size (groups[…] | length, with a single-host default so single-node scenarios still pass). No behavioural change once the cluster is actually reformed — this only removes the transient false positive where we accepted an under-strength cluster reading.

Reproduces as the repeat upgrade_multi_node (debian12/rockylinux9, elasticsearch_upgrade_8to9) failure that showed up on every non-trivial PR since the wait_status: green default landed.

…node count

The two 'wait for cluster health' points in elasticsearch-rolling-upgrade.yml
(before taking a node down, and after it comes back up) only checked
'.status'. Because elasticsearch_api_host defaults to localhost, both
waits query the local node — and immediately after a restart the local
node briefly reports 'number_of_nodes: 1' while peer discovery is still
running. In a 2-node mixed-version window the resulting shape is
'status: yellow, unassigned_shards: 1' for the full retry budget (up to
15 min), even though the cluster is fine and just needs another few
seconds to reform.

Both until clauses now also require number_of_nodes to have caught up
to the expected size ('groups[…] | length', with a single-host default
so single-node scenarios still pass). No behavioural change once the
cluster is actually reformed — this only removes the transient false
positive where we accepted an under-strength cluster reading.

Reproduces as the repeat upgrade_multi_node (debian12/rockylinux9,
elasticsearch_upgrade_8to9) failure that has been showing up on every
non-trivial PR since the wait_status: green default landed.
@Oddly Oddly added the ci:run Trigger gated pull request CI label Aug 12, 2026
@github-actions github-actions Bot removed the ci:run Trigger gated pull request CI label Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Oddly, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 69e8cc47-7069-47ac-b2c7-15eecbbe8e20

📥 Commits

Reviewing files that changed from the base of the PR and between c4a1125 and 7ef7130.

📒 Files selected for processing (1)
  • roles/elasticsearch/tasks/elasticsearch-rolling-upgrade.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Oddly
Oddly merged commit 2c5175b into main Aug 12, 2026
53 of 55 checks passed
@Oddly
Oddly deleted the fix/upgrade-wait-node-count branch August 12, 2026 11:29
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.

1 participant