Files
kubernetes/pkg
Maxim Ivanov 020ec43b56 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
2017-07-07 11:52:16 +01:00
..
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-05-28 10:11:02 -04:00
2017-04-14 10:40:57 -07:00
2017-01-19 09:50:16 -05:00
2017-05-28 10:11:02 -04:00
2017-05-31 19:07:38 -07:00
2017-04-14 10:40:57 -07:00
2017-05-20 07:17:57 -04:00
2017-05-31 19:07:38 -07:00
2017-05-29 13:03:25 -04:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-05-28 10:11:02 -04:00