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
23dbd699
Commit
23dbd699
authored
Mar 14, 2018
by
mlmhl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return NodeStageVolume/NodePublishVolume error if operation failed
parent
34001d8c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
csi_attacher.go
pkg/volume/csi/csi_attacher.go
+2
-3
csi_mounter.go
pkg/volume/csi/csi_mounter.go
+2
-3
No files found.
pkg/volume/csi/csi_attacher.go
View file @
23dbd699
...
@@ -352,9 +352,8 @@ func (c *csiAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMo
...
@@ -352,9 +352,8 @@ func (c *csiAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMo
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
log
(
"attacher.MountDevice failed: %v"
,
err
))
glog
.
Errorf
(
log
(
"attacher.MountDevice failed: %v"
,
err
))
if
err
:=
removeMountDir
(
c
.
plugin
,
deviceMountPath
);
err
!=
nil
{
if
removeMountDirErr
:=
removeMountDir
(
c
.
plugin
,
deviceMountPath
);
removeMountDirErr
!=
nil
{
glog
.
Error
(
log
(
"attacher.MountDevice failed to remove mount dir after a NodeStageVolume() error [%s]: %v"
,
deviceMountPath
,
err
))
glog
.
Error
(
log
(
"attacher.MountDevice failed to remove mount dir after a NodeStageVolume() error [%s]: %v"
,
deviceMountPath
,
removeMountDirErr
))
return
err
}
}
return
err
return
err
}
}
...
...
pkg/volume/csi/csi_mounter.go
View file @
23dbd699
...
@@ -207,9 +207,8 @@ func (c *csiMountMgr) SetUpAt(dir string, fsGroup *int64) error {
...
@@ -207,9 +207,8 @@ func (c *csiMountMgr) SetUpAt(dir string, fsGroup *int64) error {
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
log
(
"mounter.SetupAt failed: %v"
,
err
))
glog
.
Errorf
(
log
(
"mounter.SetupAt failed: %v"
,
err
))
if
err
:=
removeMountDir
(
c
.
plugin
,
dir
);
err
!=
nil
{
if
removeMountDirErr
:=
removeMountDir
(
c
.
plugin
,
dir
);
removeMountDirErr
!=
nil
{
glog
.
Error
(
log
(
"mounter.SetuAt failed to remove mount dir after a NodePublish() error [%s]: %v"
,
dir
,
err
))
glog
.
Error
(
log
(
"mounter.SetupAt failed to remove mount dir after a NodePublish() error [%s]: %v"
,
dir
,
removeMountDirErr
))
return
err
}
}
return
err
return
err
}
}
...
...
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