Repository navigation
[17.0-stable] kube: resync stale state on cluster DNID reassignment - #6817
Merged
eriknordmark merged 3 commits intoOct 17, 2026
Merged
Conversation
A "replace-node" operation reassigns an app's cluster Designated Node ID (DNID) to a different node, but several agents were only acting on the reassignment at creation time and never revisiting already-existing status: - volumemgr: a content tree becoming local (IsLocal flip) never re-entered the download pipeline, and IsLocal/IsReplicated changes on existing ContentTree/Volume status were never resynced from config. handleVolumeModify only re-drives doUpdateVol when IsReplicated actually transitions, so unrelated modifies (e.g. refcount bumps) don't re-run the volume state machine. - zedmanager: AppInstanceStatus.IsDesignatedNodeID stayed frozen, which could leave no node reporting status to the controller across the reassignment window. - zedkube: a VMIRS's node affinity is set once at creation and was never corrected afterward, so it could keep pointing at a stale node. Add a periodic reconciler, gated on "am I the DNID node" (not "am I currently running the app") so a temporary failover doesn't get its affinity rewritten. Exports hypervisor.SetKubeAffinity so zedkube's reconciler builds the same affinity used at creation time instead of duplicating the logic. Signed-off-by: naiming-zededa <naiming@zededa.com> (cherry picked from commit a5e46a6)
Completes the backport of a5e46a6 ("kube: resync stale state on cluster DNID reassignment") to 17.0-stable. On master, stuckmount_test.go (41756b7) reuses the testNodeName constant declared in vmirsaffinity_test.go by a5e46a6. Because a5e46a6 had not been backported, the 17.0 backport of that test (60c8daf, lf-edge#6487) declared its own copy. With a5e46a6 now picked, the two declarations collide; drop the 17.0-only one so the file matches master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: naiming-zededa <naiming@zededa.com>
Completes the backport of a5e46a6 ("kube: resync stale state on cluster DNID reassignment") to 17.0-stable. On master, cf85242 ("volumemgr: publish readiness during the wait") changed initStatusCtx to return *volumemgrContext and converted initVolumeModifyCtx, the test helper added by a5e46a6, to match. Its 17.0 backport (943820f, lf-edge#6488) skipped that conversion because the helper was not on 17.0 yet. Apply it here so the file matches master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: naiming-zededa <naiming@zededa.com>
github-actions
Bot
requested review from
OhmSpectator,
andrewd-zededa,
eriknordmark,
europaul and
zedi-pramodh
October 15, 2026 23:18
rene
approved these changes
Oct 16, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 17.0-stable #6817 +/- ##
===============================================
+ Coverage 22.68% 23.13% +0.44%
===============================================
Files 512 523 +11
Lines 94635 96482 +1847
===============================================
+ Hits 21466 22317 +851
- Misses 71342 72131 +789
- Partials 1827 2034 +207 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
andrewd-zededa
approved these changes
Oct 16, 2026
andrewd-zededa
left a comment
Contributor
There was a problem hiding this comment.
LGTM. The pick matches a5e46a6 and both fixups match the backport plan; the two test files are identical to master.
Merged
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #6138
Cherry-picks a5e46a6 ("kube: resync stale state on cluster DNID reassignment") with
-x. The pick applies cleanly and is not edited.It needs two test-only fixup commits. 17.0-stable already has backports of #6197 (#6487) and #6240 (#6488), and both build on #6138 on master. #6138 was never backported, so those backports were adapted to work without it:
testNodeNamebecause the one from kube: resync stale state on cluster DNID reassignment #6138'svmirsaffinity_test.gowasn't on 17.0. With kube: resync stale state on cluster DNID reassignment #6138 picked, the two declarations collide.initVolumeModifyCtxtest helper to the*volumemgrContextsignature, because the helper wasn't on 17.0 yet.After the fixups, both test files are identical to master.
This is one of four pillar prerequisites for the 17.0-stable backport of #6505 (backup DNID).
How to test and validate this PR
Same as #6138: with the ENC running on three nodes, place an app with its DNID on one node, then run "replace node" on that node. Check that the app, volume instance and content tree move to the new DNID node, and that the VMI's node affinity is updated.
Build checks:
make pillar-vetwithHV=k(go vet -tags k ./...) andmake pillar-fmt-checkpass.Changelog notes
kube: resync stale state on cluster DNID reassignment
Checklist
🤖 Generated with Claude Code