summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-10 14:00:49 -0400
committerGitHub <noreply@github.com>2020-09-10 14:00:49 -0400
commit2f0e803e7605570cd073ddffc8110a6b9d466a17 (patch)
treea08b56eea43da3fa92f0cb88b48606a9f7f014b4 /libpod/runtime_ctr.go
parent8d78605929fc7251e31aee35fcc166afe03a2a80 (diff)
parentf82abc774a70419bc7a2ff444a323110e1d9d938 (diff)
downloadpodman-2f0e803e7605570cd073ddffc8110a6b9d466a17.tar.gz
podman-2f0e803e7605570cd073ddffc8110a6b9d466a17.tar.bz2
podman-2f0e803e7605570cd073ddffc8110a6b9d466a17.zip
Merge pull request #7460 from AkihiroSuda/allow-rootless-cni
rootless: support `podman network create` (CNI-in-slirp4netns)
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 936dce2e9..241448981 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -772,7 +772,11 @@ func (r *Runtime) LookupContainer(idOrName string) (*Container, error) {
func (r *Runtime) GetContainers(filters ...ContainerFilter) ([]*Container, error) {
r.lock.RLock()
defer r.lock.RUnlock()
+ return r.GetContainersWithoutLock(filters...)
+}
+// GetContainersWithoutLock is same as GetContainers but without lock
+func (r *Runtime) GetContainersWithoutLock(filters ...ContainerFilter) ([]*Container, error) {
if !r.valid {
return nil, define.ErrRuntimeStopped
}