From 0d83f4b768af46b95d6c5a652b2c56c2ae2093f0 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 24 Apr 2022 06:03:53 -0400 Subject: Allow filtering of "removing", it is a valid status Do not use a list of statuses outside of libpod to validate container statuses. Removing status was never added to the list. Fixes: https://github.com/containers/podman/issues/13986 Signed-off-by: Daniel J Walsh --- pkg/domain/filters/containers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg') diff --git a/pkg/domain/filters/containers.go b/pkg/domain/filters/containers.go index 0557e75d6..3e5b9cad9 100644 --- a/pkg/domain/filters/containers.go +++ b/pkg/domain/filters/containers.go @@ -52,8 +52,8 @@ func GenerateContainerFilterFuncs(filter string, filterValues []string, r *libpo }, nil case "status": for _, filterValue := range filterValues { - if !util.StringInSlice(filterValue, []string{"created", "running", "paused", "stopped", "exited", "unknown"}) { - return nil, errors.Errorf("%s is not a valid status", filterValue) + if _, err := define.StringToContainerStatus(filterValue); err != nil { + return nil, err } } return func(c *libpod.Container) bool { -- cgit v1.2.3-54-g00ecf