summaryrefslogtreecommitdiff
path: root/pkg/util/utils.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-14 21:45:58 +0100
committerGitHub <noreply@github.com>2019-02-14 21:45:58 +0100
commit8ec9eb0a7617b6c2db6ed092ab741552dc7cba02 (patch)
tree2d1212425257a8d332f4400d0896aa2e465176b0 /pkg/util/utils.go
parentdd82acd8ba02be51ec5fea65584e1f7b2036d7c8 (diff)
parent52df1fa7e054d577e8416d1d46db1741ad324d4a (diff)
downloadpodman-8ec9eb0a7617b6c2db6ed092ab741552dc7cba02.tar.gz
podman-8ec9eb0a7617b6c2db6ed092ab741552dc7cba02.tar.bz2
podman-8ec9eb0a7617b6c2db6ed092ab741552dc7cba02.zip
Merge pull request #2229 from rhatdan/volumes
Fix volume handling in podman
Diffstat (limited to 'pkg/util/utils.go')
-rw-r--r--pkg/util/utils.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/pkg/util/utils.go b/pkg/util/utils.go
index 52f431881..db8a3d5bb 100644
--- a/pkg/util/utils.go
+++ b/pkg/util/utils.go
@@ -259,8 +259,8 @@ func GetRootlessStorageOpts() (storage.StoreOptions, error) {
return opts, nil
}
-// GetRootlessVolumeInfo returns where all the name volumes will be created in rootless mode
-func GetRootlessVolumeInfo() (string, error) {
+// GetRootlessVolumePath returns where all the name volumes will be created in rootless mode
+func GetRootlessVolumePath() (string, error) {
dataDir, _, err := GetRootlessDirInfo()
if err != nil {
return "", err
@@ -307,15 +307,13 @@ func GetDefaultStoreOptions() (storage.StoreOptions, string, error) {
err error
)
storageOpts := storage.DefaultStoreOptions
- volumePath := "/var/lib/containers/storage"
-
+ volumePath := filepath.Join(storageOpts.GraphRoot, "volumes")
if rootless.IsRootless() {
storageOpts, err = GetRootlessStorageOpts()
if err != nil {
return storageOpts, volumePath, err
}
-
- volumePath, err = GetRootlessVolumeInfo()
+ volumePath, err = GetRootlessVolumePath()
if err != nil {
return storageOpts, volumePath, err
}