X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=python%2Fvserver.py;h=8618088b60c2045e736565c755bde4d5c6759f21;hb=0f3e056bac8cdb4d7ed89e08f8886002942e0ab6;hp=1ec678a50bed906610c9d44a709c8861a84c9fc2;hpb=85c74f7d287da3a39d0f441b979404d301ab66b0;p=util-vserver.git diff --git a/python/vserver.py b/python/vserver.py index 1ec678a..8618088 100644 --- a/python/vserver.py +++ b/python/vserver.py @@ -83,10 +83,10 @@ class VServer: def __do_chroot(self): - return os.chroot("%s/%s" % (VROOTDIR, self.name)) + return os.chroot("%s/%s" % (DEFAULT_VSERVERDIR, self.name)) def set_disklimit(self, blocktotal): - path = "%s/%s" % (VROOTDIR, self.name) + path = "%s/%s" % (DEFAULT_VSERVERDIR, self.name) inodes, blockcount, size = vduimpl.vdu(path) blockcount = blockcount >> 1 @@ -98,7 +98,7 @@ class VServer: print "block limit (%d) ignored for vserver %s" %(blocktotal,self.name) def get_disklimit(self): - path = "%s/%s" % (VROOTDIR, self.name) + path = "%s/%s" % (DEFAULT_VSERVERDIR, self.name) try: blocksused, blocktotal, inodesused, inodestotal, reserved = \ vserverimpl.getdlimit(path,self.ctx) @@ -137,7 +137,8 @@ class VServer: fillrate = shares try: - vserverimpl.setsched(self.ctx,fillrate,interval,tokensmin,tokensmax) + cpuguaranteed = 0 # need to set this from the conf file + vserverimpl.setsched(self.ctx,fillrate,interval,tokensmin,tokensmax,cpuguaranteed) except OSError, ex: if ex.errno == 22: print "kernel does not support vserver scheduler" @@ -237,7 +238,7 @@ class VServer: def __do_chcontext(self, state_file = None): - vserverimpl.chcontext(self.ctx, self.remove_caps) + vserverimpl.chcontext(self.ctx) if not state_file: return print >>state_file, "S_CONTEXT=%d" % self.ctx