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
No known key found for this signature in database
GPG key ID: 8137D474EBCB04F2

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