Skip to content

Commit

Permalink
Merge pull request #97 from giuseppe/cgroupfs-ignore-rootless-errors
Browse files Browse the repository at this point in the history
cgroup: ignore rootless errors if manager != systemd
  • Loading branch information
rhatdan committed Sep 19, 2019
2 parents 50eaba6 + 164e00b commit 66cd22c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/libcrun/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,8 +914,12 @@ libcrun_cgroup_enter (oci_container_linux_resources *resources, int cgroup_mode,
return ret;
}

if (rootless > 0 && cgroup_mode != CGROUP_MODE_UNIFIED)
if (rootless > 0 && (cgroup_mode != CGROUP_MODE_UNIFIED || manager != CGROUP_MANAGER_SYSTEMD))
{
if (cgroup_mode == CGROUP_MODE_UNIFIED && manager != CGROUP_MANAGER_SYSTEMD)
libcrun_warning ("cannot configure rootless cgroup using the cgroupfs manager");

/* Ignore cgroups errors and set there is no cgroup path to use. */
free (*path);
*path = NULL;
crun_error_release (err);
Expand Down

0 comments on commit 66cd22c

Please sign in to comment.