diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-10-04 15:10:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 15:10:36 -0400 |
commit | a866a2f159f94976277d8a3a9459724af0b0f62f (patch) | |
tree | 341b34bcd9dc87efada13a522bb21c31097fef8a /libpod/runtime_pod.go | |
parent | 2f72f17a114f4e20b56deb2c21908d1d4610919c (diff) | |
parent | 21c9dc3c406bb486c44c4a27e5b0497bab1cd40d (diff) | |
download | podman-a866a2f159f94976277d8a3a9459724af0b0f62f.tar.gz podman-a866a2f159f94976277d8a3a9459724af0b0f62f.tar.bz2 podman-a866a2f159f94976277d8a3a9459724af0b0f62f.zip |
Merge pull request #11763 from rhatdan/timeout
Add --time option for podman * rm -f flag
Diffstat (limited to 'libpod/runtime_pod.go')
-rw-r--r-- | libpod/runtime_pod.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go index b142472e8..2389ee6d9 100644 --- a/libpod/runtime_pod.go +++ b/libpod/runtime_pod.go @@ -26,7 +26,7 @@ type PodFilter func(*Pod) bool // If force is specified with removeCtrs, all containers will be stopped before // being removed // Otherwise, the pod will not be removed if any containers are running -func (r *Runtime) RemovePod(ctx context.Context, p *Pod, removeCtrs, force bool) error { +func (r *Runtime) RemovePod(ctx context.Context, p *Pod, removeCtrs, force bool, timeout *uint) error { r.lock.Lock() defer r.lock.Unlock() @@ -45,7 +45,7 @@ func (r *Runtime) RemovePod(ctx context.Context, p *Pod, removeCtrs, force bool) p.lock.Lock() defer p.lock.Unlock() - return r.removePod(ctx, p, removeCtrs, force) + return r.removePod(ctx, p, removeCtrs, force, timeout) } // GetPod retrieves a pod by its ID @@ -196,7 +196,8 @@ func (r *Runtime) PrunePods(ctx context.Context) (map[string]error, error) { return response, nil } for _, pod := range pods { - err := r.removePod(context.TODO(), pod, true, false) + var timeout *uint + err := r.removePod(context.TODO(), pod, true, false, timeout) response[pod.ID()] = err } return response, nil |