Commit graph

1205 commits

Author SHA1 Message Date
Aaron Lehmann
f7a11aa258 Two fixes for Docker integration tests
- Add a command line argument to run_multiversion.sh which has it start
  a docker daemon. This allows it to run directly inside an outermost
  docker-integration container instead of running outside all containers.

- Install Docker 1.7.1 intead of 1.7.0-rc1 in the docker-integration
  container. 1.7.0 has a bug that prevents "docker cp" from working
  properly.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-08-04 11:49:55 -07:00
Stephen Day
c4e553a655 Merge pull request #814 from aaronlehmann/test-response-writer
Make testResponseWriter's CloseNotify return an actual channel instead of nil
2015-08-03 15:59:42 -07:00
Aaron Lehmann
cca86be6bf Make testResponseWriter's CloseNotify return an actual channel instead of nil
This channel never gets written to, but this only means that the mock
ResponseWriter will never signal a premature disconnect.

Based on feedback from #763.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-08-03 15:10:14 -07:00
Richard Scothern
12db5fc16b Merge pull request #783 from aaronlehmann/multiple-version-integration-testing
Run integration tests with multiple Docker engine versions
2015-08-03 13:57:52 -07:00
Richard Scothern
db12c889e1 Merge pull request #763 from aaronlehmann/close-notifier
Use CloseNotifier to supress spurious HTTP 400 errors on early disconnect
2015-08-03 13:57:32 -07:00
Stephen Day
de7196071b Merge pull request #803 from duglin/FixBuild
Fix vet issue
2015-08-03 12:56:50 -07:00
Doug Davis
633eec0f91 Fix vet issue
registry/storage/blob_test.go:149: arg d for printf verb %s of wrong type: github.com/docker/distribution.Descriptor

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-08-03 12:24:34 -07:00
Stephen Day
7a46b772ad Merge pull request #811 from aaronlehmann/fix-vet
Fix go vet in CI
2015-08-03 12:19:55 -07:00
Stephen Day
f9181687f3 Merge pull request #812 from stevvooe/update-s3-dependency
Update s3 bindings
2015-08-03 12:05:34 -07:00
Stephen J Day
7fc9e2112a Update s3 bindings
The S3 library has made a few fixes to the retry logic. Updating the bindings
accordingly.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-08-03 11:50:48 -07:00
Aaron Lehmann
5a37b46421 Fix go vet in CI
It's necessary to compile the code first; otherwise go vet silently
fails to load imports.

Fixes #807.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-08-03 11:29:10 -07:00
Aaron Lehmann
609efa79e4 Set the response code to 499 when a client disconnects during an upload
The response code isn't actually sent to the client, because the
connection has already closed by this point. But it causes the status
code to appear as 499 in the logs instead of 0.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-31 17:39:30 -07:00
Aaron Lehmann
9c58954a6e Factor CloseNotifier use into a new function
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-31 17:30:26 -07:00
Aaron Lehmann
6cb5670ba5 Use CloseNotifier to supress spurious HTTP 400 errors on early disconnect
When a client disconnects without completing a HTTP request, we were
attempting to process the partial request, which usually leads to a 400
error. These errors can pollute the logs and make it more difficult to
track down real bugs.

This change uses CloseNotifier to detect disconnects. In combination
with checking Content-Length, we can detect a disconnect before sending
the full payload, and avoid logging a 400 error.

This logic is only applied to PUT, POST, and PATCH endpoints, as these
are the places where disconnects during a request are most likely to
happen.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-31 17:30:26 -07:00
Aaron Lehmann
1788ae4870 Update github.com/gorilla/handlers dependency
Support for exposing the CloseNotifier interface was just recently added
to its logging handler wrappers. This is needed for #597.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-31 17:30:26 -07:00
Richard Scothern
0b3b55e723 Merge pull request #801 from alexwlchan/master
Fix a few typos in the docs
2015-07-31 09:15:35 -07:00
Alex Chan
51bd34eaed Fix a few typos in the docs
Signed-off-by: Alex Chan <alex.chan@metaswitch.com>
2015-07-31 13:36:43 +01:00
Stephen Day
7dc8d4a26b Merge pull request #789 from aaronlehmann/tls-settings
Change server TLS config to tighten security
2015-07-30 18:11:53 -07:00
Stephen Day
ba5ab723ad Merge pull request #792 from stevvooe/uuid-package-improvements
UUID package improvements
2015-07-30 18:10:25 -07:00
Stephen Day
4cc4d440f6 Merge pull request #798 from aaronlehmann/example-config-uploadpurging-2
Fix earlier commit to enable upload purging in example config file
2015-07-30 17:42:48 -07:00
Aaron Lehmann
a3acd3a0ba Fix earlier commit to enable upload purging in example config file
Rather than setting this to "true", the whole section should be removed.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 17:32:35 -07:00
Olivier Gambier
8199962098 Merge pull request #796 from aaronlehmann/example-config-uploadpurging
Enable upload purging in example configuration file
2015-07-30 17:20:14 -07:00
Aaron Lehmann
4f69ca2c07 Enable upload purging in example configuration file
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 17:08:01 -07:00
Stephen Day
7e4b740763 Merge pull request #795 from aaronlehmann/config-file-names
Rename dev-config.yml and example-config.yml to config-dev.yml and config-example.yml
2015-07-30 16:41:14 -07:00
Aaron Lehmann
6c2ef78aa7 Rename dev-config.yml and example-config.yml to config-dev.yml and config-example.yml
Better for sort order.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 15:51:50 -07:00
Aaron Lehmann
1368e2ac53 Change run_multiversion.sh to get Docker engine versions from dind container
This is much better than downloading the builds with curl, because
Docker is intelligent about only pulling what it needs.

We use tagged versions of dind for the released version, and dind-master
for a master build.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 15:39:19 -07:00
Aaron Lehmann
e564231f58 Run integration tests with multiple Docker engine versions
Add a run_multiversion.sh script that downloads a variety of Docker
engines and runs the integration tests against each of them.

Skip some of the tests when running with Docker 1.6.0. It has a bug that
prevents these tests from completing successfully.

Fixes #751

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 15:39:19 -07:00
Stephen Day
0304ab09cf Merge pull request #793 from aaronlehmann/preserve-config-mountpoint
Copy dev-config.yml to config.yml at image build time
2015-07-30 14:54:08 -07:00
Aaron Lehmann
2619eee69b Copy dev-config.yml to config.yml at image build time
This preserves the previously documented mountpoint for the
configuration file.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 14:41:17 -07:00
Stephen Day
2b74c46795 Merge pull request #791 from stevvooe/add-double-domain-image-name
Add image name tests around hostnames
2015-07-30 14:35:27 -07:00
Stephen Day
ad1b7d8f35 Merge pull request #740 from stevvooe/disable-storage-redirects
Allow disabling of storage driver redirects
2015-07-30 14:28:31 -07:00
Stephen J Day
2c9ab4f441 Only enable uuid generation warning when using registry handlers
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-07-30 14:27:07 -07:00
Stephen J Day
bb5466245c Add image name tests around hostnames
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-07-30 14:26:21 -07:00
Stephen J Day
c737d19235 Move context once to instanceContext from global scope
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-07-30 13:59:44 -07:00
Richard Scothern
7eabb7800e Merge pull request #790 from aaronlehmann/config-files
Sample config file changes
2015-07-30 13:20:43 -07:00
Aaron Lehmann
f0c5284d2d Sample config file changes
Rename config.yml to dev-config.yml

Add example-config.yml, a simple configuration file for the official
This was originally made for the the distribution-library-image repo,
but is being moved here to make sure it stays in sync.

Update Dockerfile and docs for the rename.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 12:14:39 -07:00
Aaron Lehmann
dc5869de0b Change server TLS config to tighen security
Change the minimum TLS version to TLS 1.0, and add a custom list of
ciphersuites which are thought to be the most secure options.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 11:37:39 -07:00
Richard Scothern
cc7439bc38 Merge pull request #787 from dave-tucker/bug/672
Fix dead links in configuration.md
2015-07-30 10:07:27 -07:00
Dave Tucker
9348141616 Fix dead links in configuration.md
Fixes #672

Signed-off-by: Dave Tucker <dt@docker.com>
2015-07-30 17:56:04 +01:00
Darren Shepherd
6086124485 Lazy initialize UUID for Background context
Fixes #782

Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-07-30 09:47:12 -07:00
Stephen Day
9038e48c3b Merge pull request #609 from RichardScothern/single-log-line
Log a single line when a response completes.
2015-07-29 17:52:13 -07:00
Richard Scothern
54f7e5d54b When a request completes ensure only one log line is printed which
includes the http response.

When debugging non-successful registry requests this will place
the error details and http status fields in the same log line
giving easier visibility to what error occured in the request.

Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2015-07-29 16:52:47 -07:00
Stephen Day
b6ec2f2b10 Merge pull request #780 from aaronlehmann/automatic-secret
Automatically generate a HTTP secret if none is provided
2015-07-29 14:41:28 -07:00
Aaron Lehmann
70d9a9d543 Automatically generate a HTTP secret if none is provided
Log a warning if the registry generates its own secret.

Update configuration doc, and remove the default secret from the
development config file.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-29 14:28:56 -07:00
Richard Scothern
01e6dde2fd Merge pull request #774 from aaronlehmann/api-test-fix
Fix for api_test.go
2015-07-28 11:28:35 -07:00
Stephen Day
a0f7b3ae3c Merge pull request #771 from icecrime/uuid_preserve_random_bytes
Reduce consumption of entropy source
2015-07-28 11:09:50 -07:00
Aaron Lehmann
73702a8707 Fix for api_test.go
This passed in the #744 before merge, but apparently the test changed
since the PR was created in ways that led to a new failures.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-28 10:59:11 -07:00
Arnaud Porterie
c4d69174ee Reduce consumption of entropy source
The UUID generation retries multiple times to read a full UUID, but
preserves any bytes of entropy he successfully managed to read between
retries.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-07-28 10:56:20 -07:00
Derek McGowan
0355c3026c Merge pull request #744 from aaronlehmann/manifest-put-response-code
Manifest PUT should return 201 Created
2015-07-28 10:42:54 -07:00
Aaron Lehmann
cd87b3d70f Merge pull request #766 from dmcgowan/fix-integration-tests
[contrib/docker-integration] Update has digest test in scripts
2015-07-27 18:38:09 -07:00