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 authored and GitHub committed 2020-08-13 15:21:20 -07:00
1 parent 038d91feaa
commit 30da442a85
2 files changed
+9 -5

No files matched your search

+1 -1
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
}