-
-
Notifications
You must be signed in to change notification settings - Fork 600
Description
Proposal
If the docker client returns an error during image pull then the command is retried, except for ErrNotFound.
There are more error types defined in https://github.com/moby/moby/blob/master/errdefs/defs.go that are also permanent, as far as I can tell.
I ran into the issue that, with invalid credentials, the pull was retried until I got temp blocked by the container registry. Pulling with invalid credentials should not be tried again.
Suggested errors to be seen as permanent/non-retryable:
ErrInvalidParameterErrUnauthorizedErrForbiddenErrNotImplemented
I'm unsure if all types might be returned by ImagePull (e.g. ErrNotImplemented seems unlikely). I also didn't check if there are similar places where the docker client is called within a retry mechanism. If so, it might be worth using a central definition that just contains all permanent types.
Happy to provide a PR if you like the suggestion.