]> arthur.barton.de Git - netdata.git/commitdiff
disable by default cgroups starting with lxc/ and ending with /ns; fixes #1397
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Mon, 19 Dec 2016 22:28:56 +0000 (00:28 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Mon, 19 Dec 2016 22:28:56 +0000 (00:28 +0200)
src/sys_fs_cgroup.c

index a42178efc3188d14f406880460a712d7a62e7d2d..3254caf07b54440fba2f8de7b547fd5208e28bfa 100644 (file)
@@ -703,7 +703,9 @@ struct cgroup *cgroup_add(const char *id) {
                 (len >  6 && !strncmp(&chart_id[len -  6], ".mount", 6)) ||
                 (len >  8 && !strncmp(&chart_id[len -  8], ".session", 8)) ||
                 (len >  8 && !strncmp(&chart_id[len -  8], ".service", 8)) ||
-                (len > 10 && !strncmp(&chart_id[len - 10], ".partition", 10))
+                (len > 10 && !strncmp(&chart_id[len - 10], ".partition", 10)) ||
+                // starts and ends with them
+                (len > 7 && !strncmp(chart_id, "lxc/", 4) && !strncmp(&chart_id[len - 3], "/ns", 3)) // #1397
                 ) {
             def = 0;
             debug(D_CGROUP, "cgroup '%s' is %s (by default)", id, (def)?"enabled":"disabled");