Commit Graph

1991 Commits

Author SHA1 Message Date
fca0f83907 Merge pull request #16752 from vdemeester/skip-TestExecStartFails-on-windows
Skip TestExecStartFails on windows
Upstream-commit: 7c19f660b3a0f5e5551ea8af2b3cc9b5266c2ada
Component: engine
2015-10-06 13:52:51 -07:00
1bddd2d12a No error shadow pullImageIfNotExist
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b7009a4b3ad7e495be61a61e9aacc5e263073670
Component: engine
2015-10-06 11:38:23 -07:00
9d1d2940bc Merge pull request #16776 from shishir-a412ed/docker_tag_error_msg
Make docker tag error message more user friendly
Upstream-commit: aac5c44c10c8a862782a410b75273646ba2e6e9c
Component: engine
2015-10-05 22:06:29 +02:00
d3de206cf9 Make docker tag error message more user friendly
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 582a24e937d1e0746b91a13bacd7f5fd65a38741
Component: engine
2015-10-05 15:19:34 -04:00
0eed66fc40 Merge pull request #16769 from LK4D4/fix_volume_socket
Allocate resources for server API before daemon creation
Upstream-commit: 80f2e3f0c6d8c439ba0d4b53162dcf1610ad2d46
Component: engine
2015-10-05 20:48:41 +02:00
c12ca2de3a Allocate resources for server API before daemon creation
It prevents occupying of those resources (ports, unix-sockets) by
containers.
Also fixed false-positive test for that case.

Fix #15912

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 5eda566f937dddef9d4267dd8b8b1d8c3e47b290
Component: engine
2015-10-05 09:32:08 -07:00
e846ce8223 Merge pull request #16530 from dnephin/filter_events_by_label
Filter events by labels
Upstream-commit: e86291edd88641cc866c842d0f4a8f8296820aeb
Component: engine
2015-10-04 20:36:42 +02:00
ec3df7c39d While #16738 is "fixed", skip TestExecStartFails
… on windows

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: dc204b87864a06d37f9515b57bd6f76dac24a016
Component: engine
2015-10-04 18:38:21 +02:00
a3a78e3ce4 Merge pull request #16509 from HuKeping/search-problem
Fix docker search problem
Upstream-commit: b78f66c472399bf56bd5110dbdaac5e5676396c8
Component: engine
2015-10-04 18:21:32 +02:00
a66830822a Fix docker search problem
Search terms shouldn't be restricted to only full valid repository
names. It should be perfectly valid to search using a part of a name,
even if it ends with a period, dash or underscore.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: f04e8fdb9bbcdad28de5c328b7de3f3abdae0b5a
Component: engine
2015-10-04 23:23:43 +08:00
1dfde818a2 Resolves #16458 - filter events by labels.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 08b117517d6d6b5daebe4c056c135e1598f44385
Component: engine
2015-10-02 16:33:20 -04:00
3b057aaeb2 Merge pull request #16250 from cpuguy83/15487_exec_error_codes
Make exec start return proper error codes
Upstream-commit: 5a43beda91efd9a53c798082abbc5b287167aa0c
Component: engine
2015-10-02 12:55:17 -07:00
56b56acf38 Merge pull request #16708 from jfrazelle/fix-shm-mqueue-when-mounted-from-host
do not mount /dev/shm or /dev/mqueue if we are mounting from the host
Upstream-commit: 662f55d11d2f278daf5b9be215608540af35be4d
Component: engine
2015-10-02 15:13:59 -04:00
a9fcaeb043 Make exec start return proper error codes
Exec start was sending HTTP 500 for every error.

Fixed an error where pausing a container and then calling exec start
caused the daemon to freeze.

Updated API docs which incorrectly showed that a successful exec start
was an HTTP 201, in reality it is HTTP 200.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2d43d93410c29cec87deb9cd940c3b2a8af5fbbb
Component: engine
2015-10-02 14:40:22 -04:00
f14e695085 Merge pull request #16159 from runcom/validate-cpuset-cpus
Validate --cpuset-cpus, --cpuset-mems
Upstream-commit: 698e14902a06af0613b697d88935ae0200659bff
Component: engine
2015-10-02 11:30:46 -07:00
0cd51b7f83 add regression test for mounting /dev/shm from host
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 934d9d632313acd338608ca1ad25c5270463e9c0
Component: engine
2015-10-02 11:14:08 -07:00
b8616b16f4 Merge pull request #16076 from vbatts/export_image_times
graph: exported images times matching creation
Upstream-commit: 77da5d8feb5cf88446df0045240b4943ce4fc206
Component: engine
2015-10-01 21:50:43 +01:00
90b9ae3169 save: integration test for timestamp matching
The `docker save`ed output ought to have matching timestamp to the layer
creation.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: e4478caddf78700bd42f94eb382ae1805a443618
Component: engine
2015-10-01 14:38:55 -04:00
568946688a Merge pull request #16385 from RichardScothern/v1-deprecation
Add a daemon flag to prevent contact with v1 registries.
Upstream-commit: 85244f80e324428cef3dc526d1c831ed20eac6c2
Component: engine
2015-09-30 10:10:06 -07:00
a1b5e8a4f8 Merge pull request #16580 from coolljt0725/unpause_all_container_on_exit
Make sure the container will always be unpaused on test exit
Upstream-commit: 729c9a97822ebee2c978a322d37060454af6bc66
Component: engine
2015-09-29 21:44:23 -04:00
2a8c716e73 Merge pull request #16650 from cpuguy83/no_named_volumes_for_builder
Do not parse config.Volumes for named volumes
Upstream-commit: ae03e544e78dd478c72021fa72fd91351553fba5
Component: engine
2015-09-29 17:04:29 -07:00
69db6279aa Revert "Merge pull request #16228 from duglin/ContextualizeEvents"
Although having a request ID available throughout the codebase is very
valuable, the impact of requiring a Context as an argument to every
function in the codepath of an API request, is too significant and was
not properly understood at the time of the review.

Furthermore, mixing API-layer code with non-API-layer code makes the
latter usable only by API-layer code (one that has a notion of Context).

This reverts commit de4164043546d2b9ee3bf323dbc41f4979c84480, reversing
changes made to 7daeecd42d7bb112bfe01532c8c9a962bb0c7967.

Signed-off-by: Tibor Vass <tibor@docker.com>

Conflicts:
	api/server/container.go
	builder/internals.go
	daemon/container_unix.go
	daemon/create.go
Upstream-commit: b08f071e18043abe8ce15f56826d38dd26bedb78
Component: engine
2015-09-29 14:26:51 -04:00
e87759cf33 Merge pull request #16649 from mtrmac/16648-test-text-fixups
Fix text not matching the actual tests
Upstream-commit: 4e0eb91c5577a0310366d699fbed3b213e7caa38
Component: engine
2015-09-29 12:01:19 -04:00
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
4b1e83454e Do not parse config.Volumes for named volumes
Fixes an issue where `VOLUME some_name:/foo` would be parsed as a named
volume, allowing access from the builder to any volume on the host.

This makes sure that named volumes must always be passed in as a bind.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 8e5bb8fdd37879ec04c3419b8ecfce7a0477cdcf
Component: engine
2015-09-29 10:01:57 -04:00
5950661408 Fix text not matching the actual tests
Also fixes a typo in image name.

Fixes #16648

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Upstream-commit: 8781367c77a915799dff2892f4506f085ac6b68b
Component: engine
2015-09-29 15:26:04 +02: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
360eb92f7d Validate --cpuset-cpus, --cpuset-mems
Before this patch libcontainer badly errored out with `invalid
argument` or `numerical result out of range` while trying to write
to cpuset.cpus or cpuset.mems with an invalid value provided.
This patch adds validation to --cpuset-cpus and --cpuset-mems flag along with
validation based on system's available cpus/mems before starting a container.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 94464e3a5e1dce0f6b3e821f79fe193278f67dba
Component: engine
2015-09-27 16:38:58 +02:00
a0f9fee301 Prevent push and pull to v1 registries by filtering the available endpoints.
Add a daemon flag to control this behaviour.  Add a warning message when pulling
an image from a v1 registry.  The default order of pull is slightly altered
with this changset.

Previously it was:
https v2, https v1, http v2, http v1

now it is:
https v2, http v2, https v1, http v1

Prevent login to v1 registries by explicitly setting the version before ping to
prevent fallback to v1.

Add unit tests for v2 only mode.  Create a mock server that can register
handlers for various endpoints.  Assert no v1 endpoints are hit with legacy
registries disabled for the following commands:  pull, push, build, run and
login.  Assert the opposite when legacy registries are not disabled.

Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
Upstream-commit: 39f2f15a35121f348e1a87db4203bcb72e632b16
Component: engine
2015-09-25 15:59:42 -07: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
fac9728783 Make sure the container will always be unpaused on test exit
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 5106532601a5c8dbf734f5ebb4e9a3745d941534
Component: engine
2015-09-25 05:15:16 -04: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