Skip to content
Snippets Groups Projects
Commit 5559a93d authored by Brian O'Connor's avatar Brian O'Connor
Browse files

Merge pull request #170 from piyushs/cgroup-fix

Fix issue with mountCgroups not recognizing mounted cgroup
parents 2a1f2d59 433ca2ec
No related branches found
No related tags found
No related merge requests found
...@@ -363,13 +363,13 @@ def fixLimits(): ...@@ -363,13 +363,13 @@ def fixLimits():
def mountCgroups(): def mountCgroups():
"Make sure cgroups file system is mounted" "Make sure cgroups file system is mounted"
mounts = quietRun( 'mount' ) mounts = quietRun( 'cat /proc/mounts' )
cgdir = '/sys/fs/cgroup' cgdir = '/sys/fs/cgroup'
csdir = cgdir + '/cpuset' csdir = cgdir + '/cpuset'
if ('cgroup on %s' % cgdir not in mounts and if ('cgroup %s' % cgdir not in mounts and
'cgroups on %s' % cgdir not in mounts): 'cgroups %s' % cgdir not in mounts):
raise Exception( "cgroups not mounted on " + cgdir ) raise Exception( "cgroups not mounted on " + cgdir )
if 'cpuset on %s' % csdir not in mounts: if 'cpuset %s' % csdir not in mounts:
errRun( 'mkdir -p ' + csdir ) errRun( 'mkdir -p ' + csdir )
errRun( 'mount -t cgroup -ocpuset cpuset ' + csdir ) errRun( 'mount -t cgroup -ocpuset cpuset ' + csdir )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment