Preserve leftover recordings on container restart#1249
Open
chalapathi444 wants to merge 1 commit into
Open
Conversation
The entrypoint wipes /home/egress/tmp on every start. If a container restarted mid-egress (crash, OOM, redeploy), any in-progress recording in tmp was lost before it could be recovered. Copy a non-empty tmp into /home/egress/recovered before the cleanup, so operators can retrieve partial output from the previous session. The copy is skipped when tmp is empty, leaving normal startup unchanged.
biglittlebigben
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the suggestion. We do not think that copying files within the pod is a good idea: this could cause the pod disk usage to grow without limit and no process to cleanup. This also doesn't cover Amy of the cases where the pod is killed and restarted from a clean container.
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.
What
The entrypoint wipes
/home/egress/tmpon every start. If a container restarts mid-egress (crash, OOM, redeploy), the in-progress recording intmpis deleted before anyone can recover it.How
Before the cleanup, if
tmpis non-empty, copy its contents to/home/egress/recoveredso operators can retrieve partial output from the previous session:Notes
tmpis empty (the normal case), nothing is copied and startup is unchanged.recovered/is not auto-pruned — open to a retention/size cap if you'd prefer one (e.g. clearing it after N restarts or above a size threshold), happy to adjust.