Skip to content

Commit

Permalink
[DataStorage] Change DataStorage configuration path to relative (#294)
Browse files Browse the repository at this point in the history
Signed-off-by: Taewan Kim <t25.kim@samsung.com>

- 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.
  • Loading branch information
tiokim authored Apr 20, 2021
1 parent 9e190bf commit 790a7ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/storagemgr/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

const (
dataStorageService = "datastorage"
dataStorageFilePath = "/var/edge-orchestration" + "/datastorage/configuration.toml"
dataStorageConfPath = "res/configuration.toml"
)

type Storage interface{
Expand All @@ -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
Expand Down

0 comments on commit 790a7ac

Please sign in to comment.