Commit graph

1664 commits

Author SHA1 Message Date
Derek McGowan
e28c288444 Update to address comments
Add logging to resolve scope
Clarify response logs
Better messaging for tls setup error

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-01-28 15:47:22 -08:00
Derek McGowan
08d1f035f0 Update create token to auth/token types
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-01-25 20:12:07 -08:00
Derek McGowan
fd17443988 Update token header struct to use json.RawMessage pointer
Since RawMessage json receivers take a pointer type, the Header structure should use points in order to call the json.RawMessage marshal and unmarshal functions

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-01-25 20:11:41 -08:00
Derek McGowan
eaa9da0be3 Add simple implementation of token server
Token server implementation currently functional with existing docker 1.9.x release and latest distribution release.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-01-25 15:42:05 -08:00
Olivier Gambier
caa2001e1f Merge pull request #1341 from moxiegirl/fix-issue-1254
Pulling driver specs out of configuruation.md
2016-01-21 16:57:23 -08:00
Richard Scothern
c301f8ab27 Merge pull request #1383 from aaronlehmann/default-manifest-type
If the media type for a manifest is unrecognized, default to schema1
2016-01-21 10:59:19 -08:00
Richard Scothern
70f4dac7f7 Merge pull request #1376 from aaronlehmann/use-mime-pkg
Use mime package to parse media type
2016-01-21 10:58:53 -08:00
Mary Anthony
cab284d6b2 - Pulling driver specs out of configuruation.md
- Fixing index metadata error
- Entering all the comments
- Updating with the build fixes
- Fix Microsoft link broken
- Fix collocate, colocate, to unambiguous co-locate

Signed-off-by: Mary Anthony <mary@docker.com>
2016-01-21 10:12:46 -08:00
Richard Scothern
1df70eb1da Merge pull request #1377 from RichardScothern/correct-event-digest
Ensure the canonical manifest digest and length are sent to notification endpoints.
2016-01-21 09:34:56 -08:00
Aaron Lehmann
c01fe47231 If the media type for a manifest is unrecognized, default to schema1
This is needed for compatibility with some third-party registries that
send an inappropriate Content-Type header such as text/html.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-21 09:34:06 -08:00
Stephen Day
08650825fe Merge pull request #1380 from aaronlehmann/avoid-empty-accept-header
Avoid empty Accept headers in client requests
2016-01-20 15:38:07 -08:00
Aaron Lehmann
acf02bead3 Avoid empty Accept headers in client requests
One of the keys in the manifest media type map is an empty string. This
should not be sent as an Accept header.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-20 15:22:38 -08:00
Stephen Day
182bddcf11 Merge pull request #1379 from aaronlehmann/token-error
Handle nonstandard token endpoint errors
2016-01-20 15:07:47 -08:00
Aaron Lehmann
ec636bbfd2 Handle nonstandard token endpoint errors
https://github.com/docker/distribution/pull/1249 changed token fetching
to parse HTTP error response bodies as serialized errcodes. However,
Docker Hub's authentication endpoint does not return error bodies in
this format. To work around this, convert its format into
ErrCodeUnauthorized or ErrCodeUnknown.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-20 14:45:08 -08:00
Richard Scothern
dd0d5a31f5 Merge pull request #1378 from stevvooe/update-specification-changelog
spec/api: add missing entries to changelog
2016-01-20 13:09:44 -08:00
Richard Scothern
fdd2e4d77e Merge pull request #1372 from aibaars/gcs-delete
StorageDriver GCS: improve test suite clean-up and add retrying to all GCS api calls
2016-01-20 12:21:22 -08:00
Stephen J Day
eb87f00afd spec/api: add missing entries to changelog
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-01-20 12:19:25 -08:00
Richard Scothern
4f822100f7 Ensure the canonical manifest digest and length are sent to notification endpoints.
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2016-01-20 11:21:04 -08:00
Aaron Lehmann
93d019658f Use mime package to parse media type
This replaces custom parsing with the standard library's mime package.
This is simpler and more correct.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-20 09:59:19 -08:00
Arthur Baars
2a4345ca4b StorageDriver: GCS: retry all api calls
Signed-off-by: Arthur Baars <arthur@semmle.com>
2016-01-20 13:24:09 +00:00
Arthur Baars
6ee339464c StorageDriver: Test suite: improve cleanup
Verify that the file(s) have been deleted after calling Delete,
and retry if this is not the case. Furthermore, report the error
if a Delete operation fails.

Signed-off-by: Arthur Baars <arthur@semmle.com>
2016-01-20 13:24:09 +00:00
Richard Scothern
47a064d419 Merge pull request #1367 from aaronlehmann/signed-manifest-content-type
Fix content type for schema1 signed manifests
2016-01-19 11:00:47 -08:00
Aaron Lehmann
8c1a000799 Fix content type for schema1 signed manifests
The Payload function for schema1 currently returns a signed manifest,
but indicates the content type is that of a manifest that isn't signed.

Note that this breaks compatibility with Registry 2.3 alpha 1 and
Docker 1.10-rc1, because they use the incorrect content type.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-18 16:08:02 -08:00
Richard Scothern
3cb403ae5b Merge pull request #1363 from aaronlehmann/media-type-charset
Do not require "charset=utf-8" for a schema1 with content type application/json
2016-01-18 15:20:01 -08:00
Richard Scothern
fc7ee6d789 Merge pull request #1355 from hopkings2008/master
In testsuites.go, enlarge the size of randomBytes to 128M to fix the …
2016-01-18 12:38:26 -08:00
Richard Scothern
775c5fbeba Merge pull request #1354 from RichardScothern/Boran-patch2
Carry #1329 : Fixes so that nginx will start
2016-01-18 11:58:35 -08:00
Sean Boran
07e68b3b04 Carry #1329 : Fixes so that nginx will start
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>

Signed-off-by: Sean Boran <Boran@users.noreply.github.com>
2016-01-18 11:46:39 -08:00
Richard Scothern
a1af43d2e0 Merge pull request #1357 from aibaars/gcs-test
StorageDriver GCS test suite: try google.DefaultTokenSource first
2016-01-18 11:29:01 -08:00
Aaron Lehmann
5a2664e0b1 Do not require "charset=utf-8" for a schema1 with content type application/json
For compatibility with other registries that don't use this exact
variant of the Content-Type header, we need to be more flexible about
what we accept. Any form of "application/json" should be allowed. The
charset should not be included in the comparison.

See docker/docker#19400.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-18 09:59:50 -08:00
Arthur Baars
19d7c9e051 StorageDriver GCS: try google.DefaultTokenSource first
Signed-off-by: Arthur Baars <arthur@semmle.com>
2016-01-15 11:47:47 +00:00
yuzou
cc82b0d48e In testsuites.go, enlarge the size of randomBytes to 128M to fix the crash of running TestConcurrentStreamReads
Signed-off-by: yuzou <zouyu7@huawei.com>
2016-01-15 17:22:43 +08:00
Richard Scothern
7378e21678 Merge pull request #1332 from RichardScothern/gcs-params
Change the parameters to the GCS drivers to allow CircleCI testing.
2016-01-14 15:50:09 -08:00
Richard Scothern
1cdc683358 Merge pull request #1352 from tpounds/use-go-1.5.3
Use Go 1.5.3
2016-01-14 11:17:54 -08:00
Derek McGowan
cb08de17d7 Merge pull request #1351 from BrianBland/splitBlobCreateOptions
Splits up blob create options definitions to be package-specific
2016-01-14 11:10:54 -08:00
Brian Bland
8c5a6c13c0 Splits up blob create options definitions to be package-specific
Redefines privately in both storage and client packages

Signed-off-by: Brian Bland <brian.bland@docker.com>
2016-01-14 10:47:33 -08:00
Trevor Pounds
e5ac03f945 Update to Go 1.5.3.
Signed-off-by: Trevor Pounds <trevor.pounds@gmail.com>
2016-01-14 10:40:20 -08:00
Richard Scothern
df6cdb7bb6 Merge pull request #1347 from aaronlehmann/go-153
Upgrade CI to go 1.5.3
2016-01-14 10:31:45 -08:00
Brian Bland
2a9849e552 Merge pull request #1348 from BrianBland/fixCrossRepoBlobMount
Fixes cross-repo blob mounting in the BlobUploadHandler
2016-01-14 09:44:30 -08:00
Brian Bland
3ef917c269 Fixes cross-repo blob mounting in the BlobUploadHandler
Accidentally checked for err != nil instead of err == nil :/
Also now ensures that only a non-nil option is appended to the create
options slice

Signed-off-by: Brian Bland <brian.bland@docker.com>
2016-01-13 19:21:45 -08:00
Aaron Lehmann
050fcb7dbb Upgrade CI to go 1.5.3
Go 1.5.0 has some stack pointer bugs. This may have been causing some CI
failures. Upgrade to a newer version.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-13 18:25:20 -08:00
Richard Scothern
81dbebc7d3 Change the parameters to the GCS drivers to allow CircleCI testing.
Remove the requirement of file system access to run GCS unit tests.  Deconstruct
the input parameters to take the private key and email which can be specified on
the build system via environment variables.

Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2016-01-13 18:00:59 -08:00
Richard Scothern
5120357906 Merge pull request #1344 from BrianBland/blobCreateWithOptions
Adds functional options arguments to the Blobs Create method, remove Mount operation
2016-01-13 17:35:49 -08:00
Brian Bland
ce88d8a6f4 Adds functional options arguments to the Blobs Create method
Removes the Mount operation and instead implements this behavior as part
of Create a From option is provided, which in turn returns a rich
ErrBlobMounted indicating that a blob upload session was not initiated,
but instead the blob was mounted from another repository

Signed-off-by: Brian Bland <brian.bland@docker.com>
2016-01-13 16:42:59 -08:00
Richard Scothern
4378e1aa85 Merge pull request #1345 from BrianBland/fixErrorCodesInAPITemplate
Fixes error codes in the API spec template
2016-01-13 14:55:59 -08:00
Brian Bland
ac03070245 Fixes error codes in the API spec template
Uses UPPER_UNDERSCORE_CASE instead of the nice error message format
added in #911

Signed-off-by: Brian Bland <brian.bland@docker.com>
2016-01-13 11:53:40 -08:00
Richard Scothern
39ff320b82 Merge pull request #1335 from RichardScothern/fix-build
Fix manifest API unit tests
2016-01-11 14:17:36 -08:00
Richard Scothern
3ea0d70896 Fix manifest API unit tests
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2016-01-11 12:52:21 -08:00
Richard Scothern
3a1220de01 Merge pull request #1319 from RichardScothern/update-tags
Remove tags referencing deleted manifests.
2016-01-11 11:33:22 -08:00
Richard Scothern
93d9070c8b Merge pull request #1269 from BrianBland/crossRepositoryPush
Adds cross-repository blob mounting behavior
2016-01-08 14:37:00 -08:00
Brian Bland
613cfc861d Fires a new Mount event when blobs are cross-repo mounted
Adds an optional "fromRepository" field to the event target

Signed-off-by: Brian Bland <brian.bland@docker.com>
2016-01-08 13:53:30 -08:00