storage/overlay: allow native overlay on Lustre in user namespaces - #1023
storage/overlay: allow native overlay on Lustre in user namespaces#1023tim-day-387 wants to merge 1 commit into
Conversation
Native overlay is rejected on network file system backing stores when running in a user namespace. However, Lustre can potentially support idmapped mounts, which is enough for native overlay to work rootless. Add an allow list of network file systems with idmapped mounts support, currently just Lustre, and only reject network file systems that are not on it. Not all version of Lustre will support either native overlayfs or ID mapping, so we still need to probe for support at runtime. Signed-off-by: Timothy Day <timday@thelustrecollective.com>
|
how does it work from a user namespace? Have you tested it with rootless? EDIT: what happens if you run |
|
I tested rootless podman primarily. I've done container builds and run existing container-based development workflows, and everything seems to work. See: and: I'm using the latest Lustre development branch with ID map support and overlayfs support patches applied. |
|
it seems to work, can we just drop LUSTRE from the list in |
Should Lustre still trigger the Either way I think
I don’t see how this text relates to the PR. The text advocates for “extra guidance” but in fact that’s not what the PR is doing; if we do need “extra guidance” then we probably should have that (cached) runtime check. As for whether we need that “extra guidance”, that probably depends on what is the failure mode when running against the older versions which don’t support ID mapping. |
|
We could drop LUSTRE from isNetworkFileSystem() and that'd work fine for a version of Lustre that supports ID map and overlayfs. But it'd result in a behavior change for all previous versions of Lustre. Looking at the code block: Once a filesystem is removed from isNetworkFileSystem(), you'll never see the "Network file system detected as backing store" or "a network file system with user namespaces is not supported" messages on older filesystem versions. That was the guidance I was thinking about. I don't think we'd want to silence these on old versions of Lustre just because a new version has more features - if the given version of Lustre supports neither overlayfs or ID map, the behavior should be unchanged. In the first code branch (mountProgram != ""), we're using fuse-overlayfs on a network filesystem. In this case, we want to enforce the fuse-overlayfs option and warn. In the second code branch, we're using native overlayfs. But we assume that all network filesystems don't support user namespace. And that this remains true across all versions of those filesystems. We could have a check like: but I decided to skip Lustre with |
From the commit message:
I've tested this on my own Lustre system - and podman will correctly use native overlayfs and ID mapping.
I think the code could be structured better. I'm open to suggestions.
isNetworkFileSystem()seems to be a proxy for "this filesystem doesn't support either native overlayfs or ID mapping". In an upcoming release, Lustre will support both native overlayfs and ID mapping. A given version of Lustre may have one, the other, or both. I'd want to fall back to the existing behavior (i.e. emitting a helpful warning) when the support is incomplete. I know podman usually does runtime feature checks for this kind of stuff - but network filesystem seem like an odd edge case where we want to give the user extra guidance. I'm wary of removing Lustre from the network filesystem list outright - most Lustre filesystems in production won't support native overlayfs or ID mapping. So I have this compromise solution. Thoughts?