summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/events.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-04-28 14:32:38 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-04-28 15:56:19 -0400
commit92371d63827465bbb723af822e4d6cd1da1a07f3 (patch)
treee0d75faa94a8d625cb82d82f13f0fbbc4791a2e6 /pkg/api/handlers/compat/events.go
parent928dce57dfb11c110801547b9852aa4f87e37bb4 (diff)
downloadpodman-92371d63827465bbb723af822e4d6cd1da1a07f3.tar.gz
podman-92371d63827465bbb723af822e4d6cd1da1a07f3.tar.bz2
podman-92371d63827465bbb723af822e4d6cd1da1a07f3.zip
Docker returns 'die' status rather then 'died' status
In order to be more compatible with Docker, we should return a container die status rather then a "container died", Too late to change this for Podman. Partially fixes: https://github.com/containers/podman/issues/10168 [NO TESTS NEEDED] No easy way to test this. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/api/handlers/compat/events.go')
-rw-r--r--pkg/api/handlers/compat/events.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/api/handlers/compat/events.go b/pkg/api/handlers/compat/events.go
index dd0a9e7a9..405e616c5 100644
--- a/pkg/api/handlers/compat/events.go
+++ b/pkg/api/handlers/compat/events.go
@@ -89,6 +89,10 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
}
e := entities.ConvertToEntitiesEvent(*evt)
+ if !utils.IsLibpodRequest(r) && e.Status == "died" {
+ e.Status = "die"
+ }
+
if err := coder.Encode(e); err != nil {
logrus.Errorf("unable to write json: %q", err)
}