summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-02-26 15:39:13 -0500
committerMatthew Heon <matthew.heon@pm.me>2019-02-26 15:39:13 -0500
commit5511cdc4879925c14243be915c51fd7e02d7a2f7 (patch)
tree28b7b05e4cb399b9d4d71cd250d547b5a0f80bda /pkg
parentb8e6ef618bd9233796ef6dbff187052a499ea022 (diff)
downloadpodman-5511cdc4879925c14243be915c51fd7e02d7a2f7.tar.gz
podman-5511cdc4879925c14243be915c51fd7e02d7a2f7.tar.bz2
podman-5511cdc4879925c14243be915c51fd7e02d7a2f7.zip
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 <matthew.heon@pm.me>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/util/utils.go2
1 files changed, 2 insertions, 0 deletions
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