9406: Explain why there are two separate CgroupParent fields. 9406-cgroup-parent
authorTom Clegg <tom@curoverse.com>
Thu, 4 Aug 2016 14:55:06 +0000 (10:55 -0400)
committerTom Clegg <tom@curoverse.com>
Thu, 4 Aug 2016 14:55:06 +0000 (10:55 -0400)
services/crunch-run/crunchrun.go

index 40e9fc11eac528965f978f4b0472249759b42cbe..38d7de568e57d046dbf8f2afa94a4dd06250d49b 100644 (file)
@@ -97,7 +97,18 @@ type ContainerRunner struct {
        statReporter       *crunchstat.Reporter
        statInterval       time.Duration
        cgroupRoot         string
+       // What we expect the container's cgroup parent to be.
        expectCgroupParent string
+       // What we tell docker to use as the container's cgroup
+       // parent. Note: Ideally we would use the same field for both
+       // expectCgroupParent and setCgroupParent, and just make it
+       // default to "docker". However, when using docker < 1.10 with
+       // systemd, specifying a non-empty cgroup parent (even the
+       // default value "docker") hits a docker bug
+       // (https://github.com/docker/docker/issues/17126). Using two
+       // separate fields makes it possible to use the "expect cgroup
+       // parent to be X" feature even on sites where the "specify
+       // cgroup parent" feature breaks.
        setCgroupParent    string
 }