summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-03-15 17:05:03 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-03-15 17:05:06 +0100
commit7efefde3bcb998f37bd2fcde4f004c5bbee13dd5 (patch)
tree3a908ac8483eaebd6118139fd1f3502d187a9e2b
parent8aed32acea9bb35898abcee58fc9aa2a03ef264a (diff)
downloadpodman-7efefde3bcb998f37bd2fcde4f004c5bbee13dd5.tar.gz
podman-7efefde3bcb998f37bd2fcde4f004c5bbee13dd5.tar.bz2
podman-7efefde3bcb998f37bd2fcde4f004c5bbee13dd5.zip
rootless: write the custom config file before reload
so that when we do a rootlessReload we inherit the correct settings from the command line. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--libpod/runtime.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 9836b7aab..f7ca6b135 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -505,10 +505,6 @@ func newRuntimeFromConfig(userConfigPath string, options ...RuntimeOption) (runt
return nil, errors.Wrapf(err, "error configuring runtime")
}
}
- if err := makeRuntime(runtime); err != nil {
- return nil, err
- }
-
if !foundConfig && rootlessConfigPath != "" {
os.MkdirAll(filepath.Dir(rootlessConfigPath), 0755)
file, err := os.OpenFile(rootlessConfigPath, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0666)
@@ -523,6 +519,9 @@ func newRuntimeFromConfig(userConfigPath string, options ...RuntimeOption) (runt
}
}
}
+ if err := makeRuntime(runtime); err != nil {
+ return nil, err
+ }
return runtime, nil
}