From: Xavi Leon Date: Fri, 2 Dec 2011 17:49:10 +0000 (-0500) Subject: Patch to get the type of virtualization based on type tag. This way, we can get X-Git-Tag: nodemanager-2.1-1~25 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;ds=sidebyside;h=6d75c44c7fa123500d8bd80a97884a016169dad5;p=nodemanager.git Patch to get the type of virtualization based on type tag. This way, we can get the correct directory in cgroups. --- diff --git a/sliver_libvirt.py b/sliver_libvirt.py index 930a984..83b5ad8 100644 --- a/sliver_libvirt.py +++ b/sliver_libvirt.py @@ -103,10 +103,12 @@ class Sliver_Libvirt(accounts.Account): print 'sliver_libvirt: UNEXPECTED ERROR in %s...\n%s'%(self.name, sys.exc_info[0]) def configure(self, rec): - - sliver_type = rec['type'].split('.')[1] #sliver.[lxc/qemu] + + #sliver.[LXC/QEMU] tolower case + sliver_type = rec['type'].split('.')[1].lower() BASE_DIR = '/cgroup/libvirt/%s/%s/'%(sliver_type, self.name) + # Disk allocation # No way through cgroups... figure out how to do that with user/dir quotas. # There is no way to do quota per directory. Chown-ing would create