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

Verify disk space before starting backups (SYN-4578) #2990

Merged
merged 3 commits into from
Jan 20, 2023
Merged

Conversation

Cisphyx
Copy link
Contributor

@Cisphyx Cisphyx commented Jan 20, 2023

No description provided.

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Base: 97.21% // Head: 97.11% // Decreases project coverage by -0.11% ⚠️

Coverage data is based on head (2943e46) compared to base (3155d78).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2990      +/-   ##
==========================================
- Coverage   97.21%   97.11%   -0.11%     
==========================================
  Files         218      218              
  Lines       43198    43188      -10     
==========================================
- Hits        41996    41940      -56     
- Misses       1202     1248      +46     
Flag Coverage Δ
linux 97.11% <100.00%> (-0.01%) ⬇️
linux_replay ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
synapse/lib/cell.py 98.26% <100.00%> (+<0.01%) ⬆️
synapse/tests/utils.py 94.46% <0.00%> (-1.89%) ⬇️
synapse/cortex.py 96.68% <0.00%> (-0.55%) ⬇️
synapse/lib/hiveauth.py 96.01% <0.00%> (-0.48%) ⬇️
synapse/lib/oauth.py 98.68% <0.00%> (-0.44%) ⬇️
synapse/lib/trigger.py 95.01% <0.00%> (-0.39%) ⬇️
synapse/lib/view.py 97.01% <0.00%> (-0.34%) ⬇️
synapse/cmds/cron.py 97.56% <0.00%> (-0.25%) ⬇️
synapse/lib/jsonstor.py 98.32% <0.00%> (-0.24%) ⬇️
synapse/axon.py 98.73% <0.00%> (-0.15%) ⬇️
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

diskfree = shutil.disk_usage(self.backdirn).free
cellsize, _ = s_common.getDirSize(self.dirn)
if cellsize * 2 > diskfree:
mesg = f'Insufficient free space on {self.backdirn} to run a backup'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to tell them how much disk space we currently detect available; in use and what our backup requirements are. That could make this message actionable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated message to include free and required space

Copy link
Contributor

@vEpiphyte vEpiphyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actionable exception

@vEpiphyte vEpiphyte added this to the v2.12x.x milestone Jan 20, 2023
@Cisphyx Cisphyx merged commit 6fbe690 into master Jan 20, 2023
@Cisphyx Cisphyx deleted the backup-spacecheck branch January 20, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants