rpc-maas
rpc-maas copied to clipboard
Make storage check use df in container namespace
The previous method of using chroot to check container storage fails when the container uses a symlink from /etc/mtab to ../proc/self/mounts since the container is running in an isolated pid/mnt namespace and /proc/self is not visible in the chroot.
This commit uses the the attach_wait
method from the lxc
module to
run the df command in the container pid/mnt namespace and parses the
df output to gather usage percentage for each mounted device.
Fixes #724