Skip to content

Commit d21fe46

Browse files
committed
adds log for each failed host and status not found on host
Signed-off-by: Mike Brown <[email protected]>
1 parent 7e3fd8d commit d21fe46

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

remotes/docker/resolver.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,14 @@ func (r *dockerResolver) Resolve(ctx context.Context, ref string) (string, ocisp
286286
if lastErr == nil {
287287
lastErr = err
288288
}
289+
log.G(ctx).WithError(err).Info("trying next host")
289290
continue // try another host
290291
}
291292
resp.Body.Close() // don't care about body contents.
292293

293294
if resp.StatusCode > 299 {
294295
if resp.StatusCode == http.StatusNotFound {
296+
log.G(ctx).Info("trying next host - response was http.StatusNotFound")
295297
continue
296298
}
297299
return "", ocispec.Descriptor{}, errors.Errorf("unexpected status code %v: %v", u, resp.Status)

0 commit comments

Comments
 (0)