Commit graph

718 commits

Author SHA1 Message Date
Stephen J Day
269286192d Address possible goroutine leak in notification library
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:51 -07:00
Stephen J Day
f132ff7702 Use done channel to avoid goroutine leak
This deals with a memory leak, caused by goroutines, experienced when using the
s3 driver. Unfortunately, this section of the code leaks goroutines like a
sieve. There is probably some refactoring that could be done to avoid this but
instead, we have a done channel that will cause waiting goroutines to exit.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:51 -07:00
Richard
a72fb20b85 Add configuration for upload purging
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2015-05-06 11:04:51 -07:00
xiekeyang
84559affdc simplify the embedded method expression of repository
Signed-off-by: xiekeyang <xiekeyang@huawei.com>
2015-05-06 11:04:51 -07:00
Josh Hawn
46e1d28070 Updated urlbuilder X-Forwarded-Host logic
According to the Apache mod_proxy docs, X-Forwarded-Host can be a
comma-separated list of hosts, to which each proxy appends the requested
host. We want to grab only the first from this comma-separated list
to get the original requested Host when building URLs.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-05-06 11:04:51 -07:00
Stephen J Day
1c51db293d Attempt to address intermittent s3 RequestTimeout error
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
92ee0fa837 Correctly check s3 chunksize parameter
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
b6def3be1a Return after error in handler
This adds a missing return statement. It is not strictly needed since if the
io.Copy fails, the Finish operation will fail. Currently, the client reports
both errors where this new code will correctly only report the io.Copy error.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
81c465cef0 Include driver name in trace messsages
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
b645555422 Require storage drivers to report their name
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
f3443f8f64 Pool buffers used in S3.WriteStream
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
af0c2625e0 Allow configuration of chunksize parameter
The code using values from the yaml package wasn't careful enought with the
possible incoming types. Turns out, it is just an int but we've made this
section somewhat bulletproof in case that package changes the behavior.

This code likely never worked. The configuration system should be decoupled
from the object instantiation.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
bccca791ad Check error returned from io.Copy
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
3020aa0fe8 Update goamz package dependency
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
6cb2104945 Backoff retry on verification to give s3 time to propagate
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
56b18134fa log canonical digest on verification error
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
4686b3c0f4 Attempt to deal with eventual consistency by retrying
Rather than accept the resulting of a layer validation, we retry up to three
times, backing off 100ms after each try. The thought is that we allow s3 files
to make their way into the correct location increasing the liklihood the
verification can proceed, if possible.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Richard
96f1e85396 Add logging for generic handler errors.
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2015-05-06 11:04:50 -07:00
Stephen J Day
c06c6ba3bf Return instrumented response writer from context
This is ensures that users of the ResponseWriter from the context correctly
track usage. Otherwise, context reporting is incorrect.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-05-06 11:04:50 -07:00
Richard
dd0effe29a Add path and other info to filesytem trace methods.
Also fix Delete (was 'Move').
2015-05-06 11:04:50 -07:00
bin liu
7ad5bf7912 fix some typos in source comments
Signed-off-by: bin liu <liubin0329@gmail.com>
2015-05-06 11:04:49 -07:00
Stephen Day
62b70f951f Merge pull request #374 from stevvooe/release-preparation
Release preparation
2015-04-16 11:27:48 -07:00
Stephen J Day
aa74de8824 Update rough version for release
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-04-16 11:25:03 -07:00
Stephen J Day
04a6446e90 Update AUTHORS file for releease.
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-04-16 11:23:56 -07:00
Stephen Day
cce1641f9b Merge pull request #333 from RichardScothern/purgeuploads
registry/storage: automatically purge old upload files
2015-04-16 11:16:51 -07:00
Olivier Gambier
604d39bbed Merge pull request #373 from bfirsh/use-tag-in-docker-run
Use registry:2.0 tag in docker run
2015-04-16 11:16:33 -07:00
Ben Firshman
5e4deba5a4 Use registry:2.0 tag in docker run
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2015-04-16 11:11:03 -07:00
Richard
e4f07c368b Automatically purge old upload files.
When the registry starts a background timer will periodically
scan the upload directories on the file system every 24 hours
and delete any files older than 1 week. An initial jitter
intends to avoid contention on the filesystem where multiple
registries with the same storage driver are started
simultaneously.
2015-04-16 10:57:34 -07:00
Stephen Day
c5f416119f Merge pull request #361 from moxiegirl/docs-part-two
docs: updating with new RC work
2015-04-16 10:55:47 -07:00
Mary Anthony
b939d6d118 Updating with new RC work
Fixing typos and adding tables
Updating with testing material
Tweak after read through
Adding in Stephen's comments
Adding in Richard's comments. Fixing the broken images
closes issue #363
Another try

Signed-off-by: Mary Anthony <mary@docker.com>
2015-04-16 10:44:30 -07:00
Stephen Day
e57319cc60 Merge pull request #371 from docker/dmp42-patch-1
Update README.md
2015-04-16 10:38:19 -07:00
Jessie Frazelle
399b11cf29 Merge pull request #367 from bfirsh/update-landing-page
docs: add landing page for Registry to docs
2015-04-16 10:15:54 -07:00
Ben Firshman
ec9b9d560f Add landing page for Registry to docs
- Explain why you would want to use a registry
- Explain difference between Docker Hub and Registry
- List some features of Registry
- Add table of contents for documentation - particularly "deploying a registry" call to action
- Use standard "Getting help" section from orchestration projects

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2015-04-16 10:01:36 -07:00
Olivier Gambier
e7c91169e8 Update README.md
Fix version requirement.
2015-04-16 02:57:02 -07:00
Stephen Day
c5183a446b Merge pull request #369 from stevvooe/http-request-status-context-manager
context, registry/handlers: instantiate http context before dispatch
2015-04-15 23:23:40 -07:00
Stephen Day
75983a4a7f Merge pull request #364 from ncdc/resumable-digest-optional
Use a build flag to disable resumable digests
2015-04-15 23:22:25 -07:00
Stephen Day
2380699cf8 Merge pull request #366 from stevvooe/log-version
cmd/registry: correctly log application version
2015-04-15 23:21:38 -07:00
Stephen J Day
7420a3de10 Instantiate http context before dispatch
Ensure that the status is logged in the context by instantiating before the
request is routed to handlers. While this requires some level of hacking to
acheive, the result is that the context value of "http.request.status" is as
accurate as possible for each request.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-04-15 19:53:36 -07:00
Stephen J Day
cc8285f74c Provide access to response writer in Context
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-04-15 19:18:40 -07:00
Stephen Day
e16c23bb43 Merge pull request #368 from dmcgowan/upload-api-docs-update
Update final upload chunk api doc
2015-04-15 19:09:00 -07:00
Andy Goldstein
7fdd395653 Use a build flag to disable resumable digests.
Signed-off-by: Andy Goldstein <agoldste@redhat.com>
2015-04-16 01:19:57 +00:00
Stephen Day
7792f3882a Merge pull request #365 from dtan4/fix-doc-markdown
doc: modify markdown format in distribution.md
2015-04-15 18:03:51 -07:00
Derek McGowan
21504560e1 Update final upload chunk api doc
Updates description about content length and location

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-04-15 17:55:15 -07:00
Daisuke Fujita
4cacbb4faf Modify markdown format in distribution.md
Signed-off-by: Daisuke Fujita <dtanshi45@gmail.com>
2015-04-16 09:22:24 +09:00
Stephen J Day
600de20037 Correctly log application version
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-04-15 16:37:39 -07:00
Stephen Day
030006a6d7 Merge pull request #362 from RichardScothern/username-context
Add username to context
2015-04-15 12:26:26 -07:00
Richard
cb6a6125f6 Add auth.user.name to logging context 2015-04-15 10:34:24 -07:00
Stephen Day
ab2499df98 Merge pull request #360 from RichardScothern/gorelic-verbose
Enable configuration of new relic STDOUT logging
2015-04-14 14:55:17 -07:00
Richard
c359a6d172 Enable configuration of new relic STDOUT logging 2015-04-14 13:16:10 -07:00
Stephen Day
1c22aefa5e Merge pull request #355 from dmcgowan/compose-nginx-forward
Update nginx proxy setting to set forward headers
2015-04-13 15:14:39 -07:00