runc/libcontainer/cgroups
vikaschoudhary16 d5b4a3eddb Fix race against systemd
- T0: runc triggers a systemd unit creation asynchronously from [here](https://github.com/opencontainers/runc/blob/master/libcontainer/cgroups/systemd/apply_systemd.go#L298)
- T1: runc then moves ahead and starts creating cgroup paths(.scope directories), [here](https://github.com/opencontainers/runc/blob/master/libcontainer/cgroups/systemd/apply_systemd.go#L348). Kernel creates .scope directory and cgroup.procs file(along with other default files) in the directory automatically, in an atomic manner.
- T3: systemd execution thread which was invoked at time `T0`, is still in the process of unit creation. systemd also trying to create cgroup paths and deletes the `.scope` directory which is created at time `T1` by runc from [here](https://github.com/systemd/systemd/blob/v219/src/shared/cgroup-util.c#L1630) in the code

Signed-off-by: vikaschoudhary16 <choudharyvikas16@gmail.com>
2018-01-08 09:37:26 -05:00
..
fs Merge pull request #1540 from cloudfoundry-incubator/rootless-cgroups 2017-10-16 12:03:49 -04:00
systemd Fix race against systemd 2018-01-08 09:37:26 -05:00
cgroups.go cgroups: update the comments 2017-01-03 22:40:12 +08:00
cgroups_test.go Rework ParseCgroupFile 2015-09-10 20:59:27 +03:00
cgroups_unsupported.go Move libcontainer into subdirectory 2015-06-21 19:29:15 -07:00
stats.go Expose memory.use_hierarchy in MemoryStats 2017-03-31 13:40:34 -04:00
utils.go Merge pull request #1372 from cloudfoundry-incubator/cpuset-mount-root 2017-05-25 09:53:57 -07:00
utils_test.go Create containers when cgroups already mounted 2017-03-15 10:10:30 +00:00