Skip to content
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

使用docker swarm报错 #51

Closed
nothingp opened this issue Aug 23, 2017 · 3 comments
Closed

使用docker swarm报错 #51

nothingp opened this issue Aug 23, 2017 · 3 comments

Comments

@nothingp
Copy link

umount: can't unmount /host/var/lib/docker/overlay/db3a185feda61f38558d4f2c3db060526ffedddd532701ce9030751dee15cb31/merged: Operation not permitted
Traceback (most recent call last):
File "/pilot/entrypoint", line 34, in
cleanup()
File "/pilot/entrypoint", line 24, in cleanup
umount(volume)
File "/pilot/entrypoint", line 12, in umount
subprocess.check_call('umount %s' % volume, shell=True)
File "/usr/lib/python2.7/subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'umount /host/var/lib/docker/overlay/db3a185feda61f38558d4f2c3db060526ffedddd532701ce9030751dee15cb31/merged' returned non-zero exit status 1

无法umount ? 能告诉我原因吗?

@BSWANG
Copy link
Member

BSWANG commented Aug 23, 2017

容器运行的时候是否加了privileged权限?或者被授予CAP_SYS_ADMIN的权限?

@BSWANG BSWANG closed this as completed Sep 4, 2017
@yangwf
Copy link

yangwf commented Sep 6, 2017

@BSWANG
fluentd-pilot用docker run方式启动加上privileged权限可以运行,但是在docker swarm mode模式下用docker service create -d --user root --name pilot --mode global --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock --mount type=bind,src=/,dst=/host iot.io/fluentd-pilot
方式启动仍然存在问题:
image
或者说 docker service create方式怎么做到和docker run一样的授权呢?

@BSWANG
Copy link
Member

BSWANG commented Sep 6, 2017

docker service 不支持加capability,参考 moby/swarmkit#1030

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants