aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/handlers/libpod
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-01-20 17:13:54 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-01-29 14:04:44 -0500
commit073f76c1327d296360caa04ef7d751dd00ef5a53 (patch)
treea67939035cf627e6548f70c6643a520dc8241817 /pkg/api/handlers/libpod
parent8f3bcf62474bbfba26982bae88febecd4fa630c2 (diff)
downloadpodman-073f76c1327d296360caa04ef7d751dd00ef5a53.tar.gz
podman-073f76c1327d296360caa04ef7d751dd00ef5a53.tar.bz2
podman-073f76c1327d296360caa04ef7d751dd00ef5a53.zip
Switch podman stop/kill/wait handlers to use abi
Change API Handlers to use the same functions that the local podman uses. At the same time: implement remote API for --all and --ignore flags for podman stop implement remote API for --all flags for podman stop Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/api/handlers/libpod')
-rw-r--r--pkg/api/handlers/libpod/containers.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/api/handlers/libpod/containers.go b/pkg/api/handlers/libpod/containers.go
index a0cb1d49e..f6e348cef 100644
--- a/pkg/api/handlers/libpod/containers.go
+++ b/pkg/api/handlers/libpod/containers.go
@@ -148,6 +148,12 @@ 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)))