From 790a7ac030149ac95ce27a84dd844b816367eb6e Mon Sep 17 00:00:00 2001 From: Taewan Kim Date: Tue, 20 Apr 2021 11:20:58 +0900 Subject: [PATCH] [DataStorage] Change DataStorage configuration path to relative (#294) Signed-off-by: Taewan Kim - When edge-orchestration is executed in native with DataStorage mode on, the "could not load configuration file" error occurs if the conf file is not in the ./res folder. --- internal/controller/storagemgr/storage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/controller/storagemgr/storage.go b/internal/controller/storagemgr/storage.go index 89ca68b0..ea3821fa 100644 --- a/internal/controller/storagemgr/storage.go +++ b/internal/controller/storagemgr/storage.go @@ -26,7 +26,7 @@ import ( const ( dataStorageService = "datastorage" - dataStorageFilePath = "/var/edge-orchestration" + "/datastorage/configuration.toml" + dataStorageConfPath = "res/configuration.toml" ) type Storage interface{ @@ -46,7 +46,7 @@ func GetInstance() Storage { return storageIns } func (StorageImpl) StartStorage() error { - if _, err := os.Stat(dataStorageFilePath); err == nil { + if _, err := os.Stat(dataStorageConfPath); err == nil { sd := storagedriver.StorageDriver{} go startup.Bootstrap(dataStorageService, device.Version, &sd) return nil