Skip to content

Commit

Permalink
Merge pull request #469 from codenrhoden/bugfix/scaleio_exec_diskbyid
Browse files Browse the repository at this point in the history
return empty vol map if /dev/disk/by-id not there
  • Loading branch information
akutz authored Mar 23, 2017
2 parents efd3a91 + 261b3f0 commit 9b22f02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/storage/scaleio/executor/scaleio_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ const diskIDPath = "/dev/disk/by-id"

func getLocalVolumeMap() (map[string]string, error) {
volMap := map[string]string{}

if !gotil.FileExists(diskIDPath) {
// the diskIDPath does not exist -- therefore no vols
return volMap, nil
}
files, err := ioutil.ReadDir(diskIDPath)
if err != nil {
return nil, err
Expand Down

0 comments on commit 9b22f02

Please sign in to comment.