-
Notifications
You must be signed in to change notification settings - Fork 23
HACK: storage: overlay: only unmount storage home if needed #329
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
base: main
Are you sure you want to change the base?
Conversation
44d949d
to
a853d8a
Compare
Packit jobs failed. @containers/packit-build please check. |
1 similar comment
Packit jobs failed. @containers/packit-build please check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thirded, the layout of containers storage is an implementation detail with no external promises, and external modifications to that directory structure are not supportable. (If nothing else, we have vague plans to move towards composefs-like layer backends.)
(Duplicating the comment I just left on the issue for visibility) The reason to do this is to punt the container images (== conceptually discardable data) onto a storage medium with different characteristics than the rest of the graphroot. (E.g.: compressed, deduplicated, less redundant, etc.) Can you suggest any alternatives?
Absolutely, I'm not asking to commit to a specific layout of the graphroot or the storage home. But even if there is no commitment to support anything, not breaking a pre-existing system configuration would have been nice. |
For that use case, you could use an additional image store so that the images are stored on a separate store/path |
As opposed to what “rest” of the graph root? Layers don’t exist only in the graph root, so this seems, at least, imprecisely targeted. Guessing, is the goal to preserve the RW container contents? The two might be possible to separate using the (Well, and then there’s the elephant in the room, where layers and containers and … have dependencies, so if the precious container data is preserved, but a parent layer is blown away, I suppose the data is recoverable, but it requires completely manual recovery steps because no tools support such a situation.) |
Volumes, primarily.
Nope, I understand in the model of an OCI container these are also expendable; I'm not trying to say changing that is feasible or desirable (and is not my goal anyway). |
Do not attempt to unmount storage home directory if we were not supposed to mount or remount it at all. This is never useful and may also break certain (unsupported) setups. Fixes: containers/podman#27012 Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
a853d8a
to
30e60e0
Compare
Okay, yeah, that seems to work. As noted in passing by @mtrmac, this is only about the images (RO layers); the RW container contents stay in the graphroot, but I guess I can live with these semantics. Still, would you consider accepting the updated patch with much clearer purpose? This seems like a reasonable thing to do regardless of the whatever unsupported configuration I was trying to conjure. |
I do think there is some scope for improvement / proper cleanup here.
I suppose this is where I remember my policy that “drivers/overlay is too complex and I won’t be reviewing any PRs that add new options or new code paths”, and defer to others that understand this. |
so the expectation here, from the user perspective, is to manually set skip_mount_home but manually do the mount. That is not something we will support. Without the mount home, we would have never ended up in this situation though. So if someone is not using skip_mount_home, but then we change the setting, we will start leaking the mount. I don't think that is desiderable.
the EINVAL error is ignored by unmount. |
I'm not asking to support "manually doing the mount"; you made it clear that it is an unsupported configuration. However, if
How so? |
Doh, thank you! |
but the setting could be changed while a Podman is running, and it will be efffective from the next time. e.g. you've a container running, and there is the mount on the overlay directory. While that is running, you switch the flag to |
Do not attempt to unmount storage home directory if we were not supposed
to mount or remount it at all. This is never useful and may also break
certain (unsupported) setups.
Fixes: containers/podman#27012