moby--moby/distribution
Aaron Lehmann 9d6acbee92 When a manifest is not found, allow fallback to v1
PR #18590 caused compatibility issues with registries such as gcr.io
which support both the v1 and v2 protocols, but do not provide the same
set of images over both protocols. After #18590, pulls from these
registries would never use the v1 protocol, because of the
Docker-Distribution-Api-Version header indicating that v2 was supported.

Fix the problem by making an exception for the case where a manifest is
not found. This should allow fallback to v1 in case that image is
exposed over the v1 protocol but not the v2 protocol.

This avoids the overly aggressive fallback behavior before #18590 which
would allow protocol fallback after almost any error, but restores
interoperability with mixed v1/v2 registry setups.

Fixes #18832

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-12-21 18:19:38 -08:00
..
fixtures/validate_manifest
metadata Improved push and pull with upload manager and download manager 2015-12-09 19:13:35 -08:00
xfer Add metadata function to layer store 2015-12-14 16:52:15 -08:00
pull.go Do not fall back to the V1 protocol when we know we are talking to a V2 registry 2015-12-16 15:02:03 -08:00
pull_v1.go Make v1 pull/push output consistent with v2 2015-12-16 15:02:24 -08:00
pull_v2.go When a manifest is not found, allow fallback to v1 2015-12-21 18:19:38 -08:00
pull_v2_test.go Add own reference package wrapper 2015-12-16 11:58:52 -08:00
pull_v2_unix.go
pull_v2_windows.go
push.go Do not fall back to the V1 protocol when we know we are talking to a V2 registry 2015-12-16 15:02:03 -08:00
push_v1.go Make v1 pull/push output consistent with v2 2015-12-16 15:02:24 -08:00
push_v2.go Do not fall back to the V1 protocol when we know we are talking to a V2 registry 2015-12-16 15:02:03 -08:00
push_v2_test.go Improved push and pull with upload manager and download manager 2015-12-09 19:13:35 -08:00
push_v2_unix.go
push_v2_windows.go
registry.go Do not fall back to the V1 protocol when we know we are talking to a V2 registry 2015-12-16 15:02:03 -08:00
registry_unit_test.go Do not fall back to the V1 protocol when we know we are talking to a V2 registry 2015-12-16 15:02:03 -08:00