mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Move rootless storage config into libpod
Previous commits ensured that we would use database-configured paths if not explicitly overridden. However, our runtime generation did unconditionally override storage config, which made this useless. Move rootless storage configuration setup to libpod, and change storage setup so we only override if a setting is explicitly set, so we can still override what we want. Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
@ -278,6 +278,15 @@ 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, err := util.GetDefaultRootlessStoreOptions()
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "error retrieving rootless storage config")
|
||||
}
|
||||
runtime.config.StorageConfig = storageConf
|
||||
}
|
||||
|
||||
configPath := ConfigPath
|
||||
foundConfig := true
|
||||
rootlessConfigPath := ""
|
||||
|
Reference in New Issue
Block a user