Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
75dc84f9
Commit
75dc84f9
authored
Apr 02, 2018
by
andyzhangx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix local volume issue on windows
parent
68ac1bad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
local.go
pkg/volume/local/local.go
+7
-4
No files found.
pkg/volume/local/local.go
View file @
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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment