-
Notifications
You must be signed in to change notification settings - Fork 0
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
MANUAL file expiry deletion script #1
Conversation
weird thing I found that might be useful for this project? |
infra_file_auto_expiry/source/__pycache__/utils.cpython-310.pyc
Outdated
Show resolved
Hide resolved
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.
Looking good! I think we can test this now. Feel free to change your role to ADMIN in your profile so that you have sudo access. Here's the profile editor: https://cloud.watonomous.ca/docs/utilities/profile-editor
Let's start with a machine that's not super heavily used (wato2-ubuntu1, tr-ubuntu1, delta-ubuntu2 are good choices) and a folder on that machine that is smaller like /var/lib/cluster/<uid>
.
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.
Thanks for waiting hehe. Gave this a closer look. We can start testing!
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.
Looks good overall! Do we need the empty init.py files? Can we add instructions to README on how to run this tool?
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.
The structure looks good! There are some details that we should iron out, like using consistent timestamps and being efficient with filesystem accesses.
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.
Looking pretty good! Can we also run the tests in CI?
Just another small comment: did we figure out how to deal with the "undefined" file info, like ctimes and stuff? |
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.
Looks pretty good in general! Pretty much all just nitpicks.
I think you are looking into issues when running this on a larger folder right? Please ping me again once that's ready.
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.
LGTM! Just some nits
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.
LGTM!
base functions for file expiry tool + the necessary python script to run it
Motivation
https://github.com/WATonomous/infra-config/issues/1143
Description
As to avoid race conditions, this works by copying files into a separate directory with 700 root conditions and then deleting this separate directory. The code currently handles the following edge cases:
This has been tested as follows:
Unsure about how it will work when handling the entire storage folder.
Next steps