Skip to content

Commit

Permalink
legacy events: also set Action="die"
Browse files Browse the repository at this point in the history
Since containers#10168, on the event "died", the Status is set to "die"
for compatibility with the Docker API.  Docker also sets
the field Action to "died", so do the same here.

Signed-off-by: Leah Neukirchen <[email protected]>
  • Loading branch information
leahneukirchen committed Dec 17, 2021
1 parent 820cf0e commit a1ebde1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/api/handlers/compat/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
e := entities.ConvertToEntitiesEvent(*evt)
if !utils.IsLibpodRequest(r) && e.Status == "died" {
e.Status = "die"
e.Action = "die"
}

if err := coder.Encode(e); err != nil {
Expand Down

0 comments on commit a1ebde1

Please sign in to comment.