LGTM, thanks
On Wed, Aug 27, 2014 at 10:17 PM, Yuto KAWAMURA(kawamuray) < [email protected]> wrote: > Since we support the memory limit for the LXC container, we should > always have the memory subsystem mounted somewere, so failing to get > the memory limit from the cgroup fs is not acceptable. > > Signed-off-by: Yuto KAWAMURA(kawamuray) <[email protected]> > --- > lib/hypervisor/hv_lxc.py | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/lib/hypervisor/hv_lxc.py b/lib/hypervisor/hv_lxc.py > index 070ccca..cd31485 100644 > --- a/lib/hypervisor/hv_lxc.py > +++ b/lib/hypervisor/hv_lxc.py > @@ -361,12 +361,10 @@ class LXCHypervisor(hv_base.BaseHypervisor): > try: > mem_limit = cls._GetCgroupInstanceValue(instance_name, > "memory.limit_in_bytes") > - mem_limit = int(mem_limit) > - except EnvironmentError: > - # memory resource controller may be disabled, ignore > - mem_limit = 0 > - > - return mem_limit > + return int(mem_limit) > + except EnvironmentError, err: > + raise HypervisorError("Can't get instance memory limit of %s: %s" % > + (instance_name, err)) > > def ListInstances(self, hvparams=None): > """Get the list of running instances. > -- > 2.0.4 > > Hrvoje Ribicic Ganeti Engineering Google Germany GmbH Dienerstr. 12, 80331, München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores Steuernummer: 48/725/00206 Umsatzsteueridentifikationsnummer: DE813741370
