Fix the finalizer writes on Modules and their plugin Pods - #1932
TomerNewman wants to merge 1 commit into
Conversation
metadata.finalizers is a list, and a merge patch sends a list whole. A write computed from a read that predates another controller's entry therefore removes that entry along with its own. Both writers of ModuleFinalizer, and the one that takes NodeLabelerFinalizer off a plugin Pod, now carry the resourceVersion they read, so a stale write fails rather than lands. The Pod node label reconciler also treated a Node that had already gone as an error. Its own finalizer then stayed on the Pod for good, and so did anything waiting for that Pod. A Node that is not there carries no label, so that case is done rather than failed. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
✅ Deploy Preview for openshift-kmm ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. Summary by CodeRabbit
WalkthroughModule and pod finalizer patches now include optimistic locking. Pod label deletion treats missing nodes as successful. Tests verify resource-version handling, foreign finalizer preservation, and node read failures. ChangesController reconciliation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The change prevents stale finalizer writes and allows cleanup after node deletion; the supplied coverage supports merging with normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TomerNewman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
metadata.finalizers is a list, and a merge patch sends a list whole. A write computed from a read that predates another controller's entry therefore removes that entry along with its own. Both writers of ModuleFinalizer, and the one that takes NodeLabelerFinalizer off a plugin Pod, now carry the resourceVersion they read, so a stale write fails rather than lands.
The Pod node label reconciler also treated a Node that had already gone as an error. Its own finalizer then stayed on the Pod for good, and so did anything waiting for that Pod. A Node that is not there carries no label, so that case is done rather than failed.
fix #1931
/cc @yevgeny-shnaidman
/assign @yevgeny-shnaidman