diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-02-27 14:25:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-27 14:25:16 +0100 |
commit | 70d3cc2e73caf64fc978c1349da45c9a5551b210 (patch) | |
tree | a635aca13ac0e3aa95a784ae21b2ce37f19acd10 /libpod | |
parent | f7f266e3618c6e4a9aa2c2c8c29ea40cf7087b0c (diff) | |
parent | f68a243f8ee4d36990a50fa490dc427520dc8a14 (diff) | |
download | podman-70d3cc2e73caf64fc978c1349da45c9a5551b210.tar.gz podman-70d3cc2e73caf64fc978c1349da45c9a5551b210.tar.bz2 podman-70d3cc2e73caf64fc978c1349da45c9a5551b210.zip |
Merge pull request #2454 from mheon/all_your_defaults_belong_to_libpod
Move all storage configuration defaults into libpod
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/runtime.go | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index 827c22f5b..f53cdd8b8 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -331,16 +331,13 @@ func NewRuntime(options ...RuntimeOption) (runtime *Runtime, err error) { deepcopier.Copy(defaultRuntimeConfig).To(runtime.config) runtime.config.TmpDir = tmpDir - if rootless.IsRootless() { - // If we're rootless, override the default storage config - storageConf, volumePath, err := util.GetDefaultStoreOptions() - if err != nil { - return nil, errors.Wrapf(err, "error retrieving rootless storage config") - } - runtime.config.StorageConfig = storageConf - runtime.config.StaticDir = filepath.Join(storageConf.GraphRoot, "libpod") - runtime.config.VolumePath = volumePath + storageConf, err := util.GetDefaultStoreOptions() + if err != nil { + return nil, errors.Wrapf(err, "error retrieving rootless storage config") } + runtime.config.StorageConfig = storageConf + runtime.config.StaticDir = filepath.Join(storageConf.GraphRoot, "libpod") + runtime.config.VolumePath = filepath.Join(storageConf.GraphRoot, "volumes") configPath := ConfigPath foundConfig := true |