fix 68211: modified subpath configmap mount fails when container restart

This commit is contained in:
fatedier
2020-03-29 16:21:41 +08:00
parent 1c11ff7a26
commit 6c2562a579
2 changed files with 21 additions and 3 deletions

View File

@@ -158,6 +158,11 @@ func (hu *HostUtil) EvalHostSymlinks(pathname string) (string, error) {
return filepath.EvalSymlinks(pathname)
}
// FindMountInfo returns the mount info on the given path.
func (hu *HostUtil) FindMountInfo(path string) (mount.MountInfo, error) {
return findMountInfo(path, procMountInfoPath)
}
// isShared returns true, if given path is on a mount point that has shared
// mount propagation.
func isShared(mount string, mountInfoPath string) (bool, error) {