Skip to content

feat(storage): recognise armed Longhorn migration storage - #5680

Queued
devantler wants to merge 2 commits into
mainfrom
claude/longhorn-v2-admission-5655
Queued

devantler wants to merge 2 commits into
mainfrom
claude/longhorn-v2-admission-5655

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Agentic Engineer

Why

The Longhorn V2 migration needs temporary workers that may hold storage, while every other short-lived worker must stay free of it. Today the storage rules and the client-maintenance checks treat all of those workers alike, so a worker armed for the migration would be fenced off again, or the checks would hold. This is the first part of the third slice of the split decided on #5655.

What

An armed migration worker is now recognised only when its exact pool name and its enabled label agree, and the maintenance checks also require its reviewed pool and its scale-down protection. No worker has that label, and this change adds no way to set it, so nothing changes on the cluster. It adds no worker and no cost: the new worker and the capacity changes follow the worker layout slice, because a worker created earlier would come up with the wrong disk layout.

Part of #5655

👉 After merge/promotion: nothing to do; the migration stays dormant.

Let the replica-exclusion policies and the client-maintenance checks tell
an armed, fixed migration worker from ordinary compute, by exact pool name
and the enabled label together. No node carries that label, so nothing
changes on the cluster until a later slice arms one.

The admission and retrofit rules share one condition. The retrofit reads it
from the live target and now mutates only its own trigger, so a compute node
can never fence armed migration capacity.

Part of #5655.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T13:02:04.689559Z af1986e Manual request
ℹ️ 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

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 03c0cfd43c

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The malformed-label test also fenced the node, so a later check failed it and
it would have stayed green without the label check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: af1986e9e3

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Evaluation at af1986e9e30d90476c238ff3a2d3fe71bca7f57e.

  • Live effect, read from the cluster on 2026-11-01: 0 of 6 Longhorn nodes carry the enabled label, and all 3 autoscale nodes are fenced (the two V1 migration workers included) with no replica on them. A scratch run of the retrofit against an unlabelled autoscale-longhorn-v1-* target kept it fenced, so a merge moves nothing.
  • Tried natively: the policy test script, kyverno test on its fixtures and the Go tests with -race all pass. Mutations of the pool pattern, the target condition, replica exclusion, the malformed-label check and the scale-down protection each fail a test.
  • Independent read: one finding fixed (the malformed-label test passed through a later check; that test is now on a protected node and proven by mutation).
  • Carried to slice 3b, not fixed: two replica checks in the tool, at the start of a client-maintenance run and in its completion check, still refuse any autoscale replica. They hold rather than admit, and nothing is armed. Client maintenance would therefore hold while armed replicas exist. Slice 3b decides whether that stays.
  • Not proven: the live background controller is our downstream build, so its target-condition behaviour is read from upstream v1.19.2 source and the CLI. No labelled node has been tried on the cluster.

Codex is clean at this head, CI has no failures and there are no review threads.

@devantler
devantler marked this pull request as ready for review November 1, 2026 13:16
@devantler
devantler added this pull request to the merge queue Nov 1, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

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

Labels

None yet

Projects

Status: 🫴 Ready

Development

Successfully merging this pull request may close these issues.

1 participant