Bug fix from Scott Baker
Sapan Bhatia [Fri, 12 Oct 2012 13:47:14 +0000 (09:47 -0400)]
lxcsu

diff --git a/lxcsu b/lxcsu
index 229cb33..8e0c8a6 100644 (file)
--- a/lxcsu
+++ b/lxcsu
@@ -63,7 +63,8 @@ if (not slice_spec or not pid):
 # Enter cgroups
 try:
     for subsystem in ['cpuset','memory','blkio']:
-        open('/sys/fs/cgroup/%s/libvirt/tasks'%subsystem,'w').write(pid)
+        open('/sys/fs/cgroup/%s/libvirt/lxc/%s/tasks'%(subsystem,slice_name),'w').write(str(os.getpid()))
+
 except:
     print "Error assigning resources: %s"%slice_name
     exit(1)