Commit Graph

9 Commits

Author SHA1 Message Date
3fc4b494de Update pull error handling
Translate pull errors to provide a more consistent and user friendly
error message.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 19a93a6e3d4213c56583bb0c843cf9e33d379752
Component: engine
2016-11-10 17:34:12 -08:00
6a43c7c1ad swarm/controller: allow cancellation to propagate
Ensure that cancellation of a pull propagates rather than continuing to
container creation. This ensures that the `Prepare` method is properly
re-entrant.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: d99c6b837ffd18ffe5bce801feb4936bf0edd2aa
Component: engine
2016-07-25 18:31:24 -07:00
e7b616d2c8 Don't retry push on an unknown repository
If the remote registry responds with a NAME_UNKNOWN error, treat this as
a fatal error and don't retry the push.

Tested against an ECR registry.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: a12ab28e0afb8dd0a05187989dd95c9b9ca3fd68
Component: engine
2016-07-11 18:06:23 -06:00
0022a5af4e distribution: errors: do not retry on too many requests from registry
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 66fbc0c2a3e813359654f21433abf995b6687265
Component: engine
2016-05-04 18:57:55 +02:00
6ab75fcf92 distribution: errors: do not retry if no token in response
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 264b5b60832bf1f1342618d059c0ece3358de7e1
Component: engine
2016-03-19 12:20:14 +01:00
f9e5200e21 distribution: errors: do not access the errors slice if it's empty
- cherry-pick from 1.10.3 branch: 0186f4d4223a094a050d06f456355da3ae431468
- add token service test suite
- add integration test (missing in 1.10.3 branch)

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 1b5c2e1d722757a55364fb45cf3fcec7f2c75fb4
Component: engine
2016-03-16 09:00:39 +01:00
2909d7c372 distribution: errors: do not retry if no credentials provided
Fix and add test for case c) in #21054

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 497d545093bce4f01455bf8d2e1658435dbb040b
Component: engine
2016-03-12 20:41:47 +01:00
80c4954d96 Smarter push/pull TLS fallback
With the --insecure-registry daemon option (or talking to a registry on
a local IP), the daemon will first try TLS, and then try plaintext if
something goes wrong with the push or pull. It doesn't make sense to try
plaintext if a HTTP request went through while using TLS. This commit
changes the logic to keep track of host/port combinations where a TLS
attempt managed to do at least one HTTP request (whether the response
code indicated success or not). If the host/port responded to a HTTP
using TLS, we won't try to make plaintext HTTP requests to it.

This will result in better error messages, which sometimes ended up
showing the result of the plaintext attempt, like this:

    Error response from daemon: Get
    http://myregistrydomain.com:5000/v2/: malformed HTTP response
    "\x15\x03\x01\x00\x02\x02"

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 5e8af46fda3f4e17e06726237fc6b9ab6957e3ea
Component: engine
2016-02-12 13:47:48 -08:00
fbf0db8827 Push/pull errors improvement and cleanup
Several improvements to error handling:

- Introduce ImageConfigPullError type, wrapping errors related to
  downloading the image configuration blob in schema2. This allows for a
  more descriptive error message to be seen by the end user.

- Change some logrus.Debugf calls that display errors to logrus.Errorf.
  Add log lines in the push/pull fallback cases to make sure the errors
  leading to the fallback are shown.

- Move error-related types and functions which are only used by the
  distribution package out of the registry package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 8f26fe4f59ce515c68440da1443ace4c96e89d4a
Component: engine
2016-02-11 16:28:56 -08:00