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

ABRoot doesn't correctly delete old image #255

Closed
taukakao opened this issue Apr 16, 2024 · 7 comments · Fixed by #259
Closed

ABRoot doesn't correctly delete old image #255

taukakao opened this issue Apr 16, 2024 · 7 comments · Fixed by #259
Assignees
Labels
bug Something isn't working
Milestone

Comments

@taukakao
Copy link
Member

taukakao commented Apr 16, 2024

This requires more testing, but ABRoot leaves behind an old image on every upgrade. This makes the storage folder (/var/lib/abroot/storage) run full very quickly.

I mean the issue has been around for a long time, it just didn't seem important enough to make an issue before.

@kbdharun
Copy link
Member

Can confirm I have the same issue on a very old installation where storage gets full during abroot upgrade.

@taukakao taukakao added the bug Something isn't working label Apr 16, 2024
@taukakao taukakao self-assigned this Apr 16, 2024
@mirkobrombin mirkobrombin added this to the 2-stable milestone Apr 16, 2024
@taukakao
Copy link
Member Author

@kbdharun
To fix an old installation affected by this, it's enough to just delete /var/lib/abroot/storage/*
ABRoot will then just download the newest image completely.

@taukakao
Copy link
Member Author

taukakao commented Apr 17, 2024

So, after some experimentation:
ABRoot always leaves around an image for each root, which is probably desired to run package installs from each root. These have the tag localhost/abroot-[some-uuid]:latest

But ABRoot also leaves around the downloaded image on every upgrade, it has the tag: docker.io/library/abroot-[some-uuid]:latest

This bug should be fixable by just untagging the downloaded image.
Edit: it isn't that easy since the image is tagged multiple times.

@taukakao
Copy link
Member Author

Ok, found a working solution. Just deleting the image with the correct digest works. Since ABRoot always creates a new image ontop of the downloaded one, this works. (It will not delete the layers, just the reference to the image.

@taukakao
Copy link
Member Author

I will make a PR after some testing and polishing

@JonnyB247
Copy link

I can't get to /var/lib/abroot. Is it possible to escape the VSO shell?

@taukakao
Copy link
Member Author

@JonnyB247
Yes, with host-shell. Also note that you have to use pkexec since sudo is not available on the host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants