-
Notifications
You must be signed in to change notification settings - Fork 229
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
Deleting a snapshot does not remove files #5281
Comments
Same issue here. Currently sitting at around 1.5 GB storage used, even though I used |
@arifogel - is this something that has become easy/safe to do based on your recently changes or is there a workaround other than deleting the containers folder entirely? |
Currently, Batfish will garbage collect stuff that is at least 10 minutes older than the oldest remaining snapshot. |
I should point out that this is not a documented feature, and we make no guarantees about this behavior. |
So what would be the proper way to delete old networks/snapshots? Even though I am using Using |
@AlexLardschneider are you seeing behavior contrary to what I posted earlier?
If so, what files are remaining? Can you please provide instructions to reproduce? |
Using After running batfish a couple of times (and waiting 10 minutes), I am left with the following files (output of
At the moment of writing this, the Steps to reproduce:
|
Sorry, are you running, then waiting ten minutes, then checking? What happens if you don't use overwrite, but init a second snapshot at least 10 minutes after the first one finishes, and then delete the old one? |
Tried both, without success.
Could you please clarify what you mean? Init a new snapshot with another name, or with the same one? |
The current model is that an actively-used Batfish installation will eventually clean up deleted data. But the garbage is collected lazily and may require new operations (initializing a new network, initializing a new snapshot, etc). If the service is used only periodically, there are no guarantees about latency on collection. The code was introduced by @arifogel in #6081 and some follow-up PRs. PRs welcome to improve behavior! |
Update: also, only data older than the oldest snapshot that exists in any network will be deleted. PRs welcome to improve behavior! |
When removing a snapshot (using bf_delete_snapshot with pybatfish), the files associated with the snapshot remain in the containers directory. Reclaiming the disk space by removing the files would be valuable when lots of snapshots are created (e.g., to iterate over failure scenarios) and/or the snapshots are large.
The text was updated successfully, but these errors were encountered: