summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/pods.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-12-06 15:20:04 -0600
committerbaude <bbaude@redhat.com>2018-12-07 10:27:41 -0600
commit52098941000794180a358a6983237cc6c4d30fc1 (patch)
tree43c3b281705451de684007dbb8e087b2a15a30bf /pkg/varlinkapi/pods.go
parenta387c723a90a787a1d35c4a9b3b54347d5c08436 (diff)
downloadpodman-52098941000794180a358a6983237cc6c4d30fc1.tar.gz
podman-52098941000794180a358a6983237cc6c4d30fc1.tar.bz2
podman-52098941000794180a358a6983237cc6c4d30fc1.zip
add timeout to pod stop
like podman stop of containers, we should allow the user to specify a timeout override when stopping pods; otherwise they have to wait the full timeout time specified during the pod/container creation. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/varlinkapi/pods.go')
-rw-r--r--pkg/varlinkapi/pods.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/varlinkapi/pods.go b/pkg/varlinkapi/pods.go
index 7930a956f..461371497 100644
--- a/pkg/varlinkapi/pods.go
+++ b/pkg/varlinkapi/pods.go
@@ -120,12 +120,12 @@ func (i *LibpodAPI) StartPod(call iopodman.VarlinkCall, name string) error {
}
// StopPod ...
-func (i *LibpodAPI) StopPod(call iopodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) StopPod(call iopodman.VarlinkCall, name string, timeout int64) error {
pod, err := i.Runtime.LookupPod(name)
if err != nil {
return call.ReplyPodNotFound(name)
}
- ctrErrs, err := pod.Stop(getContext(), true)
+ ctrErrs, err := pod.StopWithTimeout(getContext(), true, int(timeout))
callErr := handlePodCall(call, pod, ctrErrs, err)
if callErr != nil {
return err