From da128f917b0082d9d759a847d1af2ce0a9d9d185 Mon Sep 17 00:00:00 2001 From: Patrick Bellasi Date: Fri, 28 Oct 2016 18:54:10 +0100 Subject: [PATCH] cgroups: ensure CGroups are mounted RW Some systems mount CGroups RO, thus we need to ensure we remount that FS as root otherwise we cannot create new groups. Signed-off-by: Patrick Bellasi --- devlib/module/cgroups.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/devlib/module/cgroups.py b/devlib/module/cgroups.py index f605751..e4b387c 100644 --- a/devlib/module/cgroups.py +++ b/devlib/module/cgroups.py @@ -326,6 +326,11 @@ class CgroupsModule(Module): self.logger.debug('cgroup_root already mounted at %s', self.cgroup_root) + # Ensure CGroups is mounted RW + self.target.execute('mount -o remount,rw {}'\ + .format(self.cgroup_root), + as_root=True) + # Load list of available controllers controllers = [] subsys = self.list_subsystems()