-
Notifications
You must be signed in to change notification settings - Fork 4.7k
oc cluster up doesn't work when Docker is running with user namespaces support #12643
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
Comments
this is likely because it needs the experimental kubelet behavior that is behind the userns feature gate. |
@csrwng fyi. I think this is something @php-coder can help out with but wanted to loop you in. |
@pweil- There is a similar question like we had with Kubernetes -- should we detect the remap environment or user should explicitly activate it? Do we have the same feature gates in the OpenShift or it should be just an option (like |
the feature gate should be enabled explicitly. This is possible by the extended args in the node config but I don't think it's quite so simple for |
@pweil- if it's possible to detect, then imho we should detect and add the proper args to the node config with cluster up. Otherwise, you can't start the cluster right? |
@csrwng I'd like to detect it in cluster up since we're already hedging on docker versions there anyway. However, it's a little bit tricky. In docker 1.13+ we have the ability to detect userns enablement through the security-opt settings of the Prior to that the only way of knowing (afaik) is looking at the daemon's arguments for the |
@pweil- I see, yeah, that's tricky. Then I'd say detect if we can and provide a flag to enable it explicitly if you need it but it can't be detected automatically. |
Another option is to inspect |
Exactly this check, that is failing now, doesn't use Kubernetes and create container in Docker directly. To pass |
I'm curious how the command $ docker run --rm -it -v /:/rootfs --entrypoint /bin/bash --userns=host --ipc=host --pid=host --uts=host --net=host openshift/origin:v3.6.0-alpha.1
[root@localhost origin]# ls -l /rootfs/proc/1/ns/mnt
ls: cannot read symbolic link /rootfs/proc/1/ns/mnt: Permission denied
lrwxrwxrwx. 1 root root 0 Apr 20 13:34 /rootfs/proc/1/ns/mnt |
@legionus told me that it could be solved by using capabilities. So it works with |
I'm closing this issue because it was fixed by #14169 |
oc cluster up
doesn't start when Docker is running with--userns-remap=default
option.Probably in the remap environment we should enable
--user=host
option for privileged containers (and in some other cases: https://github.com/kubernetes/kubernetes/pull/31169/files#diff-10055ae93a8699af13ceba0482fc43c3R1406).Version
oc v1.5.0-alpha.2+c5868ac-143-dirty
kubernetes v1.5.2+43a9be4
features: Basic-Auth
Steps To Reproduce
sudoedit /usr/lib/systemd/system/docker.service
--userns-remap=default
option toExecStart
parametersudo systemctl daemon-reload
sudo systemctl restart docker
oc cluster up
Current Result
oc cluster up
fails with error "Privileged mode is incompatible with user namespaces".Expected Result
oc cluster up
should run the cluster.Additional Information
The text was updated successfully, but these errors were encountered: