Description of problem:
Errors such as
System error: open /sys/fs/cgroup/devices/system.slice/docker-fc2e8c0bfdef0d585ed13e784ccc1024ec33f4f01e3c4c992ea15b38abca58b7.scope/cgroup.procs: no such file or directory
are seen during origin tests.
For more info see https://github.com/openshift/origin/issues/7927
Version-Release number of selected component (if applicable):
docker 1.9.1
How reproducible:
Seen during jenkins tests
Actual results:
docker build failure
Expected results:
docker build shouldn't fail with this cgroups error
Additional info:
This seems like a probable race of some kind with systemd cgroups support.
The code that is failing does the following:
1. Creates a systemd transient unit for e.g. /system.slice/docker-fc2e8c0bfdef0d585ed13e784ccc1024ec33f4f01e3c4c992ea15b38abca58b7.scope
2. Join the device cgroup manually by creating the device directory
at sys/fs/cgroup/devices/system.slice/docker-fc2e8c0bfdef0d585ed13e784ccc1024ec33f4f01e3c4c992ea15b38abca58b7.scope
3. Write the pid of the container process to
/sys/fs/cgroup/devices/system.slice/docker-fc2e8c0bfdef0d585ed13e784ccc1024ec33f4f01e3c4c992ea15b38abca58b7.scope/cgroup.procs (creating the file as well)