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

Manage live data diskspace #314

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Conversation

mflierm
Copy link
Contributor

@mflierm mflierm commented Oct 10, 2024

Main things:

  • Added a new script delete_live_stbc.py (running in a screen on stbc) that checks the available diskspace on in the stoomboot /data/xenon/xams_v2/live_data folder and if it is less than args.min_free_diskspace (default 500G), it removes the oldest run, if and only if there is a copy of the live data on /dcache/archives/xenon/xams/xams_v2/live_data. Update the runsdb accordingly
  • Added the functionality in delete_live.py (running locally on the DAQ PC) that checks if a run is tagged as delete_daq and if so, it checks if a live data copy is stored on both (!) /dcache and /data and if so, it removes the live data on the XAMS PC. This is to force certain runs to be removed first, when struggling with diskspace locally.
  • Tried to work around some edge cases. For example where the live data was already removed manually (for delete_live or when the deletion of a live data folder didn't go according to plan for whatever reason (for delete_live_stbc) so it doesn't keep trying over and over again.

@mflierm mflierm requested a review from cfuselli October 10, 2024 13:00
@coveralls
Copy link

coveralls commented Oct 10, 2024

Pull Request Test Coverage Report for Build 11462583155

Details

  • 0 of 165 (0.0%) changed or added relevant lines in 2 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-2.2%) to 40.683%

Changes Missing Coverage Covered Lines Changed/Added Lines %
amstrax/auto_processing/delete_live.py 0 14 0.0%
amstrax/auto_processing/delete_live_stbc.py 0 151 0.0%
Files with Coverage Reduction New Missed Lines %
amstrax/contexts.py 1 76.79%
amstrax/auto_processing/delete_live.py 3 0.0%
Totals Coverage Status
Change from base Build 11404670205: -2.2%
Covered Lines: 1227
Relevant Lines: 3016

💛 - Coveralls

@mflierm
Copy link
Contributor Author

mflierm commented Oct 15, 2024

Time to merge this PR. Main changes:

  • Added a new script delete_live_stbc.py (running in a screen on stbc) that checks the available diskspace on in the stoomboot /data/xenon/xams_v2/live_data folder and if it is less than args.min_free_diskspace (default 500G), it removes the oldest run, if and only if there is a copy of the live data on /dcache/archives/xenon/xams/xams_v2/live_data. Update the runsdb accordingly
  • Added the functionality in delete_live.py (running locally on the DAQ PC) that checks if a run is tagged as delete_daq and if so, it checks if a live data copy is stored on both (!) /dcache and /data and if so, it removes the live data on the XAMS PC. This is to force certain runs to be removed first, when struggling with diskspace locally.
  • Tried to work around some edge cases. For example where the live data was already removed manually (for delete_live or when the deletion of a live data folder didn't go according to plan for whatever reason (for delete_live_stbc) so it doesn't keep trying over and over again.

@cfuselli
Copy link
Member

Ciao Maricke! Thank you for working on this!! Looks all very good!
Just one comment... do you think we could instead of having two separate files, merge the content of delete_live and delete_live_stbc into the same file?
Becuase the delete_live is started automatically by the webinterface so its nice if its all in one. And we can easily perform the deletions on stbc directly from xams pc via ssh.
Let me know what you think!

@cfuselli
Copy link
Member

I tried to implement it quicly here but just to get an idea of how it would look, did not do it properly

https://github.com/XAMS-nikhef/amstrax/tree/delete_stbc_from_xams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants