rootDisk on containers can have different device Id (#10259)

use `/etc/hosts` instead of `/` to check for common
device id, if the device is same for `/etc/hosts`
and the --bind mount to detect root disks.

Bonus enhance healthcheck logging by adding maintenance
tags, for all messages.
This commit is contained in:
Harshavardhana
2020-08-13 15:21:20 -07:00
committed by GitHub
parent 038d91feaa
commit 30da442a85
2 changed files with 9 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ func IsRootDisk(diskPath string) (bool, error) {
if err != nil {
return false, err
}
rootInfo, err := os.Stat("/")
rootInfo, err := os.Stat("/etc/hosts")
if err != nil {
return false, err
}