diff options
author | baude <bbaude@redhat.com> | 2018-08-11 10:07:45 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-14 01:59:53 +0000 |
commit | 5d7b31da73bc3d9a3c0872fa912fef273b574e81 (patch) | |
tree | 0317f00180796db57156610521e53a21f994559a | |
parent | 8dd755fbf5ff69871a3e9ee17043842cf175005c (diff) | |
download | podman-5d7b31da73bc3d9a3c0872fa912fef273b574e81.tar.gz podman-5d7b31da73bc3d9a3c0872fa912fef273b574e81.tar.bz2 podman-5d7b31da73bc3d9a3c0872fa912fef273b574e81.zip |
when searching, survive errors for multiple registries
when searching multiple registries for images, if we get an error on one
of the searches, we should keep going and complete the search. if there
is only one search registry however, we will return an error.
Resolves: #1255
Signed-off-by: baude <bbaude@redhat.com>
Closes: #1257
Approved by: mheon
-rw-r--r-- | pkg/varlinkapi/images.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go index f1167c6e2..da19483b3 100644 --- a/pkg/varlinkapi/images.go +++ b/pkg/varlinkapi/images.go @@ -367,6 +367,12 @@ func (i *LibpodAPI) SearchImage(call iopodman.VarlinkCall, name string, limit in for _, reg := range registries { results, err := docker.SearchRegistry(getContext(), sc, reg, name, int(limit)) if err != nil { + // If we are searching multiple registries, don't make something like an + // auth error fatal. Unfortunately we cannot differentiate between auth + // errors and other possibles errors + if len(registries) > 1 { + continue + } return call.ReplyErrorOccurred(err.Error()) } for _, result := range results { |