mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
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:
commit
1b9cb26f2e
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue