From 595fcf68d154d62b333b857186d88ecea4f5b4ca Mon Sep 17 00:00:00 2001 From: Rong Gao Date: Mon, 17 Jun 2019 15:39:25 +0800 Subject: [PATCH] fix kubelet can not delete orphaned pod directory when the kubelet's root directory symbolically links to another device's directory --- pkg/util/mount/mount_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/mount/mount_linux.go b/pkg/util/mount/mount_linux.go index 0f75d2184d5..2ca274f8c65 100644 --- a/pkg/util/mount/mount_linux.go +++ b/pkg/util/mount/mount_linux.go @@ -237,7 +237,7 @@ func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) { if err != nil { return true, err } - rootStat, err := os.Lstat(filepath.Dir(strings.TrimSuffix(file, "/"))) + rootStat, err := os.Stat(filepath.Dir(strings.TrimSuffix(file, "/"))) if err != nil { return true, err }