From 6b7d028085e0e6ac0c5f224f0a493839e2beeba3 Mon Sep 17 00:00:00 2001 From: John Starks Date: Mon, 26 Sep 2016 08:47:38 -0700 Subject: [PATCH] Windows: Add debug output to foreign layer pull Write the foreign layer URLs being downloaded into the debug log. Signed-off-by: John Starks --- distribution/pull_v2_windows.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distribution/pull_v2_windows.go b/distribution/pull_v2_windows.go index bd0bae772e..aefed86601 100644 --- a/distribution/pull_v2_windows.go +++ b/distribution/pull_v2_windows.go @@ -6,6 +6,7 @@ import ( "net/http" "os" + "github.com/Sirupsen/logrus" "github.com/docker/distribution" "github.com/docker/distribution/context" "github.com/docker/distribution/manifest/schema2" @@ -34,11 +35,13 @@ func (ld *v2LayerDescriptor) open(ctx context.Context) (distribution.ReadSeekClo // Find the first URL that results in a 200 result code. for _, url := range ld.src.URLs { + logrus.Debugf("Pulling %v from foreign URL %v", ld.digest, url) rsc = transport.NewHTTPReadSeeker(http.DefaultClient, url, nil) _, err = rsc.Seek(0, os.SEEK_SET) if err == nil { break } + logrus.Debugf("Download for %v failed: %v", ld.digest, err) rsc.Close() rsc = nil }