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

Destroying a release does not destroy the corresponding cache directory (ZFS) #715

Open
joh-ku opened this issue Aug 21, 2024 · 5 comments
Labels
documentation Related to documentation enhancement New feature or request

Comments

@joh-ku
Copy link

joh-ku commented Aug 21, 2024

[MANDATORY] Describe the bug [MANDATORY]
When running bastille destroy RELEASE (ZFS) the corresponding cache directory remains untouched.

[MANDATORY] Bastille and FreeBSD version (paste bastille -v && freebsd-version -kru output)
0.10.20231125
14.1-RELEASE-p3
14.1-RELEASE-p3
14.1-RELEASE-p3

[MANDATORY] How did you install bastille? (port/pkg/git)
pkg

[optional] Steps to reproduce?

  1. Run e.g. bastille destroy 14.0-RELEASE (or any release version you may want to destroy)
  2. /usr/local/bastille/cache/14.0-RELEASE still exists

[optional] Expected behavior
When a release is destroyed, its corresponding cache directory should be deleted as well.

@joh-ku joh-ku added the bug Something isn't working label Aug 21, 2024
@foudfou
Copy link

foudfou commented Nov 7, 2024

This is not well documented but the cache is deleted on force: bastille destroy force 14.0-RELEASE .

@joh-ku
Copy link
Author

joh-ku commented Nov 8, 2024

@foudfou correct, there is a force flag. Thanks for pointing this out!

The question for me is, if an additional flag is required at all and hence, if "destroy" should delete the release and cache directories all together. Pulling the image again is cheap anyway.

@foudfou
Copy link

foudfou commented Nov 8, 2024

Pulling the image is not so cheap to be honest (minutes) compared to creating a release from the cache (seconds). Plus upstream might not have the locally destroyed release anymore (although subsequent jails could be hard to use).

That said, I would also expect destroying a release to also clean up the cache and have amend the PR accordingly.

@joh-ku
Copy link
Author

joh-ku commented Nov 8, 2024

Well, not as cheap as serving it from the cache, agreed. Thank you for the PR! I think the behavior is clearer now.

@yaazkal yaazkal added enhancement New feature or request documentation Related to documentation and removed bug Something isn't working labels Nov 18, 2024
@yaazkal yaazkal changed the title [BUG] Destroying a release does not destroy the corresponding cache directory (ZFS) Destroying a release does not destroy the corresponding cache directory (ZFS) Nov 18, 2024
@bmac2
Copy link
Collaborator

bmac2 commented Nov 23, 2024

@cedwards what do you think the desired action is here?? Isn't the way itworks not destroying cache the designed way, or should it be changed? Don't want to make changes without your input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants