Files
client-go/pkg/util
Maxim Ivanov d1fa9c161c Fix subPath existence check to not follow symlink
Volume mounting logic introduced in #43775 and #45623 checks
for subPath existence before attempting to create a directory,
should subPath not be present.

This breaks if subPath is a dangling symlink, os.Stat returns
"do not exist" status, yet `os.MkdirAll` can't create directory
as symlink is present at the given path.

This patch makes existence check to use os.Lstat which works for
normal files/directories as well as doesn't not attempt to follow
symlink, therefore it's "do not exist" status is more reliable when
making a decision whether to create directory or not.

subPath symlinks can be dangling in situations where kubelet is
running in a container itself with access to docker socket, such
as CoreOS's kubelet-wrapper script

Kubernetes-commit: d552dff164dfc7b91d21bd7d7881838babab2a63
2017-07-28 13:52:41 +00:00
..
2017-04-15 20:28:18 +00:00
2017-06-13 20:38:45 +00:00
2017-01-14 15:19:47 +00:00