aboutsummaryrefslogtreecommitdiff
path: root/libpod/oci.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-06-13 14:21:13 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-06-13 14:21:13 +0200
commit13e1afdb02592ab4b0e4e7fb936c76f5c7dda20a (patch)
treedd21a1e14c8895d01cbf8ce8ac193dc33e2f7917 /libpod/oci.go
parent6e4ce54d33df0c43392fd247d42106802ca556df (diff)
downloadpodman-13e1afdb02592ab4b0e4e7fb936c76f5c7dda20a.tar.gz
podman-13e1afdb02592ab4b0e4e7fb936c76f5c7dda20a.tar.bz2
podman-13e1afdb02592ab4b0e4e7fb936c76f5c7dda20a.zip
oci: allow to specify what runtimes support JSON
add a new configuration `runtime_supports_json` to list what OCI runtimes support the --log-format=json option. If the runtime is not listed here, libpod will redirect stdout/stderr from the runtime process. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/oci.go')
-rw-r--r--libpod/oci.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/oci.go b/libpod/oci.go
index 0a730b799..dcb72fc1b 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -58,6 +58,7 @@ type OCIRuntime struct {
logSizeMax int64
noPivot bool
reservePorts bool
+ supportsJSON bool
}
// syncInfo is used to return data from monitor process to daemon
@@ -75,7 +76,7 @@ type ociError struct {
}
// 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) {
+func newOCIRuntime(oruntime OCIRuntimePath, conmonPath string, conmonEnv []string, cgroupManager string, tmpDir string, logSizeMax int64, noPivotRoot bool, reservePorts bool, supportsJSON bool) (*OCIRuntime, error) {
runtime := new(OCIRuntime)
runtime.name = oruntime.Name
runtime.path = oruntime.Paths[0]
@@ -86,6 +87,7 @@ func newOCIRuntime(oruntime OCIRuntimePath, conmonPath string, conmonEnv []strin
runtime.logSizeMax = logSizeMax
runtime.noPivot = noPivotRoot
runtime.reservePorts = reservePorts
+ runtime.supportsJSON = supportsJSON
runtime.exitsDir = filepath.Join(runtime.tmpDir, "exits")
runtime.socketsDir = filepath.Join(runtime.tmpDir, "socket")