fix(kamaji): backport datastore unused-deletion deadlock fix (clastix/kamaji#1122) - #3146
Conversation
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughA patch file updates the Kamaji datastore controller logic so the "DataStore is not used" deletion path also applies when no ChangesKamaji DataStore unused-deletion patch
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…/kamaji#1122) Deleting a Tenant whose etcd DataStore has 0 referencing TenantControlPlanes left the DataStore stuck Terminating (finalizer kamaji.clastix.io/TenantControlPlane), hanging the etcd helm uninstall and wedging the tenant namespace. Backports clastix/kamaji#1122 (fixes clastix/kamaji#1115) as a source patch on the pinned 26.3.6-edge build. Refs #3018. Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
7722fef to
47638f8
Compare
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
LGTM — one-line upstream backport (clastix/kamaji#1122) that fixes the DataStore unused-deletion deadlock; verified it applies cleanly to the pinned 26.3.6-edge source and matches the merged upstream fix verbatim.
Business context: deleting a Tenant whose etcd DataStore has 0 referencing TenantControlPlanes wedges the DataStore in Terminating (finalizer never removed), hanging tenant namespace deletion — this backports the upstream guard.
Non-blocking follow-ups
- When kamaji is bumped to >= 26.4.4-edge (the version that already contains this fix), remove
packages/system/kamaji/images/kamaji/patches/fix-datastore-unused-deletion.diff— otherwise thegit apply /patches/*.diffbuild step fails, since the context line will already include the guard.
|
Successfully created backport PR for |
|
Successfully created backport PR for |
…n deadlock fix (clastix/kamaji#1122) (#3188) # Description Backport of #3146 to `release-1.4`.
…n deadlock fix (clastix/kamaji#1122) (#3187) # Description Backport of #3146 to `release-1.5`.
What
Backports the upstream Kamaji fix clastix/kamaji#1122 (which fixes clastix/kamaji#1115) as a source patch on top of the pinned
26.3.6-edgebuild. No version bump, no CRD/RBAC changes.This lands the fix on
main; thebackport/backport-previouslabels fan it out torelease-1.5andrelease-1.4via the backport automation. Supersedes the per-release PRs #3021 (release-1.5) and #3020 (release-1.4).Why
Deleting a Tenant whose etcd
DataStorehas 0 referencingTenantControlPlanes — e.g. a tenant deleted before any Kubernetes app / TCP is ever created in it — leaves theDataStorestuckTerminatingwith finalizerkamaji.clastix.io/TenantControlPlane. That hangshelm uninstall <etcd>(which waits by default), freezes the etcd HelmRelease atstatus=uninstalling, and wedges the tenant namespace inTerminatingindefinitely. Tracked in #3018.Root cause: in
26.3.x-edge, DataStore deletion drives anAllowedDeletioncondition that only transitionsFalse → True. With 0 referencing TCPs at deletion time the condition is never initialized, so the reconcile falls through to loggingDataStore can be safely deletedand the deferred finalizer-removal (gated onIsStatusConditionTrue) never runs — with no requeue to retry. The pinned26.3.6-edgepredates the upstream fix (merged 2026-04-14, first released in26.4.4-edge).Change
Adds
packages/system/kamaji/images/kamaji/patches/fix-datastore-unused-deletion.diff, applied by the existingRUN git apply /patches/*.diffstep in the kamaji image build. The one-line guard adds the missing 0-TCP path:Test
git apply --checkconfirms the patch applies cleanly to the26.3.6-edgesource pinned onmain; after applying, the guard is present atcontrollers/datastore_controller.go.Workaround for an already-stuck DataStore (0 TCP refs):
kubectl patch datastore <name> --type=merge -p '{"metadata":{"finalizers":null}}'.Relates to #2885 (full kamaji bump for CVEs — supersedes this patch once it lands).
Summary by CodeRabbit