diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-12 16:06:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-12 16:06:47 +0200 |
commit | f18cfa47686a30166cfe6f743dbda0e13575e4f2 (patch) | |
tree | 8c5869f0b05d0e6c7db48dcdc520e04757ab6ea9 | |
parent | 2348c2873f1518b2b39adbfffd19ea295f7457e2 (diff) | |
parent | 79aeed96813ec08d63faba7f026703c45f2e010d (diff) | |
download | podman-f18cfa47686a30166cfe6f743dbda0e13575e4f2.tar.gz podman-f18cfa47686a30166cfe6f743dbda0e13575e4f2.tar.bz2 podman-f18cfa47686a30166cfe6f743dbda0e13575e4f2.zip |
Merge pull request #3787 from giuseppe/rootless-cherry-pick-oci-runtime
rootless: cherry-pick runtime from the system configuration
-rw-r--r-- | libpod/runtime.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index 83799a52b..8a4eee081 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -274,6 +274,8 @@ type runtimeConfiguredFrom struct { runtimePath bool cniPluginDir bool noPivotRoot bool + runtimeSupportsJSON bool + ociRuntime bool } func defaultRuntimeConfig() (RuntimeConfig, error) { @@ -593,6 +595,12 @@ func newRuntimeFromConfig(ctx context.Context, userConfigPath string, options .. if tmpConfig.NoPivotRoot { runtime.configuredFrom.noPivotRoot = true } + if tmpConfig.RuntimeSupportsJSON != nil { + runtime.configuredFrom.runtimeSupportsJSON = true + } + if tmpConfig.OCIRuntime != "" { + runtime.configuredFrom.ociRuntime = true + } if _, err := toml.Decode(string(contents), runtime.config); err != nil { return nil, errors.Wrapf(err, "error decoding configuration file %s", configPath) @@ -633,6 +641,13 @@ func newRuntimeFromConfig(ctx context.Context, userConfigPath string, options .. if !runtime.configuredFrom.noPivotRoot { runtime.config.NoPivotRoot = tmpConfig.NoPivotRoot } + if !runtime.configuredFrom.runtimeSupportsJSON { + runtime.config.RuntimeSupportsJSON = tmpConfig.RuntimeSupportsJSON + } + if !runtime.configuredFrom.ociRuntime { + runtime.config.OCIRuntime = tmpConfig.OCIRuntime + } + break } } |