summaryrefslogtreecommitdiff
path: root/distribution/errors.go
diff options
context:
space:
mode:
authorDarren Stahl <darst@microsoft.com>2016-11-29 13:13:42 -0800
committerDarren Stahl <darst@microsoft.com>2016-11-29 15:06:25 -0800
commitdee2968560dba92061ec1acbec7effe94472823f (patch)
tree31a59bd3701aaa060f4b3a6175f9586ce6208c82 /distribution/errors.go
parent4fae94f6637bfbbeba809f930f2ecf1e36748882 (diff)
downloaddocker-dee2968560dba92061ec1acbec7effe94472823f.tar.gz
Stop retrying pull on UnkownBlob error
Signed-off-by: Darren Stahl <darst@microsoft.com>
Diffstat (limited to 'distribution/errors.go')
-rw-r--r--distribution/errors.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/distribution/errors.go b/distribution/errors.go
index ed8c3c0534..7f9e20f279 100644
--- a/distribution/errors.go
+++ b/distribution/errors.go
@@ -6,6 +6,7 @@ import (
"syscall"
"github.com/Sirupsen/logrus"
+ "github.com/docker/distribution"
"github.com/docker/distribution/registry/api/errcode"
"github.com/docker/distribution/registry/api/v2"
"github.com/docker/distribution/registry/client"
@@ -139,6 +140,9 @@ func retryOnError(err error) error {
case *client.UnexpectedHTTPResponseError:
return xfer.DoNotRetry{Err: err}
case error:
+ if err == distribution.ErrBlobUnknown {
+ return xfer.DoNotRetry{Err: err}
+ }
if strings.Contains(err.Error(), strings.ToLower(syscall.ENOSPC.Error())) {
return xfer.DoNotRetry{Err: err}
}