kubernetes: 1.32.0-rc.0 kubelet fails to mount volumes from windows GCEPD CSI driver

A downstream e2e test creating / attaching / mounting / writing to a GCE PD CSI volume is working on latest 1.31 releases and failing with a 1.32.0-rc.0 kubelet. Nothing else changed between the passing and failing run (same OS level, same versions of all other components including CSI driver, etc).

Bisected to https://github.com/kubernetes/kubernetes/pull/127076, when kubelet started being built with go 1.23.

Many things changed in go 1.23 around filesystem handing, and it doesn’t look like kubelet volume code reacted to those.

Building the kubelet with winsymlink=0 resolved the issue.

On Windows, the mode bits reported by Lstat and Stat for reparse points changed. Mount points no longer have ModeSymlink set, and reparse points that are not symlinks, Unix sockets, or dedup files now always have ModeIrregular set. This behavior is controlled by the winsymlink setting. For Go 1.23, it defaults to winsymlink=1. Previous versions default to winsymlink=0.

On Windows, EvalSymlinks no longer evaluates mount points, which was a source of many inconsistencies and bugs. This behavior is controlled by the winsymlink setting. For Go 1.23, it defaults to winsymlink=1. Previous versions default to winsymlink=0.

There are other stdlib windows fs behavior changes as well:

On Windows, Readlink no longer tries to normalize volumes to drive letters, which was not always even possible. This behavior is controlled by the winreadlinkvolume setting. For Go 1.23, it defaults to winreadlinkvolume=1. Previous versions default to winreadlinkvolume=0.

On Windows, EvalSymlinks no longer tries to normalize volumes to drive letters, which was not always even possible. This behavior is controlled by the winreadlinkvolume setting. For Go 1.23, it defaults to winreadlinkvolume=1. Previous versions default to winreadlinkvolume=0.

There is still code throughout kubelet like this (as well as many uses of stat / lstat), which may not be correct in go 1.23 on windows any more:

https://github.com/kubernetes/kubernetes/blob/04ac01e9b64ca7006be0f88f0937122226723028/pkg/util/filesystem/util_windows.go#L45-L91

https://github.com/kubernetes/kubernetes/blob/2b472fe4690c83a2b343995f88050b2a3e9ff0fa/staging/src/k8s.io/mount-utils/mount.go#L258-L270

We’re still trying to narrow down what code in the Kubelet needs to be adjusted and was failing with default go 1.23 behavior, but wanted to raise this now for visibility to the 1.32 release.

/cc @msau42 @BenTheElder @aojea /cc @kubernetes/release-team /milestone v1.32

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 19 (19 by maintainers)

Most upvoted comments

Yes for 1.32 lets revert to old behavior

Ok, I think https://github.com/kubernetes/kubernetes/pull/129083 is ready for review. I’d like explicit acks from storage and windows leads on the resolution, and feedback from both on all the tests we should throw at that PR before merge.

Sweeping / recovering from this temporary behavior revert also needs to be prioritized early in 1.33 (as well as improving the windows test signal around this in general)