Fix 'cgroups not mounted' error in U12.10
'mount' shows something slightly different in Ubuntu 12.10: cgroup on /sys/fs/cgroup type tmpfs (rw,uid=0,gid=0,mode=0755) Note the lack of a plural on first word cgroup, which has changed. Still mounted at /sys/fs/cgroup, so check for both possibilities when instantiated CPU-limited hosts.
This commit is contained in:
+2
-1
@@ -361,7 +361,8 @@ def mountCgroups():
|
||||
mounts = quietRun( 'mount' )
|
||||
cgdir = '/sys/fs/cgroup'
|
||||
csdir = cgdir + '/cpuset'
|
||||
if 'cgroups on %s' % cgdir not in mounts:
|
||||
if ('cgroup on %s' % cgdir not in mounts and
|
||||
'cgroups on %s' % cgdir not in mounts):
|
||||
raise Exception( "cgroups not mounted on " + cgdir )
|
||||
if 'cpuset on %s' % csdir not in mounts:
|
||||
errRun( 'mkdir -p ' + csdir )
|
||||
|
||||
Reference in New Issue
Block a user