Skip to content

test(mesh): wait for what a step needs before the regrade scenario takes it - #141

Merged
Mearman merged 1 commit into
mainfrom
fix/mesh-regrade-lease-step
Oct 22, 2026
Merged

Mearman merged 1 commit into
mainfrom
fix/mesh-regrade-lease-step

Conversation

@Mearman

@Mearman Mearman commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

The regrade scenario of the mesh integration test fails on main, and not always on the same line. Both causes are races in the test's own timing, so a run passes or fails on how quickly k3s and the watcher happen to move.

After the watcher steps node 2 back up, the test stopped the watcher as soon as the level read full. The service records the level before it uncordons the Node and gives the Lease back, so the kill could land in between and leave the Lease held by node 2, and the later step down by hand on node 3 was refused with "the lease is held by grtest-node2". The test now waits for the watcher to log the end of its step and for the Lease to be free before stopping it.

After node 3's container is recreated at etcd-only, the test ran the step up by hand as soon as the level file read etcd-only. The service uses the kubectl in that container, with the kubeconfig k3s writes a few seconds after it starts, so the step was refused with "the etcd-voting nodes cannot be listed". The test now waits until the service can list the nodes, which is the first thing a step reads.

The role and scripts behave as designed: a step refuses safely in both cases. I reproduced the second failure locally on the first run of the unchanged scenario, and the scenario passes locally with the change.

…kes it

The scenario stopped the watcher on the stepped-up server as soon as its
level read full. The service records the level before it makes the Node
schedulable again and gives the Lease back, so the stop could land
between the two and leave the Lease held, and the next step by hand was
refused as held by the first server. The scenario now waits for the
watcher to log the end of its step and for the Lease to be free.

After the stepped-down server's container was recreated, the step up by
hand ran as soon as the level file read etcd-only. The kubectl the
service uses is the one in that container, with the kubeconfig k3s writes
some seconds after it starts, so the step was refused because the nodes
could not be listed. The scenario now waits until the service can list
them, which is what the step reads first.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ⚠️ Failed 2026-10-22T11:29:04.186429Z
We couldn’t complete this review. Comment @codex security review to try again.
aa8f7a9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@Mearman
Mearman merged commit e052424 into main Oct 22, 2026
32 checks passed
@Mearman
Mearman deleted the fix/mesh-regrade-lease-step branch October 22, 2026 11:47
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.7.10 🎉

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