diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-06-19 17:08:43 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-06-19 17:08:43 -0400 |
commit | 92bae8d308164680287040ba26d211aefd9b4d7f (patch) | |
tree | 10a65a0322cba38d64f378259d2a596a4220ed56 /libpod/info.go | |
parent | 3cabd81045c25172786a133c538fe97b5ab83c14 (diff) | |
download | podman-92bae8d308164680287040ba26d211aefd9b4d7f.tar.gz podman-92bae8d308164680287040ba26d211aefd9b4d7f.tar.bz2 podman-92bae8d308164680287040ba26d211aefd9b4d7f.zip |
Begin adding support for multiple OCI runtimes
Allow Podman containers to request to use a specific OCI runtime
if multiple runtimes are configured. This is the first step to
properly supporting containers in a multi-runtime environment.
The biggest changes are that all OCI runtimes are now initialized
when Podman creates its runtime, and containers now use the
runtime requested in their configuration (instead of always the
default runtime).
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/info.go')
-rw-r--r-- | libpod/info.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libpod/info.go b/libpod/info.go index b42f64a1f..c96293e3d 100644 --- a/libpod/info.go +++ b/libpod/info.go @@ -47,12 +47,12 @@ func (r *Runtime) hostInfo() (map[string]interface{}, error) { hostDistributionInfo := r.GetHostDistributionInfo() info["Conmon"] = map[string]interface{}{ "path": r.conmonPath, - "package": r.ociRuntime.conmonPackage(), + "package": r.defaultOCIRuntime.conmonPackage(), "version": conmonVersion, } info["OCIRuntime"] = map[string]interface{}{ - "path": r.ociRuntime.path, - "package": r.ociRuntime.pathPackage(), + "path": r.defaultOCIRuntime.path, + "package": r.defaultOCIRuntime.pathPackage(), "version": ociruntimeVersion, } info["Distribution"] = map[string]interface{}{ @@ -190,12 +190,12 @@ func (r *Runtime) GetConmonVersion() (string, error) { // GetOCIRuntimePath returns the path to the OCI Runtime Path the runtime is using func (r *Runtime) GetOCIRuntimePath() string { - return r.ociRuntimePath.Paths[0] + return r.defaultOCIRuntime.path } // GetOCIRuntimeVersion returns a string representation of the oci runtimes version func (r *Runtime) GetOCIRuntimeVersion() (string, error) { - output, err := utils.ExecCmd(r.ociRuntimePath.Paths[0], "--version") + output, err := utils.ExecCmd(r.GetOCIRuntimePath(), "--version") if err != nil { return "", err } |