diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-06-19 17:12:27 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-06-19 17:14:15 -0400 |
commit | fa0e48f21aaf0bc186312b64719a3e7df39fb990 (patch) | |
tree | af4036bd277894bf24bcf643d794182d2f562e1c | |
parent | 92bae8d308164680287040ba26d211aefd9b4d7f (diff) | |
download | podman-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>
-rw-r--r-- | libpod/runtime.go | 7 |
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 |