summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-21 13:56:17 -0500
committerGitHub <noreply@github.com>2021-01-21 13:56:17 -0500
commit469c2031fc1529ff81e1d8d9f05099ddca265174 (patch)
tree1fea8ee0e6c20a2be0da81f6f0413d7ce2bd2415 /pkg/api
parentac4ccdc3f17d6161b61831af231120748dd46982 (diff)
parent22d2caeeb1acadaced47bbacccec5f597e0d99f4 (diff)
downloadpodman-469c2031fc1529ff81e1d8d9f05099ddca265174.tar.gz
podman-469c2031fc1529ff81e1d8d9f05099ddca265174.tar.bz2
podman-469c2031fc1529ff81e1d8d9f05099ddca265174.zip
Merge pull request #9055 from baude/v3backportcomposelog
[3.0] Set log driver for compatability containers
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/compat/containers.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go
index 6e1945db1..5c5586323 100644
--- a/pkg/api/handlers/compat/containers.go
+++ b/pkg/api/handlers/compat/containers.go
@@ -326,6 +326,11 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON,
state.Running = true
}
+ // docker calls the configured state "created"
+ if state.Status == define.ContainerStateConfigured.String() {
+ state.Status = define.ContainerStateCreated.String()
+ }
+
formatCapabilities(inspect.HostConfig.CapDrop)
formatCapabilities(inspect.HostConfig.CapAdd)
@@ -337,6 +342,11 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON,
if err := json.Unmarshal(h, &hc); err != nil {
return nil, err
}
+
+ // k8s-file == json-file
+ if hc.LogConfig.Type == define.KubernetesLogging {
+ hc.LogConfig.Type = define.JSONLogging
+ }
g, err := json.Marshal(inspect.GraphDriver)
if err != nil {
return nil, err