sovrin-foundation / steward-tools

tools for Sovrin steward
Apache License 2.0
9 stars 22 forks source link

steward_tech_check.py fails to verify disk size on rootfs #1

Closed btlogy closed 7 years ago

btlogy commented 7 years ago

Running steward_tech_check.py on a test system where /home/sovrin is on rootfs revealed a possible error when looking up for the mount point of the related device:

# sudo python3.5 steward_tech_check.py
...
Error! running /usr/bin/df -k rootfs:
b'/usr/bin/df: \xe2\x80\x98rootfs\xe2\x80\x99: No such file or directory\n'
...

Likely because rootfs can be listed twice:

# cat /proc/mounts
rootfs / rootfs rw 0 0
...
/dev/mapper/vg_sys-lv_root / ext4 rw,seclabel,relatime,data=ordered 0 0
...
btlogy commented 7 years ago

I'm currently working on PR to propose a fix for this. Basically, I think parsing /proc/mounts from get_dev_for_mount can lead to use some entries that can not be understand by df command. We could try to skip those entries or directly use df output.