Unverified Commit 9e946a05 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #62108 from andyzhangx/automated-cherry-pick-of-#62012-upstream-release-1.10

Automatic merge from submit-queue. Automated cherry pick of #62012 Cherry pick of #62012 on release-1.10. #62012: fix local volume issue on windows
parents b070ca58 75dc84f9
...@@ -20,6 +20,7 @@ import ( ...@@ -20,6 +20,7 @@ import (
"fmt" "fmt"
"os" "os"
"path" "path"
"runtime"
"github.com/golang/glog" "github.com/golang/glog"
...@@ -296,11 +297,13 @@ func (m *localVolumeMounter) SetUpAt(dir string, fsGroup *int64) error { ...@@ -296,11 +297,13 @@ func (m *localVolumeMounter) SetUpAt(dir string, fsGroup *int64) error {
} }
if err := os.MkdirAll(dir, 0750); err != nil { if runtime.GOOS != "windows" {
glog.Errorf("mkdir failed on disk %s (%v)", dir, err) // skip below MkdirAll for windows since the "bind mount" logic is implemented differently in mount_wiondows.go
return err if err := os.MkdirAll(dir, 0750); err != nil {
glog.Errorf("mkdir failed on disk %s (%v)", dir, err)
return err
}
} }
// Perform a bind mount to the full path to allow duplicate mounts of the same volume. // Perform a bind mount to the full path to allow duplicate mounts of the same volume.
options := []string{"bind"} options := []string{"bind"}
if m.readOnly { if m.readOnly {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment