summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-06-19 17:12:27 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-06-19 17:14:15 -0400
commitfa0e48f21aaf0bc186312b64719a3e7df39fb990 (patch)
treeaf4036bd277894bf24bcf643d794182d2f562e1c /libpod/runtime.go
parent92bae8d308164680287040ba26d211aefd9b4d7f (diff)
downloadpodman-fa0e48f21aaf0bc186312b64719a3e7df39fb990.tar.gz
podman-fa0e48f21aaf0bc186312b64719a3e7df39fb990.tar.bz2
podman-fa0e48f21aaf0bc186312b64719a3e7df39fb990.zip
Make a missing OCI runtime nonfatal
We may want to ship configurations including more than one runtime configuration - for example, crun and runc and kata, all configured. However, we don't want to make these extra runtimes hard requirements, so let's not fatally error when we can't find their executables. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index caeabbe9a..56ad1ffe8 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -826,7 +826,12 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (err error) {
ociRuntime, err := newOCIRuntime(name, paths, runtime.conmonPath, runtime.config, supportsJSON)
if err != nil {
- return err
+ // Don't fatally error.
+ // This will allow us to ship configs including optional
+ // runtimes that might not be installed (crun, kata).
+ // Only a warnf so default configs don't spec errors.
+ logrus.Warnf("Error initializing configured OCI runtime %s: %v", name, err)
+ continue
}
runtime.ociRuntimes[name] = ociRuntime