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
96476fd0
Commit
96476fd0
authored
Apr 11, 2019
by
Travis Rhoden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix linting issues for exec mounter
parent
f38d4938
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
exec_mount.go
pkg/volume/util/exec/exec_mount.go
+3
-1
exec_mount_unsupported.go
pkg/volume/util/exec/exec_mount_unsupported.go
+2
-2
No files found.
pkg/volume/util/exec/exec_mount.go
View file @
96476fd0
...
...
@@ -34,6 +34,8 @@ type execMounter struct {
exec
mount
.
Exec
}
// NewExecMounter returns a mounter that uses provided Exec interface to mount and
// unmount a filesystem. For all other calls it uses a wrapped mounter.
func
NewExecMounter
(
exec
mount
.
Exec
,
wrapped
mount
.
Interface
)
mount
.
Interface
{
return
&
execMounter
{
wrappedMounter
:
wrapped
,
...
...
@@ -66,7 +68,7 @@ func (m *execMounter) doExecMount(source, target, fstype string, options []strin
output
,
err
:=
m
.
exec
.
Run
(
"mount"
,
mountArgs
...
)
klog
.
V
(
5
)
.
Infof
(
"Exec mounted %v: %v: %s"
,
mountArgs
,
err
,
string
(
output
))
if
err
!=
nil
{
return
fmt
.
Errorf
(
"mount failed: %v
\n
Mounting command: %s
\n
Mounting arguments: %s %s %s %v
\n
Output: %s
\n
"
,
return
fmt
.
Errorf
(
"mount failed: %v
\n
Mounting command: %s
\n
Mounting arguments: %s %s %s %v
\n
Output: %s"
,
err
,
"mount"
,
source
,
target
,
fstype
,
options
,
string
(
output
))
}
...
...
pkg/volume/util/exec/exec_mount_unsupported.go
View file @
96476fd0
...
...
@@ -27,7 +27,7 @@ import (
type
execMounter
struct
{}
//
ExecMounter i
s a mounter that uses provided Exec interface to mount and
//
NewExecMounter return
s a mounter that uses provided Exec interface to mount and
// unmount a filesystem. For all other calls it uses a wrapped mounter.
func
NewExecMounter
(
exec
mount
.
Exec
,
wrapped
mount
.
Interface
)
mount
.
Interface
{
return
&
execMounter
{}
...
...
@@ -85,7 +85,7 @@ func (mounter *execMounter) ExistsPath(pathname string) (bool, error) {
return
true
,
errors
.
New
(
"not implemented"
)
}
func
(
m
*
execMounter
)
EvalHostSymlinks
(
pathname
string
)
(
string
,
error
)
{
func
(
m
ounter
*
execMounter
)
EvalHostSymlinks
(
pathname
string
)
(
string
,
error
)
{
return
""
,
errors
.
New
(
"not implemented"
)
}
...
...
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