From 6d75c44c7fa123500d8bd80a97884a016169dad5 Mon Sep 17 00:00:00 2001 From: Xavi Leon Date: Fri, 2 Dec 2011 12:49:10 -0500 Subject: [PATCH] Patch to get the type of virtualization based on type tag. This way, we can get the correct directory in cgroups. --- sliver_libvirt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.47.0