Skip to content

Commit

Permalink
core: don't use the unified hierarchy for the systemd cgroup yet (#4628)
Browse files Browse the repository at this point in the history
Too many things don't get along with the unified hierarchy yet:

 * opencontainers/runc#1175
 * moby/moby#28109
 * lxc/lxc#1280

So revert the default to the legacy hierarchy for now. Developers of the above
software can opt into the unified hierarchy with
"systemd.legacy_systemd_cgroup_controller=0".
(cherry picked from commit 843d5baf6aad6c53fc00ea8d95d83209a4f92de1)
  • Loading branch information
martinpitt authored and Yamakuzure committed Jul 17, 2017
1 parent d740ea0 commit fed319a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/basic/cgroup-util.c
Expand Up @@ -346,7 +346,7 @@ int cg_kill_recursive(
while ((r = cg_read_subgroup(d, &fn)) > 0) {
_cleanup_free_ char *p = NULL;

p = strjoin(path, "/", fn);
p = strjoin(path, "/", fn, NULL);
free(fn);
if (!p)
return -ENOMEM;
Expand Down Expand Up @@ -484,7 +484,7 @@ int cg_migrate_recursive(
while ((r = cg_read_subgroup(d, &fn)) > 0) {
_cleanup_free_ char *p = NULL;

p = strjoin(pfrom, "/", fn);
p = strjoin(pfrom, "/", fn, NULL);
free(fn);
if (!p)
return -ENOMEM;
Expand Down Expand Up @@ -567,11 +567,11 @@ static int join_path_legacy(const char *controller, const char *path, const char
if (isempty(path) && isempty(suffix))
t = strappend("/sys/fs/cgroup/", dn);
else if (isempty(path))
t = strjoin("/sys/fs/cgroup/", dn, "/", suffix);
t = strjoin("/sys/fs/cgroup/", dn, "/", suffix, NULL);
else if (isempty(suffix))
t = strjoin("/sys/fs/cgroup/", dn, "/", path);
t = strjoin("/sys/fs/cgroup/", dn, "/", path, NULL);
else
t = strjoin("/sys/fs/cgroup/", dn, "/", path, "/", suffix);
t = strjoin("/sys/fs/cgroup/", dn, "/", path, "/", suffix, NULL);
if (!t)
return -ENOMEM;

Expand All @@ -591,7 +591,7 @@ static int join_path_unified(const char *path, const char *suffix, char **fs) {
else if (isempty(suffix))
t = strappend("/sys/fs/cgroup/", path);
else
t = strjoin("/sys/fs/cgroup/", path, "/", suffix);
t = strjoin("/sys/fs/cgroup/", path, "/", suffix, NULL);
if (!t)
return -ENOMEM;

Expand All @@ -618,7 +618,7 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
else if (!path)
t = strdup(suffix);
else
t = strjoin(path, "/", suffix);
t = strjoin(path, "/", suffix, NULL);
if (!t)
return -ENOMEM;

Expand Down Expand Up @@ -1155,7 +1155,7 @@ int cg_is_empty_recursive(const char *controller, const char *path) {
while ((r = cg_read_subgroup(d, &fn)) > 0) {
_cleanup_free_ char *p = NULL;

p = strjoin(path, "/", fn);
p = strjoin(path, "/", fn, NULL);
free(fn);
if (!p)
return -ENOMEM;
Expand Down

0 comments on commit fed319a

Please sign in to comment.