LGTM, some nitpicks follow.

On Mon, Sep 29, 2014 at 7:26 PM, Yuto KAWAMURA(kawamuray) <
[email protected]> wrote:

> We have already decided to require cgroup memory subsystem enabled
>

the cgroup memory subsystem to be enabled


> when using LXC hypervisor, so a configuration file should always
>

the LXC hypervisor


> have memory limit entry.
>

have a memory


>
> Signed-off-by: Yuto KAWAMURA(kawamuray) <[email protected]>
> ---
>  lib/hypervisor/hv_lxc.py | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/lib/hypervisor/hv_lxc.py b/lib/hypervisor/hv_lxc.py
> index d003748..61a198e 100644
> --- a/lib/hypervisor/hv_lxc.py
> +++ b/lib/hypervisor/hv_lxc.py
> @@ -505,15 +505,10 @@ class LXCHypervisor(hv_base.BaseHypervisor):
>                   instance.hvparams[constants.HV_CPU_MASK])
>
>      # Memory
> -    # Conditionally enable, memory resource controller might be disabled
> -    cgroup = self._GetOrPrepareCgroupSubsysMountPoint("memory")
> -    if os.path.exists(utils.PathJoin(cgroup, "memory.limit_in_bytes")):
> -      out.append("lxc.cgroup.memory.limit_in_bytes = %dM" %
> -                 instance.beparams[constants.BE_MAXMEM])
> -
> -    if os.path.exists(utils.PathJoin(cgroup,
> "memory.memsw.limit_in_bytes")):
> -      out.append("lxc.cgroup.memory.memsw.limit_in_bytes = %dM" %
> -                 instance.beparams[constants.BE_MAXMEM])
> +    out.append("lxc.cgroup.memory.limit_in_bytes = %dM" %
> +               instance.beparams[constants.BE_MAXMEM])
> +    out.append("lxc.cgroup.memory.memsw.limit_in_bytes = %dM" %
> +               instance.beparams[constants.BE_MAXMEM])
>
>      # Device control
>      # deny direct device access
> --
> 1.8.5.5
>
>

Reply via email to