diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-05 04:41:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-05 04:41:41 -0500 |
commit | 42d4652fed759904bb51a5d3420724dc25009494 (patch) | |
tree | e75db0e16733dfbf688168293042e972f2b1c1c0 /pkg/api/handlers/libpod | |
parent | 4a0ae01261f2aa90c37d95b7cc4415682e96dead (diff) | |
parent | 05444cb2ccf29515e6cb8f2711c64213b7cb3325 (diff) | |
download | podman-42d4652fed759904bb51a5d3420724dc25009494.tar.gz podman-42d4652fed759904bb51a5d3420724dc25009494.tar.bz2 podman-42d4652fed759904bb51a5d3420724dc25009494.zip |
Merge pull request #9048 from matejvasek/apiv2_wait
Fix Docker APIv2 container wait endpoint
Diffstat (limited to 'pkg/api/handlers/libpod')
-rw-r--r-- | pkg/api/handlers/libpod/containers.go | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/pkg/api/handlers/libpod/containers.go b/pkg/api/handlers/libpod/containers.go index f6e348cef..619cbfd8b 100644 --- a/pkg/api/handlers/libpod/containers.go +++ b/pkg/api/handlers/libpod/containers.go @@ -4,7 +4,6 @@ import ( "io/ioutil" "net/http" "os" - "strconv" "github.com/containers/podman/v2/libpod" "github.com/containers/podman/v2/libpod/define" @@ -146,17 +145,7 @@ func GetContainer(w http.ResponseWriter, r *http.Request) { } func WaitContainer(w http.ResponseWriter, r *http.Request) { - exitCode, err := utils.WaitContainer(w, r) - if err != nil { - name := utils.GetName(r) - if errors.Cause(err) == define.ErrNoSuchCtr { - utils.ContainerNotFound(w, name, err) - return - } - logrus.Warnf("failed to wait on container %q: %v", name, err) - return - } - utils.WriteResponse(w, http.StatusOK, strconv.Itoa(int(exitCode))) + utils.WaitContainerLibpod(w, r) } func UnmountContainer(w http.ResponseWriter, r *http.Request) { |