From 5511cdc4879925c14243be915c51fd7e02d7a2f7 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 26 Feb 2019 15:39:13 -0500 Subject: Ensure volume path is set appropriately by default There are some cases where we might not be properly adjusting the volume path after setting the storage graph root. Ensure that we always set volume path to be a child of graph root. Signed-off-by: Matthew Heon --- pkg/util/utils.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/util/utils.go') diff --git a/pkg/util/utils.go b/pkg/util/utils.go index db8a3d5bb..2468d525a 100644 --- a/pkg/util/utils.go +++ b/pkg/util/utils.go @@ -325,6 +325,7 @@ func GetDefaultStoreOptions() (storage.StoreOptions, string, error) { defaultRootlessGraphRoot = storageOpts.GraphRoot storageOpts = storage.StoreOptions{} storage.ReloadConfigurationFile(storageConf, &storageOpts) + volumePath = filepath.Join(storageOpts.GraphRoot, "volumes") } if rootless.IsRootless() { @@ -351,6 +352,7 @@ func GetDefaultStoreOptions() (storage.StoreOptions, string, error) { if storageOpts.GraphRoot == "" { storageOpts.GraphRoot = defaultRootlessGraphRoot } + volumePath = filepath.Join(storageOpts.GraphRoot, "volumes") } } return storageOpts, volumePath, nil -- cgit v1.2.3-54-g00ecf