Skip to content

Commit

Permalink
Docker returns 'die' status rather then 'died' status
Browse files Browse the repository at this point in the history
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: containers#10168

[NO TESTS NEEDED] No easy way to test this.

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Apr 28, 2021
1 parent 928dce5 commit 92371d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/api/handlers/compat/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 92371d6

Please sign in to comment.