-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
use rootless netns from c/common #20772
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99 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 |
d98ab48
to
b7324b1
Compare
Ephemeral COPR build failed. @containers/packit-build please check. |
f8ccfe3
to
c5e30c5
Compare
@Luap99 Still valid? |
c6a4d56
to
9c84144
Compare
@dfr Could you try if these changes still work on freebsd? I had to move a bunch of cgroups definitions around and I am not sure if I might broke something on freebsd. |
SetupRootless causes things like |
Thanks for checking, should I just make it return nil for freebsd then? There is only linux specific code in there. |
I'm just reading the linux version now. I wondered if it might be better to return nil only if !rootless.IsRootless() which would give a better error for attempts to run as non root. If I change SetupRootless to return nil and run as non-root, I get this:
Edit: I tried returning nil if |
The 'permission denied' happens during the call to
|
Use the new rootlessnetns logic from c/common, drop the podman code here and make use of the new much simpler API. ref: containers/common#1761 [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <[email protected]>
There is no point in calling into cgroup specific code as freebsd does not support cgroups. Signed-off-by: Paul Holzinger <[email protected]>
So that we do not cause compile error on freebsd. Signed-off-by: Paul Holzinger <[email protected]>
So that we do not cause compile errors on freebsd. Signed-off-by: Paul Holzinger <[email protected]>
Thanks, I changed it to return nil then. I leave it to you to return a better rootless error for freebsd. |
Ok, I can do that. I just built your latest version and it works just fine when run as root on freebsd. |
@containers/podman-maintainers PTAL |
/lgtm |
44a9371
into
containers:main
It turns out that the confusing error from |
Use the new rootlessnetns logic from c/common, drop the podman code
here and make use of the new much simpler API.
ref: containers/common#1761
Does this PR introduce a user-facing change?