-
Notifications
You must be signed in to change notification settings - Fork 785
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
Run logout,manifest,source,unmount without userns #5752
Conversation
Fixes: containers#5750 Signed-off-by: Daniel J Walsh <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I'm skeptical that this will work for |
This worked. |
I'm doubtful that many of the relevant code paths were invoked there, since there was no image rootfs being pushed. |
Well it looks like login, logout and manifest are likely to require UserNS then. |
well the thinking behind my suggestion (make it an arg) was that what you can't do is "cross the streams", right? run some things in userns but some things outside it. but (at least as I understood it) it should in theory be okay to run only non-container-build-y commands, all outside userns. so my idea was to provide a somewhat-hidden way to do that, for this specific use case. if a command-line argument is too prominent it could be an env var or something, I guess. |
I am fine with adding a hidden option --unshare and forcing the user to need to deal with it. |
@nalind Thoughts? |
Would it actually solve the problem? Attempting to push layers without configuring a user namespace can very easily trip over permissions problems. |
I can try and test my patch later, I didn't have time when I wrote it. |
I'd be curious to hear @giuseppe 's opinion here. The code change looks fine for what you want to do, I'll let others decide if that's an appropriate approach. The hidden Looks like a rebase is needed. |
if we are accessing the storage as @nalind pointed out, it won't work without a user namespace since we need |
sorry for not testing this; after some extensive discussion we decided to try having the image uploader produce its own multi-arch manifest and push it with skopeo, to avoid the need for buildah or podman. I'm just finishing up that code now (adapted from https://pagure.io/koji-flatpak/blob/main/f/koji_flatpak/plugins/flatpak_builder_plugin.py#_586 ). If it works, we'll probably not care about this so much (though it'd still be nice if this could be addressed somehow in skopeo or buildah or podman so we could drop the manifest creation code from our tool). |
Update - we changed our uploader tool to build the manifest itself, and it works, so we'll just go with that for now. Bit more code than we really want to carry/maintain, but hey. If there's ever a way to use podman or buildah or skopeo to construct the manifest that doesn't run through this userns stuff, we'll try it. |
Fixes: #5750
What type of PR is this?
What this PR does / why we need it:
How to verify it
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?