Files
kubernetes/pkg/util
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-05-17 20:35:37 +00:00
2017-04-14 10:40:57 -07:00
2017-01-05 14:14:13 -08:00
2017-04-14 10:40:57 -07:00
2017-04-25 11:23:33 -07:00
2017-01-30 12:46:59 -05: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-04-14 10:40:57 -07:00
2017-01-05 14:14:13 -08: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-24 11:01:25 +08:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-01-16 16:04:03 -05: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-01 11:11:14 -07:00
2017-04-14 10:40:57 -07:00
2017-05-15 16:28:56 +03:00
2017-04-14 10:40:57 -07:00
2017-04-06 16:15:34 -04:00
2017-01-25 19:49:45 +01:00
2017-04-14 10:40:57 -07:00
2017-04-23 20:25:23 -03:00
2016-07-16 13:48:21 -04:00