Skip to content

Commit

Permalink
return empty vol map if /dev/disk/by-id not there
Browse files Browse the repository at this point in the history
  • Loading branch information
codenrhoden committed Mar 23, 2017
1 parent efd3a91 commit 261b3f0
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 261b3f0

Please sign in to comment.