Commit graph

2300 commits

Author SHA1 Message Date
Derek McGowan
44282379f6 Merge pull request #2108 from andyxning/refactor_doc_comment
refactor doc comment
2016-12-15 21:03:29 -08:00
Stephen Day
60cc8b5d3c Merge pull request #2107 from stevvooe/fix-broken-build
registry/handlers: fix incorrect use of Digest.Verifiers
2016-12-15 20:00:26 -08:00
ning xie
e7140e5361 refactor doc comment
Signed-off-by: andy xie <andy.xning@gmail.com>
2016-12-16 11:42:06 +08:00
Stephen J Day
1040c824ba
registry/handlers: fix incorrect use of Digest.Verifiers
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-15 18:33:26 -08:00
Derek McGowan
b09de5e105 Merge pull request #2106 from stevvooe/digest-test-coverage
digest: better test coverage
2016-12-15 17:46:42 -08:00
Stephen J Day
ecb2ee3824
digest: better test coverage
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-15 17:33:33 -08:00
Derek McGowan
6a74c94bf8 Merge pull request #2103 from joaofnfernandes/fix-configuration.md
Format configuration.md with code fences to avoid render issues
2016-12-15 16:56:36 -08:00
Derek McGowan
729b8c5b91 Merge pull request #2105 from stevvooe/algorithm-own-file
digest: cleanup digester and verifier creation
2016-12-15 16:55:37 -08:00
Stephen J Day
9159833265
digest: remove error return from Digest.Verifier
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-15 16:43:59 -08:00
Derek McGowan
898c26326d Merge pull request #2104 from stevvooe/digest-parse
digest: remove stuttering ParseDigest function
2016-12-15 15:44:27 -08:00
Stephen J Day
e37baed88e
digest: cleanup digester and verifier creation
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-15 15:17:21 -08:00
Stephen J Day
01dfa0fcb9
digest: use digest.Parse over ParseDigest
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-15 15:07:42 -08:00
Stephen J Day
d5cc235c48
digest: remove stuttering ParseDigest function
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-15 14:58:54 -08:00
Joao Fernandes
a24f2a6d78 Format configuration.md with code fences to avoid render issues
Signed-off-by: Joao Fernandes <joao.fernandes@docker.com>
2016-12-15 14:35:24 -08:00
Derek McGowan
ad80b3d492 Merge pull request #2102 from dmcgowan/schema2-deps
[carry #1972] Update schema2 builder to take media type
2016-12-15 13:28:18 -08:00
Derek McGowan
8867e8fac3
Update schema2 builder to take media type
Modify manifest builder so it can be used to build
manifests with different configuration media types.
Rename config media type const to image config.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2016-12-14 16:17:20 -08:00
Derek McGowan
923c7763b0 Merge pull request #2072 from andyxning/fix_filechecker_in_health
fix filechecker in health with precondition check
2016-12-09 09:51:46 -08:00
Derek McGowan
844b92879f Merge pull request #2095 from dmcgowan/enforce-class-backward-compatibility
Enforce image is treated as empty class
2016-12-07 14:28:13 -08:00
Stephen Day
84aa95ebd0 Merge pull request #2097 from stevvooe/digest-from-string
digest: add FromString helper to Digest
2016-12-07 14:24:04 -08:00
Stephen J Day
85994fcfc0
digest: add FromString helper to Digest
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-07 13:46:47 -08:00
Derek McGowan
2a3510004f Merge pull request #2080 from dmcgowan/use-vndr
Replace godep with vndr
2016-12-07 10:26:39 -08:00
Derek McGowan
15dc1296af Merge pull request #2088 from ahmetalpbalkan/pr-upstream-azure-race-fix
azure: fix race condition in PutContent()
2016-12-06 14:07:53 -08:00
Derek McGowan
67095fbce3 Merge pull request #2035 from runcom/fix-foreign-urls-check
registry/handles/app: always append default urls regexps
2016-12-06 10:21:14 -08:00
ning xie
658cda621f fix filechecker in health with precondition check
Signed-off-by: andy xie <andy.xning@gmail.com>
2016-12-06 10:13:55 +08:00
Derek McGowan
426d0734d4
Enforce image is treated as empty class
Enforces backwards compatibility with older authorization servers
without requiring the client to know about the compatibility
requirements.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-12-05 15:10:29 -08:00
Antonio Murdaca
0fb25dd094
registry/handles/app: always append default urls regexps
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-05 20:28:51 +01:00
Derek McGowan
314144ac0b Merge pull request #2070 from kdada/master
filter listResponse.Contents in OSS driver.List()
2016-12-05 10:23:46 -08:00
Ahmet Alp Balkan
78d0660319
azure: fix race condition in PutContent()
See #2077 for background.

The PR #1438 which was not reviewed by azure folks basically introduced
a race condition around uploads to the same blob by multiple clients
concurrently as it used the "writer" type for PutContent(), introduced in #1438.
This does chunked upload of blobs using "AppendBlob" type, which was not atomic.

Usage of "writer" type and thus AppendBlobs on metadata files is currently not
concurrency-safe and generally, they are not the right type of blob for the job.

This patch fixes PutContent() to use the atomic upload operation that works
for uploads smaller than 64 MB and creates blobs with "BlockBlob" type. To be
backwards compatible, we query the type of the blob first and if it is not
a "BlockBlob" we delete the blob first before doing an atomic PUT. This
creates a small inconsistency/race window "only once". Once the blob is made
"BlockBlob", it is overwritten with a single PUT atomicallly next time.

Therefore, going forward, PutContent() will be producing BlockBlobs and it
will silently migrate the AppendBlobs introduced in #1438 to BlockBlobs with
this patch.

Tested with existing code side by side, both registries with and without this
patch work fine without breaking each other. So this should be good from a
backwards/forward compatiblity perspective, with a cost of doing an extra
HEAD checking the blob type.

Fixes #2077.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-11-30 12:40:43 -08:00
Derek McGowan
c599955707 Merge pull request #2087 from aaronlehmann/missing-digest-panic
schema1: Validate descriptors in AppendReference
2016-11-30 10:26:55 -08:00
Aaron Lehmann
ec5fa1f9d6 schema1: Validate descriptors in AppendReference
If the digest is malformed, it will cause a panic when building the
manifest.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-29 17:22:07 -08:00
Derek McGowan
bf27f260cd Merge pull request #2083 from mstanleyjones/fix_doubled_words
Fix doubled words
2016-11-28 13:03:35 -08:00
Misty Stanley-Jones
8e703afdc6 Fix doubled words
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2016-11-28 11:29:11 -08:00
Derek McGowan
acad7c43a8
Enable dependency validation
Re-enable dependency validation using vndr instead of godep

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-23 15:45:04 -08:00
Derek McGowan
a685e3fc98
Replace godep with vndr
Vndr has a simpler configuration and allows pointing to forked
packages. Additionally other docker projects are now using
vndr making vendoring in distribution more consistent.

Updates letsencrypt to use fork.
No longer uses sub-vendored packages.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-23 15:07:06 -08:00
Derek McGowan
38fbd03266 Merge pull request #1840 from dmcgowan/support-1.12-integration-tests
Integration tests support for docker 1.12
2016-11-23 14:19:09 -08:00
Derek McGowan
8d096a4f42 Merge pull request #1969 from TrumanLing/master
api.md:fix disordered placement of section "Deleting a Layer"
2016-11-23 13:59:17 -08:00
Derek McGowan
f2620ca7c1
Bump call to use 1.12.3
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-23 13:33:19 -08:00
Derek McGowan
00a505bc42
Support docker 1.12
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-23 13:33:19 -08:00
Derek McGowan
8f9abbd27f Merge pull request #2079 from dmcgowan/update-swift-vendor
Update swift vendor for upstreamed change
2016-11-23 13:19:53 -08:00
Derek McGowan
e9684b126e
Update swift vendor for upstreamed change
Gets rid of deviation between hash and upstream.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-23 11:45:56 -08:00
Derek McGowan
a6bf3dd064 Merge pull request #2067 from dmcgowan/add-repo-class
Add support for repository class
2016-11-21 20:23:04 -08:00
Derek McGowan
e02278f22a
Update registry server to support repository class
Use whitelist of allowed repository classes to enforce.
By default all repository classes are allowed.

Add authorized resources to context after authorization.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-21 16:36:36 -08:00
Derek McGowan
61e65ecd9d
Update contrib token server to support repository class
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-21 13:32:12 -08:00
Derek McGowan
01509db714
Add class to repository scope
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-21 13:32:12 -08:00
Derek McGowan
e10634f8c3
Update scope specification for resource class
Update grammar to support a resource class. Add
example for plugin repository class.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-21 13:32:12 -08:00
Kira
4accc8f2be filter listResponse.Contents in driver.List()
Signed-off-by: Kira <me@imkira.com>
2016-11-17 10:38:56 +08:00
Derek McGowan
7694c31658 Merge pull request #2063 from dmcgowan/fix-golint-error-newline
Remove newlines from end of error strings
2016-11-14 15:22:52 -08:00
Derek McGowan
8b71d39c34
Remove newlines from end of error strings
Golint now checks for new lines at the end of go error strings,
remove these unneeded new lines.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-14 14:03:01 -08:00
Derek McGowan
d22e09a668 Merge pull request #2062 from nishanttotla/with-default-tag
Adding utility functions - IsNameOnly and EnsureTagged
2016-11-11 15:34:52 -08:00
Nishant Totla
2caeb6192a
Adding utility functions - IsNameOnly and WithDefaultTag
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-11-11 15:17:16 -08:00