From 261b3f0483279932dbe26bc4c7a4addb8f68fb59 Mon Sep 17 00:00:00 2001 From: Travis Rhoden Date: Thu, 16 Mar 2017 14:40:14 -0700 Subject: [PATCH] return empty vol map if /dev/disk/by-id not there --- drivers/storage/scaleio/executor/scaleio_executor.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/storage/scaleio/executor/scaleio_executor.go b/drivers/storage/scaleio/executor/scaleio_executor.go index ac23ba3f..e50b01a7 100644 --- a/drivers/storage/scaleio/executor/scaleio_executor.go +++ b/drivers/storage/scaleio/executor/scaleio_executor.go @@ -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