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
3c5b57b2
Commit
3c5b57b2
authored
Mar 05, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21805 from childsb/CanSupport_fix
Auto commit by PR queue bot
parents
2e038223
7fed6f9f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
22 deletions
+3
-22
fc.go
pkg/volume/fc/fc.go
+1
-8
iscsi.go
pkg/volume/iscsi/iscsi.go
+1
-8
rbd.go
pkg/volume/rbd/rbd.go
+1
-6
No files found.
pkg/volume/fc/fc.go
View file @
3c5b57b2
...
...
@@ -59,15 +59,8 @@ func (plugin *fcPlugin) CanSupport(spec *volume.Spec) bool {
if
(
spec
.
Volume
!=
nil
&&
spec
.
Volume
.
FC
==
nil
)
||
(
spec
.
PersistentVolume
!=
nil
&&
spec
.
PersistentVolume
.
Spec
.
FC
==
nil
)
{
return
false
}
// TODO: turn this into a func so CanSupport can be unit tested without
// having to make system calls
// see if /sys/class/fc_transport is there, which indicates fc is connected
_
,
err
:=
plugin
.
execCommand
(
"ls"
,
[]
string
{
"/sys/class/fc_transport"
})
if
err
==
nil
{
return
true
}
return
fals
e
return
tru
e
}
func
(
plugin
*
fcPlugin
)
GetAccessModes
()
[]
api
.
PersistentVolumeAccessMode
{
...
...
pkg/volume/iscsi/iscsi.go
View file @
3c5b57b2
...
...
@@ -59,15 +59,8 @@ func (plugin *iscsiPlugin) CanSupport(spec *volume.Spec) bool {
if
(
spec
.
Volume
!=
nil
&&
spec
.
Volume
.
ISCSI
==
nil
)
||
(
spec
.
PersistentVolume
!=
nil
&&
spec
.
PersistentVolume
.
Spec
.
ISCSI
==
nil
)
{
return
false
}
// TODO: turn this into a func so CanSupport can be unit tested without
// having to make system calls
// see if iscsiadm is there
_
,
err
:=
plugin
.
execCommand
(
"iscsiadm"
,
[]
string
{
"-h"
})
if
err
==
nil
{
return
true
}
return
fals
e
return
tru
e
}
func
(
plugin
*
iscsiPlugin
)
GetAccessModes
()
[]
api
.
PersistentVolumeAccessMode
{
...
...
pkg/volume/rbd/rbd.go
View file @
3c5b57b2
...
...
@@ -58,13 +58,8 @@ func (plugin *rbdPlugin) CanSupport(spec *volume.Spec) bool {
if
(
spec
.
Volume
!=
nil
&&
spec
.
Volume
.
RBD
==
nil
)
||
(
spec
.
PersistentVolume
!=
nil
&&
spec
.
PersistentVolume
.
Spec
.
RBD
==
nil
)
{
return
false
}
// see if rbd is there
_
,
err
:=
plugin
.
execCommand
(
"rbd"
,
[]
string
{
"-h"
})
if
err
==
nil
{
return
true
}
return
fals
e
return
tru
e
}
func
(
plugin
*
rbdPlugin
)
GetAccessModes
()
[]
api
.
PersistentVolumeAccessMode
{
...
...
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