summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/libpod
diff options
context:
space:
mode:
authorMatej Vasek <mvasek@redhat.com>2021-02-01 20:13:04 +0100
committerMatej Vasek <mvasek@redhat.com>2021-02-03 22:10:27 +0100
commit4a219aa234ff4ed3cd9d139ca88d8d5da6406493 (patch)
treed7011e94569f586babaf59304a5db041cf33fd9f /pkg/api/handlers/libpod
parentfc385806dfe1d13a7d4e4bdaeea93a22a55bd3d4 (diff)
downloadpodman-4a219aa234ff4ed3cd9d139ca88d8d5da6406493.tar.gz
podman-4a219aa234ff4ed3cd9d139ca88d8d5da6406493.tar.bz2
podman-4a219aa234ff4ed3cd9d139ca88d8d5da6406493.zip
Implement Docker wait conditions
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Diffstat (limited to 'pkg/api/handlers/libpod')
-rw-r--r--pkg/api/handlers/libpod/containers.go13
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) {