Merge pull request #42631 from jeduardo/lxc-consistency-fixes

Fix lxc module to operate as per the docs for container memory configuration
This commit is contained in:
Mike Place 2017-08-01 13:02:38 -05:00 committed by GitHub
commit 1b9cb26f2e

View file

@ -894,7 +894,8 @@ def _get_lxc_default_data(**kwargs):
ret['lxc.start.auto'] = '0'
memory = kwargs.get('memory')
if memory is not None:
ret['lxc.cgroup.memory.limit_in_bytes'] = memory * 1024
# converting the config value from MB to bytes
ret['lxc.cgroup.memory.limit_in_bytes'] = memory * 1024 * 1024
cpuset = kwargs.get('cpuset')
if cpuset:
ret['lxc.cgroup.cpuset.cpus'] = cpuset