diff options
author | Leah Neukirchen <leah@vuxu.org> | 2021-12-17 15:23:34 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-01-03 14:00:13 +0100 |
commit | 116a276e8ca28beca9e60a21680ab3cb94fd5aa1 (patch) | |
tree | 1945c073d58da49b4a28ea8ccfba3d9ea44c8b5b /pkg/api/handlers | |
parent | a1ebde118a96930d56cb630824157ccbfff619cc (diff) | |
download | podman-116a276e8ca28beca9e60a21680ab3cb94fd5aa1.tar.gz podman-116a276e8ca28beca9e60a21680ab3cb94fd5aa1.tar.bz2 podman-116a276e8ca28beca9e60a21680ab3cb94fd5aa1.zip |
legacy events: also set exitCode
For Status = "die", Docker sets the exit code of the container
to a field "exitCode". Podman uses "containerExitCode".
Copy the value into "exitCode" as well, for compatibility.
Signed-off-by: Leah Neukirchen <leah@vuxu.org>
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r-- | pkg/api/handlers/compat/events.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/api/handlers/compat/events.go b/pkg/api/handlers/compat/events.go index 4f23e681f..bc31a36c4 100644 --- a/pkg/api/handlers/compat/events.go +++ b/pkg/api/handlers/compat/events.go @@ -92,6 +92,7 @@ func GetEvents(w http.ResponseWriter, r *http.Request) { if !utils.IsLibpodRequest(r) && e.Status == "died" { e.Status = "die" e.Action = "die" + e.Actor.Attributes["exitCode"] = e.Actor.Attributes["containerExitCode"] } if err := coder.Encode(e); err != nil { |