X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lxcsu-internal;fp=lxcsu-internal;h=83a0d101ff2443d6b0decd19d8bf9ed51ef60c74;hb=605fadcc345e70d250b6c4b2cd3116b34c39a323;hp=164344f70abfb55f948134a9213c3e3dfbdf315c;hpb=f0b64f14ca70b2c56506ef50bbaed17cb09df34f;p=lxc-userspace.git diff --git a/lxcsu-internal b/lxcsu-internal index 164344f..83a0d10 100755 --- a/lxcsu-internal +++ b/lxcsu-internal @@ -100,6 +100,18 @@ def main (): arch = 'x86_64' if debug: print "WARNING: setting arch to default x86_64" + # Set sysctls specific to slice + sysctl_dir = '/etc/planetlab/vsys-attributes/%s'%slice_name + if (os.access(sysctl_dir,0)): + entries = os.listdir(sysctl_dir) + for e in entries: + prefix = 'vsys_sysctl.' + if (e.startswith(prefix)): + sysctl_file = '/'.join([sysctl_dir,e]) + sysctl_name = e[len(prefix):] + sysctl_val = open(sysctl_file).read() + os.system('sysctl -w %s=%s'%(sysctl_name,sysctl_val)) + # Enter cgroups try: for subsystem in ['cpuset','memory','blkio']: