-
Notifications
You must be signed in to change notification settings - Fork 330
waypoint runner fails to build docker image with nsenter: failed to unshare namespaces: Operation not permitted #1306
Comments
Hey there @arbll - Can you provide us with the runner logs for when it failed? Were you running Waypoint through the UI when you got this error, or the CLI? Thank you! |
This error is caused when user namespaces aren't enabled on the underlying host OS. See the docs here: https://www.waypointproject.io/plugins/docker#dockerless-builds Namely:
I'm not sure if we can do anything more in this case, maybe we can detect this error string and link to this section. |
Detecting the error seems good. I imagine this will be a common issue people run into, so having a good error message here seems like a good first step 👍🏻 |
Hey @mitchellh & @briancain , thanks for the quick reply. I was suspecting the same thing but I became pretty convinced that user namespaces were correctly enabled (by default) on my ubuntu 20.04 install: ❯ sysctl kernel.unprivileged_userns_clone
kernel.unprivileged_userns_clone = 1 I have looked a bit closer at issues from the The And indeed:
I wonder if this is what could be happening here ? Note that I am not familiar at all with what |
That could certainly be true, but we do launch the runner (in Docker) with that set: waypoint/internal/serverinstall/docker.go Lines 654 to 661 in 7376b07
|
Ah, you're running in Nomad! Maybe there is a way to set those on Nomad, I don't think we do. |
Yep: https://www.nomadproject.io/docs/drivers/docker#security_opt I think we need to set these. |
I tried to simply add those flags and I'm getting failures starting the runner in Nomad for some reason. Ill have to look further another time. |
Thanks for the investigation @mitchellh. I'll monitor the issue, have a good weekend |
Hey, just want to confirm that this is a bug that will be fixed in a future version and there is nothing I can do to fix it just now, right? |
Kind of yes. Waypoint 0.6 switched to using on-demand runners for everything which no longer has this issue, but we're adding Nomad support right now (PR open already and likely merging any day now). Once that is merged, that will fix this because we no longer need a privileged environment to run Docker builds. |
I'm going to go ahead and close this! We've shipped on-demand runners with Nomad, so we should be good. |
Describe the bug
The Waypoint runner seem to fail to build my docker image with the following error:
Dockerfile
I'm running the waypoint server and runner in a nomad cluster. The underlying OS is Ubuntu 20.04.
I guess it's most likely an issue with either my OS preventing https://github.com/genuinetools/img to run correctly because of some security mechanism or an issue with the way the runner use
img
Waypoint Platform Versions
0.3.0
The text was updated successfully, but these errors were encountered: