diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-10 14:00:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 14:00:49 -0400 |
commit | 2f0e803e7605570cd073ddffc8110a6b9d466a17 (patch) | |
tree | a08b56eea43da3fa92f0cb88b48606a9f7f014b4 /libpod/runtime_ctr.go | |
parent | 8d78605929fc7251e31aee35fcc166afe03a2a80 (diff) | |
parent | f82abc774a70419bc7a2ff444a323110e1d9d938 (diff) | |
download | podman-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.go | 4 |
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 } |