Repository navigation
[eno][tombstone-recovery 7/7] Garbage collect stale inventory Secrets - #667
Open
Ruinan Liu (ruinan-liu) wants to merge 4 commits into
Open
Ruinan Liu (ruinan-liu) wants to merge 4 commits into
Ruinan Liu (ruinan-liu) wants to merge 4 commits into
Conversation
Ruinan Liu (ruinan-liu)
force-pushed
the
users/ruinanliu/backup-6-inventory-deletion
branch
from
October 13, 2026 20:16
4ad869a to
a753aed
Compare
Ruinan Liu (ruinan-liu)
force-pushed
the
users/ruinanliu/backup-7-garbage-collection
branch
from
October 13, 2026 20:17
24ccd3b to
a09dd6c
Compare
Ruinan Liu (ruinan-liu)
force-pushed
the
users/ruinanliu/backup-6-inventory-deletion
branch
from
October 16, 2026 05:16
a753aed to
97ac26a
Compare
Ruinan Liu (ruinan-liu)
force-pushed
the
users/ruinanliu/backup-7-garbage-collection
branch
from
October 21, 2026 22:29
a09dd6c to
4d8e62b
Compare
Ruinan Liu (ruinan-liu)
changed the base branch from
users/ruinanliu/backup-6-inventory-deletion
to
main
October 21, 2026 22:29
Ruinan Liu (ruinan-liu)
marked this pull request as ready for review
October 21, 2026 22:30
Ruinan Liu (ruinan-liu)
requested review from
Robbie Zhang (robbiezhang),
Tingting Liu (tilnl) and
xiazhan
as code owners
October 21, 2026 22:30
The inventory garbage collector treated a lineage without a Composition as orphaned. During AKS start the active Symphony exists before its Compositions are recreated, so the first GC cycle could delete inventory needed for tombstone recovery. Lineages listed by the active Symphony's variations are now kept. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8e985e7f-ffae-45b3-837c-a41cd34ec8e0
GC deleted older inventory once the current snapshot's chunks were complete, even if a current chunk was terminating. Recording already rejects terminating replacements. Both paths now share isCompleteSnapshot, so GC keeps the older snapshot until a non-terminating replacement exists. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8e985e7f-ffae-45b3-837c-a41cd34ec8e0
xiazhan
reviewed
Oct 27, 2026
xiazhan
reviewed
Oct 27, 2026
xiazhan
reviewed
Oct 27, 2026
Collaborator
|
A comment not specific to this pr: Do each Eno controllers/reconcilers well support graceful termination? |
Ruinan Liu (ruinan-liu)
left a comment
Collaborator
Author
There was a problem hiding this comment.
REspond to comments
Collaborator
Author
Both Eno binaries use controller-runtime's single handler, so SIGTERM cancels the manager ctx and stops all controllers and runnables including the new inventory gc. Leader election releases the lease on cancel. I will confirm that every controller drains the in-flight work within the pods' termination grace period. |
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.
Summary
Add a background garbage collector to the tombstone recovery operator. While the reconciler is running, it periodically deletes stale inventory Secrets from the downstream cluster's
kube-systemnamespace.Behavior
eno.azure.io/inventory-lineagelabel in one call, then lists Compositions and Symphonies in the reconciler's namespace with the uncached API reader. Any read failure skips the cycle.Safety
NotFoundcounts as deleted.Refactor
deleteInventorySecret, shared by inventory recording rotation, deletion cleanup, and garbage collection. Deletion cleanup now also uses a UID precondition.Assumptions and Requirements
kube-system.listpermission onsymphonies.