Commit 3c5b57b2 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #21805 from childsb/CanSupport_fix

Auto commit by PR queue bot
parents 2e038223 7fed6f9f
......@@ -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 false
return true
}
func (plugin *fcPlugin) GetAccessModes() []api.PersistentVolumeAccessMode {
......
......@@ -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 false
return true
}
func (plugin *iscsiPlugin) GetAccessModes() []api.PersistentVolumeAccessMode {
......
......@@ -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 false
return true
}
func (plugin *rbdPlugin) GetAccessModes() []api.PersistentVolumeAccessMode {
......
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