Commit graph

2388 commits

Author SHA1 Message Date
Christy Perez
0810eba2ad Better error message for BuildManifestURL if not tagged or digested
Since there's no default case, if there's not a tag or digest you get
back a confusing error from the router about it not matching the
expected pattern.

Also redoing the tests for URLs a bit so that they can handle checking
for failures.

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
2017-03-02 11:27:23 -06:00
Derek McGowan
50133d6372 Merge pull request #2195 from fate-grand-order/fixed
Use errors.New() to output the error message and fix some typos
2017-02-21 11:08:14 -08:00
fate-grand-order
6a8e2ca84f Use errors.New() to output the error message and fix some typos
Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
2017-02-20 10:39:58 +08:00
Derek McGowan
df5327f76f Merge pull request #2187 from nwt/notifications-fix-expvar
notifications: fix expvar for Go 1.7
2017-02-17 11:36:21 -08:00
Derek McGowan
4f87c80073 Merge pull request #2192 from uhayate/refactor-code-style
refactor the code style in distribution/registry/storage/driver/s3-goamz/s3.go
2017-02-15 17:12:16 -08:00
Noah Treuhaft
9a58c91051 notifications: fix expvar for Go 1.7
Remove EndpointConfig.Transport from the return value of the
registry.notifications.endpoints expvar.Func.  It results in an empty
value for that expvar variable under Go 1.7 because it is a non-nil
*http.Transport, which Go 1.7 can no longer encode as JSON.

Signed-off-by: Noah Treuhaft <noah.treuhaft@docker.com>
2017-02-14 10:51:20 -08:00
Aaron Lehmann
62d8d910b5 Merge pull request #2184 from sakeven/master
Check whether must use v4 auth in specific aws region ( storage driver s3-goamz )
2017-02-13 22:29:02 -08:00
sakeven
72bdf0e320 check whether must use v4 auth in specific aws region
Signed-off-by: sakeven <jc5930@sina.cn>
2017-02-14 10:42:20 +08:00
Aaron Lehmann
b38e5838b7 Merge pull request #2185 from yongtang/29936-validate-insecure-registry
Expose `DomainRegexp` from reference
2017-02-13 11:48:09 -08:00
uhayate
75c2e524a1 refactor the code style in distribution/registry/storage/driver/s3-goamz/s3.go
Signed-off-by: uhayate <uhayate.gong@daocloud.io>
2017-02-13 17:29:08 +08:00
Yong Tang
95daa793b8 Expose DomainRegexp from reference
This fix is based on:
https://github.com/docker/docker/pull/30746#discussion_r99650885

The goal is to reuse the `DomainRegexp` in docker to check
for `<host>:<port>` pattern.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-07 17:43:28 -08:00
Derek McGowan
b1993c9530 Merge pull request #2179 from Windfarer/master
Fixing acronym's case
2017-02-07 14:24:14 -08:00
Eric Yang
2d20471cd7 fixing acronyms case
Signed-off-by: Eric Yang <qizhao.yang@daocloud.io>
2017-01-31 01:29:30 +08:00
Aaron Lehmann
fb0bebc4b6 Merge pull request #2176 from stevvooe/clean-empty-blob-comments
registry/storage: clean up zero-length blob comments
2017-01-27 15:42:54 -08:00
Stephen J Day
7f565ed65a
registry/storage: clean up zero-length blob comments
A previous inspection of the code surrounding zero-length blobs led to
some interesting question. After inspection, it was found that the hash
was indeed for the empty string (""), and not an empty tar, so the code
was correct. The variable naming and comments have been updated
accordingly.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-01-27 15:28:30 -08:00
Derek McGowan
545102ea07 Merge pull request #2173 from aaronlehmann/tagnameonly
reference: Replace EnsureTagged with TagNameOnly
2017-01-26 14:35:53 -08:00
Aaron Lehmann
245ca4659e reference: Replace EnsureTagged with TagNameOnly
The common use case for this function is to add a default tag if the
reference only has a name. The current behavior only adds the default
tag if there is no *tag*, which requires most callers to check for a
digest. Change the behavior to only add default tags to name-only
references, and change the name to reflect this. The documentation
already described the new behavior, so it does not need to be changed.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-26 11:46:00 -08:00
Derek McGowan
7a0972304e Merge pull request #2167 from dmcgowan/fix-digest-reference-recursion
Fix recursion with digest String
2017-01-20 12:22:10 -08:00
Derek McGowan
69bdac7eff
Fix recursion with digest String
Update check for equal references to call the String method

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-20 11:38:07 -08:00
Derek McGowan
56b712f454 Merge pull request #2161 from dmcgowan/fix-test-panic
Update handler test to use WithName
2017-01-19 16:47:40 -08:00
Derek McGowan
1bcc73251d
Update handler test to use WithName
Fix test panic in handler test.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-19 15:21:40 -08:00
Derek McGowan
96b02e885a Merge pull request #2158 from fate-grand-order/master
fix misspell "lexicographically" in registry.go
2017-01-18 22:24:00 -08:00
fate-grand-order
e37d23c8a9 fix misspell "lexicographically" in registry.go
Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
2017-01-19 10:42:04 +08:00
Derek McGowan
11cb04e994 Merge pull request #2142 from dmcgowan/reference-enforce-canonical-parsing
reference: ParseNamed updated to enforce canonical format
2017-01-18 17:06:08 -08:00
Derek McGowan
ea4b89db4e Merge pull request #2154 from justinsb/update_aws_sdk_go_1_6_12
Update aws-sdk-go dependency to 1.6.12
2017-01-18 14:10:59 -08:00
Derek McGowan
c91563ff3a Merge pull request #2156 from dmcgowan/helenxie-correct-variable-name
[carry #2153] Correct the variable name
2017-01-18 14:07:53 -08:00
Derek McGowan
a4853520e8 Merge pull request #2157 from dmcgowan/reference-tab-vs-spaces
Fix inconsistent spacing in reference grammar
2017-01-18 14:07:16 -08:00
Derek McGowan
d8fcbeeb71
Update registry to use WithName for creating Named values
The registry uses partial Named values which the named parsers
no longer support. To allow the registry service to continue
to operate without canonicalization, switch to use WithName.
In the future, the registry should start using fully canonical
values on the backend and WithName should no longer support
creating partial values.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-18 13:56:56 -08:00
Derek McGowan
6170ac53da
Update ParseNamed to require canonical form
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-18 13:56:56 -08:00
Derek McGowan
c6f5b6bf15
Fix inconsistent spacing in reference grammar
The identifier fields were using spaces while the rest
of the lines were using tabs!

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-18 13:34:02 -08:00
Stephen Day
0111f1e3cf Merge pull request #2138 from yuwaMSFT2/master
closes issue#2135 image pull returns 404 on manifest request if there is storage error
2017-01-18 12:02:55 -08:00
Helen-xie
90856017e6
Correct the variable name.
Signed-off-by: Helen-Xie <xieyulin821@harmonycloud.cn>
2017-01-18 11:55:20 -08:00
Justin Santa Barbara
9b4f24fc66 Update aws-sdk-go dependency to 1.6.12
1.6.12 = c6fc52983ea2375810aa38ddb5370e9cdf611716

Signed-off-by: Justin Santa Barbara <justin@fathomdb.com>
2017-01-18 14:49:28 -05:00
yuwaMSFT2
0bb696c5bf add test for manifest handler where storage driver fails
Signed-off-by: Yu Wang (UC) <yuwa@microsoft.com>
2017-01-18 11:39:45 -08:00
Derek McGowan
954b4e8154 Merge pull request #2140 from mfojtik/add-region
Add more regions to registry S3 storage driver
2017-01-18 10:29:49 -08:00
Derek McGowan
de5aa9cecc Merge pull request #2149 from dmcgowan/release-notes-2.6
Release notes for 2.6
2017-01-17 18:02:06 -08:00
Derek McGowan
99861b87bf
Update release notes for 2.6
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-17 16:16:05 -08:00
Derek McGowan
3bba9ff92b
Release notes for v2.6.0-rc2
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-17 15:38:45 -08:00
Derek McGowan
87cde81148 Merge pull request #2148 from jvrplmlmn/health-api-doc-fix
Documentation fix for package 'health'. Use proper import path for 'health/api'
2017-01-17 15:05:47 -08:00
Javier Palomo Almena
8b3d826801 Documentation fix for package 'health'. Use proper import path for 'health/api'
Signed-off-by: Javier Palomo Almena <javier.palomo.almena@gmail.com>
2017-01-16 18:38:22 +01:00
Stephen Day
44eff0143e Merge pull request #2143 from dmcgowan/reference-familiar-match
reference: move match function to helpers
2017-01-13 18:32:33 -08:00
Derek McGowan
3b0497541a
Move match function to helpers
Update match function to operate on familiar names

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-13 17:08:46 -08:00
Derek McGowan
7cb0c15480 Merge pull request #2137 from dmcgowan/reference-ambiguous-library-namespace
Remove ambiguity for unsupported official repository input
2017-01-13 16:22:41 -08:00
Derek McGowan
c965e24c8c Merge pull request #2139 from dmcgowan/unexport-normalized-named
Remove NormalizedNamed from public interface
2017-01-12 14:45:56 -08:00
Michal Fojtik
44dfd1b766 bump aws-sdk-go dependency (1.6.3)
Signed-off-by: Michal Fojtik <mfojtik@redhat.com>
2017-01-12 11:18:50 +01:00
Michal Fojtik
9e510d67f5 Add more regions to registry S3 storage driver
Namely adding ca-central-1, ap-south-1 and eu-west-1.

Signed-off-by: Michal Fojtik <mfojtik@redhat.com>
2017-01-11 22:38:24 +01:00
Derek McGowan
63cb8cf23b
Remove NormalizedNamed from public interface
The NormalizedNamed interface has shown to not be necessary for
integrating the change downstream. The FamiliarName and FamiliarString
helpers are the only used interface and allow hiding the normalized
completely.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-11 12:58:47 -08:00
Yu Wang (UC)
2e94c22fe4 issue#2135 image pull returns 404 on manifest request if there is storage error
When get manifest, the handler will try to retrieve it from storage driver. When storage driver is cloud storage, it can fail due to various reasons even if the manifest exists
(like 500, 503, etc. from storage server). Currently manifest handler blindly return 404 which can be confusing to user.

This change will return 404 if the manifest blob doesn't exist, and return 500 UnknownError for all other errors (consistent with the behavior of other handlers).

Signed-off-by: Yu Wang (UC) <yuwa@microsoft.com>
2017-01-11 12:34:11 -08:00
Derek McGowan
24cbdc41ba
Remove ambiguity for unsupported official repository input
Officials repositories always have 2 part names with the first part
being library and second part being the offical repository name. Names
with more than 2 parts should not hit the special case for official
repositories since they are not valid official repositories.
Add tests for this ambiguity and to ensure that 3 part names are
supports for the default repository, as used by the docker store.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-11 10:46:48 -08:00
Derek McGowan
69c7f303d5 Merge pull request #2134 from stevvooe/images-are-manifests
registy/handlers: move images to manifests
2017-01-11 10:37:34 -08:00