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.
@@ -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
