Skip to content

Commit

Permalink
Merge pull request #5953 from rhatdan/v1.9
Browse files Browse the repository at this point in the history
Don't check configuration until user input is applied
  • Loading branch information
openshift-merge-robot authored Apr 27, 2020
2 parents e4b4eaa + f44f830 commit ca15a83
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion cmd/podman/cliconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,6 @@ type UntagValues struct {
func GetDefaultConfig() *config.Config {
var err error
conf, err := config.NewConfig("")
conf.CheckCgroupsAndAdjustConfig()
if err != nil {
logrus.Errorf("Error loading container config %v\n", err)
os.Exit(1)
Expand Down
3 changes: 3 additions & 0 deletions cmd/podman/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ func before(cmd *cobra.Command, args []string) error {
return err
}

defaultContainerConfig.Engine.CgroupManager = MainGlobalOpts.CGroupManager
defaultContainerConfig.CheckCgroupsAndAdjustConfig()

if err := setupRootless(cmd, args); err != nil {
return err
}
Expand Down
3 changes: 2 additions & 1 deletion libpod/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ func NewRuntime(ctx context.Context, options ...RuntimeOption) (runtime *Runtime
if err != nil {
return nil, err
}
runtime, err = newRuntimeFromConfig(ctx, conf, options...)
conf.CheckCgroupsAndAdjustConfig()
return newRuntimeFromConfig(ctx, conf, options...)
return runtime, err
}

// NewRuntimeFromConfig creates a new container runtime using the given
Expand Down

0 comments on commit ca15a83

Please sign in to comment.