diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-21 13:56:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-21 13:56:17 -0500 |
commit | 469c2031fc1529ff81e1d8d9f05099ddca265174 (patch) | |
tree | 1fea8ee0e6c20a2be0da81f6f0413d7ce2bd2415 /pkg/api | |
parent | ac4ccdc3f17d6161b61831af231120748dd46982 (diff) | |
parent | 22d2caeeb1acadaced47bbacccec5f597e0d99f4 (diff) | |
download | podman-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.go | 10 |
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 |