Commit Graph

1963 Commits

Author SHA1 Message Date
ca2ed97d93 Merge pull request #16611 from vdemeester/fix-TestAttachClosedOnContainerStop-racy-test
Fix TestAttachClosedOnContainerStop racey test
Upstream-commit: 992e464a80e880930817f7622d1b6a5ff63b1033
Component: engine
2015-09-29 11:49:24 -04:00
2f036a6241 Merge pull request #16641 from cpuguy83/16598_fix_TestExecStartFails
Make sure test container is running before exec
Upstream-commit: 499b76d2ecb97ed1e59c732770ccdad6a1c8b3b6
Component: engine
2015-09-29 11:25:14 -04:00
9346a064f4 Fix TestAttachClosedOnContainerStop racey test
This test is failing once in a while on the CI, because the docker
attach command might be called after the container ends.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 50852f3be3d09d8bf6957d2ff27c26966b871e80
Component: engine
2015-09-29 16:57:58 +02:00
5c97861d03 Make sure test container is running before exec
Fixes race in TestExecStartFails

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9077c8968950133fdfac9898a20f9887f8df78f2
Component: engine
2015-09-29 10:06:51 -04:00
1bdb03b312 Merge pull request #16635 from Microsoft/10662-fixtestrununknowncommand
TestRunUnknownCommand 30s, not 30ns
Upstream-commit: d6e7350b961d856dcc39db5accd898279d1be3da
Component: engine
2015-09-28 14:31:48 -07:00
e1405c129c Windows: Fix TestRunStdinBlockedAfterContainerExit
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4d301f0059c4e2e4ecea1ed41f2c1588b8db6990
Component: engine
2015-09-28 14:08:26 -07:00
2e16748341 TestRunUnknownCommand 30s, not 30ns
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 74aeb0350e8a3cd73646bbfe45cfee8901f0cf28
Component: engine
2015-09-28 13:40:17 -07:00
5bf9802e2c Update TestRunWithSwappinessInvalid.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: 3571814dc508b61d60db894f7634a263b73e3a4e
Component: engine
2015-09-28 18:13:21 +08:00
ff72d92410 Add builtin nodes discovery
Use `pkg/discovery` to provide nodes discovery between daemon instances.

The functionality is driven by two different command-line flags: the
experimental `--cluster-store` (previously `--kv-store`) and
`--cluster-advertise`. It can be used in two ways by interested
components:

1. Externally by calling the `/info` API and examining the cluster store
   field. The `pkg/discovery` package can then be used to hit the same
   endpoint and watch for appearing or disappearing nodes. That is the
   method that will for example be used by Swarm.
2. Internally by using the `Daemon.discoveryWatcher` instance. That is
   the method that will for example be used by libnetwork.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 7d193ef1f3b5fcd6aa55b7376116e2617be12e06
Component: engine
2015-09-25 14:52:09 -07:00
a273d038b8 Merge pull request #16228 from duglin/ContextualizeEvents
Add context.RequestID to event stream
Upstream-commit: de4164043546d2b9ee3bf323dbc41f4979c84480
Component: engine
2015-09-24 14:16:22 -07:00
3f746aee10 Merge pull request #16559 from Microsoft/10662-fix16556
Fixes 16556 CI failures
Upstream-commit: 7daeecd42d7bb112bfe01532c8c9a962bb0c7967
Component: engine
2015-09-24 12:31:36 -07:00
58c0f4ebe8 Merge pull request #14579 from hqhq/hq_add_softlimit
Add support for memory reservation
Upstream-commit: 84b53c8d87c0ab887209a51e54fad60a591e737a
Component: engine
2015-09-24 12:11:36 -07:00
bf44c732da Add context.RequestID to event stream
This PR adds a "request ID" to each event generated, the 'docker events'
stream now looks like this:

```
2015-09-10T15:02:50.000000000-07:00 [reqid: c01e3534ddca] de7c5d4ca927253cf4e978ee9c4545161e406e9b5a14617efb52c658b249174a: (from ubuntu) create
```
Note the `[reqID: c01e3534ddca]` part, that's new.

Each HTTP request will generate its own unique ID. So, if you do a
`docker build` you'll see a series of events all with the same reqID.
This allow for log processing tools to determine which events are all related
to the same http request.

I didn't propigate the context to all possible funcs in the daemon,
I decided to just do the ones that needed it in order to get the reqID
into the events. I'd like to have people review this direction first, and
if we're ok with it then I'll make sure we're consistent about when
we pass around the context - IOW, make sure that all funcs at the same level
have a context passed in even if they don't call the log funcs - this will
ensure we're consistent w/o passing it around for all calls unnecessarily.

ping @icecrime @calavera @crosbymichael

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 26b1064967d9fcefd4c35f60e96bf6d7c9a3b5f8
Component: engine
2015-09-24 11:56:37 -07:00
65bd47ac3a Merge pull request #15862 from calavera/share_shm_and_mqueue
Share shm and mqueue between containers.
Upstream-commit: 23750fb80280e6770590b0ea30781c43f42e430d
Component: engine
2015-09-24 11:23:59 -07:00
60a1c405c1 Fixes 16556 CI failures
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e65a7dabb9632b30df9c67ca5783d6dd55e91a7b
Component: engine
2015-09-24 11:19:00 -07:00
ea22c47211 Merge pull request #16538 from Microsoft/10662-escapeargs
Windows: Fixed escaping of command line arguments
Upstream-commit: c8bc02ea35775b048cc84a9c10d6284675f3b297
Component: engine
2015-09-24 11:18:29 -07:00
6444463820 Merge pull request #16507 from azurezk/testcase_nit
TestInspectInt64 to be neat
Upstream-commit: ccba7c3e1417724183d6537a3ec27f6c5bed7e6a
Component: engine
2015-09-24 11:12:43 -07:00
247b98190f Merge pull request #16480 from sunyuan3/TestRunWithKernelMemory
update TestRunWithKernelMemory
Upstream-commit: f2db5028cd5b74afc856fd303e9450e50975f93a
Component: engine
2015-09-24 11:10:51 -07:00
9180d03f46 Merge pull request #16556 from Microsoft/10662-randomunix
Make 'TestRandomUnixTmpDirPath' platform agnostic
Upstream-commit: de8b5c46ccabf00ce869d3b2a526c32d044653a7
Component: engine
2015-09-24 10:35:27 -07:00
b5fd27f53c TestRandomUnixTmpDirPath platform agnostic
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5d630abbab734d60cc3078fd1e94862a67e0d8fd
Component: engine
2015-09-24 09:37:07 -07:00
fcffa49e7d Fix test for container events
Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 5505bcdd628de4a45781609bdc10d203aab77834
Component: engine
2015-09-24 19:04:54 +08:00
d9099289b8 test neat
Signed-off-by: Kun Zhang <zkazure@gmail.com>
Upstream-commit: 029c6eacd6fa2970b5a8dea0acc0deecf1efbf5b
Component: engine
2015-09-24 10:55:47 +08:00
9ea32924b5 update TestRunWithKernelMemory
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: b89fdc120e188f8041c51c72963a9aa911ed0f99
Component: engine
2015-09-24 08:41:35 +08:00
d675aaa69f Windows: Fixed escaping of command line arguments
This fixes some tests that were failing on windows

Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: ca5cc770b9f0d473b285f55eb78d507a8669ee41
Component: engine
2015-09-23 16:35:44 -07:00
4429613429 Merge pull request #16289 from cpuguy83/11957_fix_stdin_block_after_container_exit
Ensure stdin does not block after container stop
Upstream-commit: c0c941627a2a516ce540aac2d9e3d579baa3efde
Component: engine
2015-09-23 15:29:48 -07:00
90fabf5056 Skip TestAppArmorDeniesChmodProc
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 04e1015aa06785210dc6a3e4d4ad66700a8d51b0
Component: engine
2015-09-23 13:23:15 -07:00
64940b5f4a Skip TestRunUnshareProc
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 03dce24137c82caa04c215d983eac06a3edc084c
Component: engine
2015-09-23 13:23:08 -07:00
d75894fcf6 Improvements to the original sharing implementation.
- Print the mount table as in /proc/self/mountinfo
- Do not exit prematurely when one of the ipc mounts doesn't exist.
- Do not exit prematurely when one of the ipc mounts cannot be unmounted.
- Add a unit test to see if the cleanup really works.
- Use syscall.MNT_DETACH to cleanup mounts after a crash.
- Unmount IPC mounts when the daemon unregisters an old running container.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: b1d2f52bb2bb900cddb526320b13da18634fe518
Component: engine
2015-09-23 12:07:24 -04:00
4f3fe3187a Add support for memory reservation
Signed-off-by: qhuang <qhuang@10.0.2.15>
Upstream-commit: aa1780997f42a3fbe3a7f9c7be2b8a5092b9b7c1
Component: engine
2015-09-23 14:02:45 +08:00
aee0028193 Merge pull request #16312 from Microsoft/10662-startwindowscli
Windows: First part of CI tests (docker run)
Upstream-commit: 04d76d898addae4451db28999a230a0399f08b30
Component: engine
2015-09-22 15:37:33 -04:00
fca7da0a8e Merge pull request #16235 from HuKeping/oom-event
Events for OOM needs to be shift to an earlier time
Upstream-commit: 114612305c798735e7022274cc9db382f30aa174
Component: engine
2015-09-22 11:50:30 -07:00
5a36e78a10 Windows: First part of CI tests (docker run)
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8a5ab83df8c029723d92a8b3a602b0d799753807
Component: engine
2015-09-22 10:24:03 -07:00
f5dba44987 Merge pull request #15864 from dmcgowan/notary-offline
Support content trust offline
Upstream-commit: a7e23cab8d10003914e39f1c954278c7be6bd759
Component: engine
2015-09-21 21:11:36 -07:00
511d6df253 Merge pull request #16457 from Microsoft/10662-blockarg
Windows: Nice error on ARG (builder)
Upstream-commit: 5c73f14c62127d136cfeec21a7f0f1c84dbf1f2c
Component: engine
2015-09-21 19:43:48 -04:00
295c5cdefd Windows: Nice error on ARG (builder)
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b69c13b1a643911a541c251b22b4a440197e5f7d
Component: engine
2015-09-21 14:54:15 -07:00
f1430df5ab Merge pull request #16404 from duglin/FixRenameError
Fix 'rename' error msg and error checking
Upstream-commit: 0c71c192395e259d76a51e08c7c3bd73eb6f16e7
Component: engine
2015-09-21 15:51:02 -04:00
1598efd7a1 Merge pull request #16413 from sunyuan3/TestRunSwapMoreThanMemoryLimit
Add the TestRunSwapMoreThanMemoryLimit case.
Upstream-commit: 732676fad53bec21b332d1430d102502c4c4e737
Component: engine
2015-09-21 15:43:20 -04:00
7a04c92cc8 Merge pull request #16437 from runcom/invalid-logger-address
daemon: logger: error out on daemon start if invalid logger address
Upstream-commit: d572bab4a09eb7d60961867d2d2f9896595a3271
Component: engine
2015-09-21 14:53:47 -04:00
a3f8f51f2a Merge pull request #15029 from azurezk/add-version-info
Add docker version info in /info request
Upstream-commit: 40edb5f97c3ba95e450c8280b29d0ef027b51cfb
Component: engine
2015-09-21 11:44:11 -07:00
6c9902c2db Add the TestRunSwapLessThanMemoryLimit case.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: ab39a4c98110d9a16afd73ce2992ab3d4532201a
Component: engine
2015-09-21 22:12:19 +08:00
8e71940329 add docker server version to /info
Signed-off-by: Zhang Kun <zkazure@gmail.com>
Upstream-commit: 7cf343d1064e3d8211597c67574ff4ddff316fa1
Component: engine
2015-09-21 21:15:32 +08:00
99072d662d Events for OOM needs to be shift to an earlier time
It's worth to warn user as soon as possilbe when OOM happend.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: f05bacbe509823e2ca65583f35188ca09d01db80
Component: engine
2015-09-21 10:18:08 +08:00
82a956ef62 integration-cli: check err on tmp dir creation
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: b616b8a17a9f61881c83c2324399856e466a0805
Component: engine
2015-09-21 00:00:55 +02:00
72ffa04366 daemon: logger: error out on daemon start if invalid logger address
If an invalid logger address is provided on daemon start it will
silently fail. As syslog driver is doing, this check should be done on
daemon start and prevent it from starting even in other drivers.
This patch also adds integration tests for this behavior.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: e3c472426ff1dccf083e41dbbfdf5935921bf330
Component: engine
2015-09-20 16:20:25 +02:00
16952d5c9b Merge pull request #16363 from coolljt0725/fix_net_none_test
Fix --net none test closes #16356
Upstream-commit: 7d5603e7cbc8799789b356adf354c1859e4974e7
Component: engine
2015-09-19 09:25:12 -04:00
fde5729def Fix --net none test closes #16356
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 0b2091132a6db1a9887626e1e85ca644c50dcbb4
Component: engine
2015-09-18 20:49:36 -04:00
f242555aaa integration-cli: fix tests with memory limit
If you don't have cgroup swap memory support, `dockerCmd`'s output in
these tests will be polluted by a warning from the daemon and will fail
the tests.
No need to have memory swap support for these tests to run as it will
be reset to -1 and everything will continue correctly.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 0b8b8ed9e98a7355661f1aad93bfa0dd76362723
Component: engine
2015-09-19 00:07:40 +02:00
f1ab116cf0 Merge pull request #16403 from runcom/fix-containers-json-emtpy-response
Fix GET /containers/json emtpy response regression
Upstream-commit: 96f9efc0636be5d89fd242e7a5aa96485b80ad01
Component: engine
2015-09-18 11:47:42 -07:00
3a09d2b95a Fix 'rename' error msg and error checking
`docker rename foo ''` would result in:
```
usage: docker rename OLD_NAME NEW_NAME
```
which is the old engine's way of return errors - yes that's in the
daemon code.  So I fixed that error msg to just be normal.

While doing that I noticed that using an empty string for the
source container name failed but didn't print any error message at all.
This is because we would generate a URL like: ../containers//rename/..
which would cause a 301 redirect to ../containers/rename/..
however the CLI code doesn't actually deal with 301's - it just ignores
them and returns back to the CLI code/caller.

Rather than changing the CLI to deal with 3xx error codes, which would
probably be a good thing to do in a follow-on PR, for this immediate
issue I just added a cli-side check for empty strings for both old and
new names. This way we catch it even before we hit the daemon.

API callers will get a 404, assuming they follow the 301, for the
case of the src being empty, and the new error msg when the destination
is empty - so we should be good now.

Add tests for both cases too.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 848792c42e61070adc4107a39d6a044e2ed615f7
Component: engine
2015-09-18 11:12:22 -07:00
3194323cdb Ensure stdin does not block after container stop
Fixes #11957
Fixes #12319

Also removes check for Darwin when the stdin reader is closed as it
doesn't appear to block any more.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 3dbfb3d38c4dcfb602e12ed2828d22d155897518
Component: engine
2015-09-18 13:48:07 -04:00