由于cgroup配置错误导致docker启动失败

时间:2017-08-25 11:16:17

标签: linux docker kernel cgroups

我正在尝试在Centos-6- ish 操作系统上启动docker。由cgroups原因导致失败。我相信mount的结构是正确的(docker推荐https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount)所以最后的错误信息对我来说不清楚。

thrashin(bash):/base/data/tmp# ./cgroups-mount

thrashin(bash):/base/data/tmp# grep cgroup /proc/mounts
cgroup /sys/fs/cgroup tmpfs rw,relatime,mode=755 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,relatime,blkio 0 0

thrashin(bash):/base/data/tmp# cat /proc/cgroups
#subsys_name    hierarchy       num_cgroups     enabled
cpuset  4       1       1
blkio   5       1       1

thrashin(bash):/base/data/tmp# dockerd &
[1] 7201
thrashin(bash):/base/data/tmp# WARN[0000] could not change group /var/run/docker.sock to docker: group docker not found
INFO[0000] libcontainerd: new containerd process, pid: 7214
WARN[0000] containerd: low RLIMIT_NOFILE changing to max  current=1024 max=4096
WARN[0001] unable to modify root key limit, number of containers could be limited by this quota: open /proc/sys/kernel/keys/root_maxkeys: no such file or directory
INFO[0001] [graphdriver] using prior storage driver: overlay2
INFO[0001] Graph migration to content-addressability took 0.00 seconds
WARN[0001] Your kernel does not support cgroup memory limit
WARN[0001] Unable to find cpu cgroup in mounts
WARN[0001] Your kernel does not support cgroup blkio throttle.read_bps_device
WARN[0001] Your kernel does not support cgroup blkio throttle.write_bps_device
WARN[0001] Your kernel does not support cgroup blkio throttle.read_iops_device
WARN[0001] Your kernel does not support cgroup blkio throttle.write_iops_device
WARN[0001] mountpoint for pids not found
Error starting daemon: Devices cgroup isn't mounted
^C
[1]+  Exit 1                  dockerd

cgroup设备已安装。 失败是由于没有提供cpu子系统的警告吗?如果是这样,我该如何提供?这是内核构建选项吗?

1 个答案:

答案 0 :(得分:0)

通过重建内核来提供cpu cgroup子系统来解决这个问题。

目前还不清楚这应该是解决问题的解决方案

Error starting daemon: Devices cgroup isn't mounted

除了有关cpu子系统的警告之外,还有其他cgroup警告。