Commit 75dc84f9 authored by andyzhangx's avatar andyzhangx

fix local volume issue on windows

parent 68ac1bad
...@@ -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