-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip session recording reservation files (filessesion) #13826
Conversation
Side note: don't we lose the disk space reservation the moment we open the file for writing again in |
@espadolini Do you mean it because we truncate the file when opening? |
Yes, as opposed to writing whatever content we need and then truncating before closing. |
@zmb3 I've updated the PR with @espadolini suggestion: create the reservation files with a different extension, so we don't need to check their content.
I have updated the PR with this also. Thanks for pointing it out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mucked around the session recording code so take this approval with a grain of salt
Skip session recording reservation files (filessesion) (#13826)
Closes #13640 by skipping reservation files when completing a session recording upload. To do so, now we create the reservation files with a different extension so we can differentiate them from regular upload parts.
Context
Session recording modes introduce "disk reservation", where Teleport creates placeholder files to guarantee that the node has enough disk space to record sessions. This reservation happens every time a new part file is required. Those files are replaced with recording contents on the
UploadPart
flow.In scenarios where the upload couldn't run (for example, if the node is killed during a session), the reservation file was left on the node. When the
UploadComplete
was executed, it created broken recording files (.tar
), causing the uploads to fail (as we can see in the logs presented on the related issue).