diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-06-12 22:35:25 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-06-13 10:27:06 +0200 |
commit | 6e4ce54d33df0c43392fd247d42106802ca556df (patch) | |
tree | 8717e8f907b92d2fcdf74e8a2ce10d3bdfaea902 /libpod/oci.go | |
parent | 77d1cf0a3288da0459c92790a0c2dddf8a68242e (diff) | |
download | podman-6e4ce54d33df0c43392fd247d42106802ca556df.tar.gz podman-6e4ce54d33df0c43392fd247d42106802ca556df.tar.bz2 podman-6e4ce54d33df0c43392fd247d42106802ca556df.zip |
oci: use json formatted errors from the runtime
request json formatted error messages from the OCI runtime so that we
can nicely print them.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/oci.go')
-rw-r--r-- | libpod/oci.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/oci.go b/libpod/oci.go index 7138108c5..0a730b799 100644 --- a/libpod/oci.go +++ b/libpod/oci.go @@ -66,6 +66,14 @@ type syncInfo struct { Message string `json:"message,omitempty"` } +// ociError is used to parse the OCI runtime JSON log. It is not part of the +// OCI runtime specifications, it follows what runc does +type ociError struct { + Level string `json:"level,omitempty"` + Time string `json:"time,omitempty"` + Msg string `json:"msg,omitempty"` +} + // Make a new OCI runtime with provided options func newOCIRuntime(oruntime OCIRuntimePath, conmonPath string, conmonEnv []string, cgroupManager string, tmpDir string, logSizeMax int64, noPivotRoot bool, reservePorts bool) (*OCIRuntime, error) { runtime := new(OCIRuntime) |