os.totalmem() incorrect when called on container (LXD)
- Version: 11.13.0
- Platform: Linux 4.15.0-43-generic Tracking / Assuring Compatibility #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
- Subsystem: os
os.totalmem() reports an invalid value when use on a continaer - tested on lxd -
How reproduce:
apt install lxd lxd init # ..... lxc launch ubuntu:18.04 machine1 lxc config set machine1 limits.memory 2500MB lxc exec machine1 /bin/bash # install node ...... node > os.totalmem() 32xxxxxxxxxx // 32GB # result here is the total memory of host no the container
