Skip to content

runC depends on devices cgroup to find mountpoints #798

@davidlt

Description

@davidlt

While testing rootless containers (not yet merged -- #774) on Scientific Linux CERN SLC release 6.7 (Carbon) (same as CentOS/RHEL) I hit an issue:

$ runc --root $PWD/tmp start test_container
mountpoint for devices not found

Kernel:

Linux YYY 2.6.32-573.22.1.el6.x86_64 #1 SMP Wed Mar 23 17:13:03 CET 2016 x86_64 x86_64 x86_64 GNU/Linux

The same setup worked out-of-the box on Fedora 24.

From @cyphar

It looks like you're missing the devices cgroup. While this would 
ordinarily be a show-stopper for regular containers (for security 
reasons), we don't need the devices cgroup with rootless 
containers! Unfortunately, the cgroup code uses the devices 
cgroup as the "mandatory cgroup" to do path lookup checks to 
figure out where the cgroup mountpoint is.

I also did run ./contrib/check-config.sh from Docker.

warning: /proc/config.gz does not exist, searching other paths for kernel config ...
info: reading kernel config from /boot/config-2.6.32-573.22.1.el6.x86_64 ...

Generally Necessary:
- cgroup hierarchy: single mountpoint! [/cgroup/plus]
   (see https://github.com/tianon/cgroupfs-mount)
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_DEVPTS_MULTIPLE_INSTANCES: enabled
- CONFIG_CGROUPS: enabled
- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_CPUSETS: enabled
- CONFIG_MEMCG: missing
- CONFIG_KEYS: enabled
- CONFIG_MACVLAN: enabled (as module)
- CONFIG_VETH: enabled (as module)
- CONFIG_BRIDGE: enabled (as module)
- CONFIG_BRIDGE_NETFILTER: enabled
- CONFIG_NF_NAT_IPV4: missing
- CONFIG_IP_NF_FILTER: enabled (as module)
- CONFIG_IP_NF_TARGET_MASQUERADE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: missing
- CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled (as module)
- CONFIG_NF_NAT: enabled (as module)
- CONFIG_NF_NAT_NEEDED: enabled
- CONFIG_POSIX_MQUEUE: enabled

Optional Features:
- CONFIG_USER_NS: enabled
- CONFIG_SECCOMP: missing
- CONFIG_CGROUP_PIDS: missing
- CONFIG_MEMCG_KMEM: missing
- CONFIG_MEMCG_SWAP: missing
- CONFIG_MEMCG_SWAP_ENABLED: missing
- CONFIG_RESOURCE_COUNTERS: enabled
- CONFIG_BLK_CGROUP: enabled
- CONFIG_BLK_DEV_THROTTLING: enabled
- CONFIG_IOSCHED_CFQ: enabled
- CONFIG_CFQ_GROUP_IOSCHED: enabled
- CONFIG_CGROUP_PERF: enabled
- CONFIG_CGROUP_HUGETLB: missing
- CONFIG_NET_CLS_CGROUP: enabled
- CONFIG_NETPRIO_CGROUP: enabled
- CONFIG_CFS_BANDWIDTH: enabled
- CONFIG_FAIR_GROUP_SCHED: enabled
- CONFIG_RT_GROUP_SCHED: enabled
- CONFIG_EXT3_FS: enabled (as module)
- CONFIG_EXT3_FS_XATTR: enabled
- CONFIG_EXT3_FS_POSIX_ACL: enabled
- CONFIG_EXT3_FS_SECURITY: enabled
- CONFIG_EXT4_FS: enabled (as module)
- CONFIG_EXT4_FS_POSIX_ACL: enabled
- CONFIG_EXT4_FS_SECURITY: enabled
- Network Drivers:
 - "overlay":
   - CONFIG_VXLAN: enabled (as module)
- Storage Drivers:
 - "aufs":
   - CONFIG_AUFS_FS: missing
 - "btrfs":
   - CONFIG_BTRFS_FS: enabled (as module)
 - "devicemapper":
   - CONFIG_BLK_DEV_DM: enabled (as module)
   - CONFIG_DM_THIN_PROVISIONING: enabled (as module)
 - "overlay":
   - CONFIG_OVERLAY_FS: missing
 - "zfs":
   - /dev/zfs: missing
   - zfs command: missing
   - zpool command: missing

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions