-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[additionalimagestores] Allow prune
to operate on additional stores
#10392
Comments
Recursively running on --store would remove images that might be used in the main store. You could have an image in an additional store "fedora", and then have an image in the primary read/write store based on top of Fedora. If I want and did podman --root ADDITIONALSTORE image prune |
This is perhaps beyond my architectural understanding of how the storage layers operate! So we're saying that if we have an additional location with a image and we build from that into a different store than rather than copying the relevant layers into the destination store on creation, there is instead a link to the data in the original additional location - such that if this original additional storage image is removed, the new image which inherited from it will break? (And so by extension, in the original use-case for additional imagestores - having read-only images on a network share - if the network or the originating host is own, any local images based on them are also unusable?) It may be that a (stronger/more explicit?) link is needed back from leaf-node images to their parents in this case, which would have the side-effect of resolving this question as the Alternatively, |
A friendly reminder that this issue had no activity for 30 days. |
I don't think this is something we want to do. I think this is something administrators would need to manage. |
To confirm my understanding, though, you're saying that If this is (broadly) correct then should we consider an enhancement whereby non-primary images referenced by a new image to be written to the primary store are also automatically copied to the primary store, to ensure referential integrity if the additional store is in the future cleared or unavailable? |
No I don't believe we should. I think we should treat this the same way the kernel treats overlay, if the underlying storage is modified then what happens in the upper is undefined. It would be interesting to see how Podman would react if an dependent image is removed. Would it attempt to pull it again from a registry if it could? |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
A use-case for a configuration with
additionalimagestores
defined is to separate persistent images which will survive a reboot in one store from ephemeral images which are lost on reboot and would need to be rebuilt in another.In this situation, it would be helpful if
podman image prune
andpodman system prune
gained an additional option to easily operate on specific image stores, or all defined image stores.e.g.
(… and there's a question of whether
--store=all
or--all-stores
would be the preferred form of the latter invocation)This result can currently be achieved by looping over the entries in
additionalimagestores
and running theprune
operation having resetstorage-opt
and setroot
… but it would be much more convenient to be given the option to perform this operation in a single command.For context see #9852, for the suggested change in
ls
output see #10391.The text was updated successfully, but these errors were encountered: