Skip to content
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

Fix tmpdirs not being removed in Dolos API #1413

Merged
merged 4 commits into from
Mar 11, 2024
Merged

Conversation

rien
Copy link
Member

@rien rien commented Mar 11, 2024

We've had some issues with the /tmp directory filling up with the result files that were not removed at the end of an analysis, ultimately filling up the storage space (and causing Dolos to give 500 errors).

This was caused by dolos running as root in the container. The files that were created during the analysis could therefore not be removed by the webserver because it did not have the correct permissions. The error was hidden by another bug where the argument verbose: true to the method remove_entry_safe, which was actually interpreted as force = true which ignores errors.

This PR changes the default user of the Dolos docker container to node and sets the container uid to that matching the current user running the webserver. The resulting files should be owned by the current user and should be removed again.

I have pushed this change with ghcr.io/dodona-edu/dolos:2.5.1-1 to let the CI succeed.

@rien rien added the bug Something isn't working label Mar 11, 2024
@rien rien changed the title Fix user in Dolos docker causing tmpdirs not being removed Fix tmpdirs not being removed in Dolos API Mar 11, 2024
@rien rien merged commit 7af7097 into main Mar 11, 2024
26 checks passed
@rien rien deleted the fix/tmpfiles-not-removed branch March 11, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant