Commit Graph

12177 Commits

Author SHA1 Message Date
da3465e509 Add docker-py integration tests aginst the docker daemon
This clones and run the integration tests for docker-py master as part
of the integration tests created on master.  docker-py hits the api
directly and should be a good way to identify regressions in the api.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5d6eca6642c5749099513f1f66bb44e004aa0938
Component: engine
2014-12-17 13:48:45 -08:00
2261562cd0 Merge pull request #9287 from drothlis/fix-upstart-race-condition
upstart: Don't emit "started" event until docker.sock is available
Upstream-commit: ad8096a1c2b4786ade4a79275683aecd31a090fd
Component: engine
2014-12-16 14:15:01 -08:00
3c25d582fb Merge pull request #9695 from crosbymichael/merge_release_v1.4.1
Merge release v1.4.1
Upstream-commit: e927ab0ee7cfe35fcd37caf920ed1ae0167b2efc
Component: engine
2014-12-16 13:44:01 -08:00
4ee7be3ff1 upstart: Don't emit "started" event until docker.sock is available
Fixes #6647: Other upstart jobs that depend on docker by specifying
"start on started docker" would often start before the docker daemon was
ready, so they'd fail with "Cannot connect to the Docker daemon" or
"dial unix /var/run/docker.sock: no such file or directory".

This is because "docker -d" doesn't daemonize, it runs in the
foreground, so upstart can't know when the daemon is ready to receive
incoming connections. (Traditionally, a daemon will create all necessary
sockets and then fork to signal that it's ready; according to @tianon
this "isn't possible in Go"[1]. See also [2].)

Presumably this isn't a problem with systemd init with its socket
activation. The SysV init scripts may or may not suffer from this
problem but I have no motivation to fix them.

This commit adds a "post-start" stanza to the upstart configuration
that waits for the socket to be available. Upstart won't emit the
"started" event until the "post-start" script completes.[3]

Note that the system administrator might have specified a different path
for the socket, or a tcp socket instead, by customising
/etc/default/docker. In that case we don't try to figure out what the
new socket is, but at least we don't wait in vain for
/var/run/docker.sock to appear.

If the main script (`docker -d`) fails to start, the `initctl status
$UPSTART_JOB | grep -q "stop/"` line ensures that we don't loop forever.
I stole this idea from Steve Langasek.[4]

If for some reason we *still* end up in an infinite loop --I guess
`docker -d` must have hung-- then at least we'll be able to see the
"Waiting for /var/run/docker.sock" debug output in
/var/log/upstart/docker.log.

I considered using inotifywait instead of sleep, but it isn't worth
the complexity & the extra dependency.

[1] https://github.com/docker/docker/issues/6647#issuecomment-47001613
[2] https://code.google.com/p/go/issues/detail?id=227
[3] http://upstart.ubuntu.com/cookbook/#post-start
[4] https://lists.ubuntu.com/archives/upstart-devel/2013-April/002492.html

Signed-off-by: David Röthlisberger <david@rothlis.net>
Upstream-commit: f42c0a53a38a2a141bec8768d0836a3726de4a83
Component: engine
2014-12-16 21:25:01 +00:00
e1c2167b3b Change version to 1.4.1-dev
Upstream-commit: 171cf3d4d3bf6cd180a44b650ba10e4bb6ffee24
Component: engine
2014-12-16 12:26:01 -08:00
1558b703a8 Merge pull request #9679 from crosbymichael/bump_v1.4.1
Bump to version v1.4.1
Upstream-commit: 32c3823fd85970565f98f0765e29f79a00e18a53
Component: engine
2014-12-16 12:24:15 -08:00
d76043e57c Merge pull request #9675 from JacobEdelman/patch-1
Fixed two misspellings
Upstream-commit: 323c3c1381804f967ff41412be0a7cdf5fa98f11
Component: engine
2014-12-16 12:06:23 -08:00
6b6aa4bf22 Merge pull request #9643 from LK4D4/fix_vet_errors
Fix vet errors
Upstream-commit: 17cacf3326edde6d177e12132f74fc0174bda1d2
Component: engine
2014-12-16 12:04:15 -08:00
55ec358b5c Merge pull request #9610 from duglin/Issue9602
Wrap strings that could look like ints in quotes
Upstream-commit: eea9f0e781f5a2cc438aad11315253b6fb42ed9e
Component: engine
2014-12-16 12:02:26 -08:00
d89d13300b Merge pull request #9671 from albers/refactor-create-and-run
Refactor completion for docker run and docker create
Upstream-commit: 03aea37f0133a6e88cd8c136110a30b3dec9ca51
Component: engine
2014-12-16 11:28:52 -08:00
d2d0349752 Merge pull request #9601 from dchen1107/master
Using container-vm image alias instead of specific name with version.
Upstream-commit: d79bc04e7bd728ed3ca4bffc463235bb2980670d
Component: engine
2014-12-16 11:01:15 -08:00
5b0faf336a Merge pull request #8845 from vbatts/vbatts-issue_template
CONTRIBUTING: provide a template for new issues
Upstream-commit: c6a70bc78a504076c5fdc99e565973a04dab31d5
Component: engine
2014-12-16 10:41:43 -08:00
2187cf5beb Merge pull request #9122 from dqminh/debug-huge-expose
Expose a large number of ports should not slow down builder
Upstream-commit: a76f7c6ec32431b6cbf286d9be86f7dde0b3ac0d
Component: engine
2014-12-16 10:03:31 -08:00
f37c881351 Merge pull request #9651 from kdomanski/filter_docs
Document container list filtering in API docs
Upstream-commit: 92d24e3b7cfca1a18ee8412c1bf6650758096355
Component: engine
2014-12-16 01:38:49 -05:00
23e5208f72 Bump to version 1.4.1
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5bc2ff8a36e9a768e8b479de4fe3ea9c9daf4121
Component: engine
2014-12-15 15:57:00 -08:00
e8162d5a73 Fix volumes-from/bind-mounts passed in on start
Fixes #9628
Slightly reverts #8683, HostConfig on start is _not_ deprecated.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a83dadbeafd7933bbe541b99732978b508f1c768
Component: engine
2014-12-15 15:54:06 -08:00
217c31e0e8 Add test to enforce volume build content
This tests ensures that the content from a dir within a build is carried
over even if VOLUME for that dir is specified in the Dockerfile.  This
test ensures this long standing functionality.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: eac27ad46d7df4f11a28b84130ff484224f8b63d
Component: engine
2014-12-15 15:53:55 -08:00
2fa048715a Merge pull request #9631 from cpuguy83/9628_fix_volumes_hostconfig_on_start
Fix volumes-from/bind-mounts passed in on start
Upstream-commit: 24d03b8ddee1d4b19d3ab34f66e4c54dda8b129e
Component: engine
2014-12-15 15:51:57 -08:00
fba1b014c8 Fixed two misspellings.
Fixed two misspellings of the word "beginning".

Signed-off-by: JacobEdelman <edelman.jd@gmail.com>
Upstream-commit: 97f07bb61ccf6e5a3a0fcc72894d5f37310d0109
Component: engine
2014-12-15 18:15:07 -05:00
8ef74b2a51 Merge pull request #9638 from crosbymichael/build-volumes-retain-contents
Add test to enforce volume build content
Upstream-commit: b84bfb43cdf94045a705989c7b1a4fb47f7ed84a
Component: engine
2014-12-15 14:54:38 -08:00
ecd4852381 Fix volumes-from/bind-mounts passed in on start
Fixes #9628
Slightly reverts #8683, HostConfig on start is _not_ deprecated.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d44c9f91472eb3df4c38c669134df04b2ccf9953
Component: engine
2014-12-15 16:51:15 -05:00
de240a1c06 Merge pull request #9674 from LK4D4/log_done
Fix missing logDone for TestRunMutableNetworkFiles
Upstream-commit: 03142fd5d24bc5509b06742665b2f89ebdbefb87
Component: engine
2014-12-15 13:48:04 -08:00
d89ea8b641 Fix missing logDone for TestRunMutableNetworkFiles
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 03bdacbb4e4bf2fabf67bfdb8b5118bc7ed1edd2
Component: engine
2014-12-15 13:44:22 -08:00
74d75a87de Refactor completion for docker run and docker create
_docker_run and _docker_create had only one differing line.

This refactoring features:

- direct completion for both commands to the same function
- factor out the common arguments, sort & format them nicely
- compute the argument for _docker_pos_first_nonflag.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 46b104bd3977c4777b0d99ba6c190f37ae780245
Component: engine
2014-12-15 21:08:49 +01:00
34f3fb8d2c Merge pull request #9613 from pwaller/push-err-confusion-fix
Improve message when pushing a non-existent image
Upstream-commit: e6a68a1c871e73c7b3f86839e9c21765fba24430
Component: engine
2014-12-15 09:54:34 -08:00
31a3420d66 Merge pull request #9642 from jfrazelle/windows
Add windows back.
Upstream-commit: 1bdf579928482e8ff3a84b633fe7049b8d3d7d88
Component: engine
2014-12-15 08:36:36 -08:00
48eac505e5 Merge pull request #9666 from LK4D4/cleanup_tests
Remove TestRunExitOnStdinClose
Upstream-commit: 5e888abf7a1f9c69bd6812c97b0d65a1d73a365b
Component: engine
2014-12-15 11:24:40 -05:00
c634818b8d Merge pull request #9668 from viirya/fix_error_type
Fix incorrect error type
Upstream-commit: c533d2cb9b81623357b3c9078522476b7d658401
Component: engine
2014-12-15 08:18:34 -08:00
fdaf63a14a Merge pull request #9630 from ztombol/9642-fix-mkimage-arch
Fix #9462
Upstream-commit: f58a79e59191dd196a48c65ed945e96b944b8567
Component: engine
2014-12-15 08:13:11 -08:00
dd3d46bab0 Add available filters for containers, images and events to API docs.
Signed-off-by: Kamil Domański <kamil@domanski.co> (github: kdomanski)
Upstream-commit: 51da97628a0ffb2a1c4be2c4d1bbcb09537d6c8d
Component: engine
2014-12-15 16:51:29 +01:00
159fd556c5 Add container list filtering to API docs.
Signed-off-by: Kamil Domański <kamil@domanski.co> (github: kdomanski)
Upstream-commit: 37bdb05615763f94f7877cce3426752d43b48ff7
Component: engine
2014-12-15 16:50:56 +01:00
653e69570e Merge pull request #9660 from LK4D4/remove_bad_test
Remove TestRunErrorBindNonExistingSource
Upstream-commit: 7da0f2ee1991786f0a62a989ea2276c37d409b2c
Component: engine
2014-12-15 17:20:17 +02:00
ba3cc4bafb Wrap strings that could look like ints in quotes
When we use the engine/env object we can run into a situation where
a string is passed in as the value but later on when we json serialize
the name/value pairs, because the string is made up of just numbers
it appears as an integer and not a string - meaning no quotes.  This
can cause parsing issues for clients.

I tried to find all spots where we call env.Set() and the type of the
name being set might end up having a value that could look like an int
(like author). In those cases I switched it to use env.SetJson() instead
because that will wrap it in quotes.

One interesting thing to note about the testcase that I modified is that
the escaped quotes should have been there all along and we were incorrectly
letting it thru. If you look at the metadata stored for that resource you
can see the quotes were escaped and we lost them during the serialization
steps because of the env.Set() stuff.  The use of env is probably not the
best way to do all of this.

Closes: #9602

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d942c59b696d16def85f6b65ae65c176f66a5562
Component: engine
2014-12-15 05:10:49 -08:00
9158ffcf49 Merge pull request #9633 from estesp/docs-ubuntu-install
DOCS: Update Ubuntu install instructions regarding dated Ubuntu docker.io
Upstream-commit: 24a81829284c9c9966f3dbc239dff9adca09d5ef
Component: engine
2014-12-15 04:52:27 -05:00
6983cd24af Fix incorrect error type.
Signed-off-by: Liang-Chi Hsieh <viirya@gmail.com>
Upstream-commit: bc4edbbe712a2d0fb839747814933916177daa74
Component: engine
2014-12-15 17:29:28 +08:00
55530bfc16 Merge pull request #9556 from nealmcb/9555-https-no-sudo
Fixes #9555: sudo not needed with cert authn
Upstream-commit: e4b2f802ae669f4a89b04576ac92c95858773810
Component: engine
2014-12-15 15:08:03 +11:00
9715e33218 Remove TestRunExitOnStdinClose
Because this is already tested by TestRunExitOnStdinClose in
integration-cli/docker_cli_run_test.go

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 4d7359f63db200298f9d07f6434a7a4b16c25c88
Component: engine
2014-12-14 18:09:41 -08:00
e377141ba0 Remove TestRunErrorBindNonExistingSource
This test tests nothing because of error in cmd, where "echo 'should
fail'" passed as binary. Also this test directly contradicts
documentation and current daemon behavior.

Fixes #7826

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 70a2b64ef2e31aef84c39b979686e9194aee22a6
Component: engine
2014-12-13 21:45:02 -08:00
2bba0486d0 Merge pull request #9647 from fredlf/release-notes-edits
Fixed errors in release notes
Upstream-commit: 86c2cdf78242f09dc5ae22ec4cb2c37cdb69db2f
Component: engine
2014-12-13 17:34:23 -08:00
8f45a1fd40 Fixed errors in release notes
Fixed a missing link and a few small formatting issues. Also deleted 1.3 notes as originally intended.

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: afc262cc3ab68129104e3d799f8a2694f61aa68f
Component: engine
2014-12-12 17:18:21 -08:00
d41b765b19 Merge pull request #9639 from jfrazelle/advertise-master-builds
Add master builds url to readme.
Upstream-commit: 8ca28a35c75b85404f2d2fc1ca2c35221ac33fc0
Component: engine
2014-12-12 16:44:52 -08:00
fe9c064de8 Add master builds url to readme.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 1b104ce7c3b18ad4bd38a819525a0d5ad78d3c85
Component: engine
2014-12-12 16:26:44 -08:00
db3cf4f54c Add windows back.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 54229fad933c91f5d890e14be389651e98f62e02
Component: engine
2014-12-12 13:44:41 -08:00
725ed0d2e6 Merge pull request #9551 from barnybug/9550-fish-completions
Update fish shell completions.
Upstream-commit: d727e3bea6cb0b833f415f6ba2207ee2f82c1453
Component: engine
2014-12-12 12:55:00 -08:00
cb267b8310 Merge pull request #9636 from fredlf/add-user-invites
Adds User Invites to Hub Docs
Upstream-commit: 506a8c24d7b08f99f53b064f3d83308af127e2e4
Component: engine
2014-12-12 11:37:05 -08:00
98f1f432b6 Merge pull request #9625 from LK4D4/fix_race_in_sec_opts
Fix race condition between parseSecurityOpt and container.Mount
Upstream-commit: b66abaa291ae9de714d15371b3f7e7dcd58853ce
Component: engine
2014-12-12 11:34:59 -08:00
c10a2aa68d Merge pull request #9637 from tianon/minor-nuke-fixes
Fix a bashism and some minor bugs in nuke-graph-directory.sh
Upstream-commit: 4099f098bd46ce6b65e582919f75952e2ed65aa1
Component: engine
2014-12-12 11:31:17 -08:00
00d7210a86 Using container-vm image alias instead of specific name with version.
Signed-off-by: Dawn Chen <dawnchen@google.com>
Upstream-commit: 0b3caf1f78c167239d7879d3bfd0d0d95a48a3d7
Component: engine
2014-12-12 11:28:54 -08:00
b3e03a9b7c Merge pull request #9626 from jfrazelle/update-release
Updates to release checklist.
Upstream-commit: e76168c0032048170655efab7d5e067f50a33a34
Component: engine
2014-12-12 11:18:12 -08:00
50ca4df488 Add test to enforce volume build content
This tests ensures that the content from a dir within a build is carried
over even if VOLUME for that dir is specified in the Dockerfile.  This
test ensures this long standing functionality.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 4856ec075422a7926b62762749a7fbcc869efa99
Component: engine
2014-12-12 11:15:31 -08:00