diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2019-11-06 08:52:10 +0100 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-12-10 10:46:31 -0500 |
commit | a05ee7e7e38accc86d3105742de91f0e29b4480d (patch) | |
tree | 5befc427436f9b5640a16a5e4f276706746ca098 | |
parent | 0436cf29e57b3118c6fa22597240731913556a6f (diff) | |
download | podman-a05ee7e7e38accc86d3105742de91f0e29b4480d.tar.gz podman-a05ee7e7e38accc86d3105742de91f0e29b4480d.tar.bz2 podman-a05ee7e7e38accc86d3105742de91f0e29b4480d.zip |
help message: don't parse the config for cgroup-manager default
Do not generate an entire `config.Config` for displaying the default
value for the --cgroup-manager flag and just default to systemd. Not
using the `config.Config` is okay as 1) the value may change at runtime
in any case (rootless, DBUS access, etc.), 2) it avoids to redundantly
parse the system config files and to generate the hard-coded default
config, and 3) the log-level and other attributes are not yet set during
init() causing undesirable side effects.
Fixes: #4456
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
-rw-r--r-- | cmd/podman/main_local.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/cmd/podman/main_local.go b/cmd/podman/main_local.go index 6057eeec3..f630f1210 100644 --- a/cmd/podman/main_local.go +++ b/cmd/podman/main_local.go @@ -16,7 +16,6 @@ import ( "github.com/containers/libpod/cmd/podman/cliconfig" "github.com/containers/libpod/cmd/podman/libpodruntime" - "github.com/containers/libpod/libpod/config" "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/cgroups" "github.com/containers/libpod/pkg/rootless" @@ -34,9 +33,6 @@ const remote = false func init() { cgroupManager := define.SystemdCgroupsManager - if runtimeConfig, err := config.NewConfig(""); err == nil { - cgroupManager = runtimeConfig.CgroupManager - } cgroupHelp := "Cgroup manager to use (cgroupfs or systemd)" cgroupv2, _ := cgroups.IsCgroup2UnifiedMode() if rootless.IsRootless() && !cgroupv2 { |