Fix swallowed error in iscsi package

This commit is contained in:
Lars Lehtonen
2017-08-25 20:57:58 -07:00
parent 85f963310e
commit 47ee11437d

3
pkg/volume/iscsi/iscsi_util.go Executable file → Normal file
View File

@@ -294,6 +294,9 @@ func (util *ISCSIUtil) AttachDisk(b iscsiDiskMounter) error {
// mount it
globalPDPath := b.manager.MakeGlobalPDName(*b.iscsiDisk)
notMnt, err := b.mounter.IsLikelyNotMountPoint(globalPDPath)
if err != nil {
return fmt.Errorf("Heuristic determination of mount point failed:%v", err)
}
if !notMnt {
glog.Infof("iscsi: %s already mounted", globalPDPath)
return nil