Commit Graph

3865 Commits

Author SHA1 Message Date
1cd6ebde3c Merge pull request #26219 from dmcgowan/optimize-token-server-error-test
Update token server error test to not fail on retries
Upstream-commit: 33466024e73e95e175619170be5d9e36e800b961
Component: engine
2016-09-26 23:17:09 +01:00
a3e576de79 Merge pull request #26744 from LK4D4/attach_before_start
libcontainerd: attach streams before create
Upstream-commit: f67096c20b0bcbee115c9923861bfc25bbe3b4f2
Component: engine
2016-09-26 13:08:05 -07:00
f2233e9c75 Merge pull request #23886 from AkihiroSuda/stackcli
add `docker stack ls`
Upstream-commit: a4dd51a6601f7cb07b23a55134dc18a12d2814ee
Component: engine
2016-09-26 21:19:04 +02:00
356aff7cd8 Merge pull request #26839 from tonistiigi/build-cache
Implement build cache based on history array
Upstream-commit: 7944480dd0dfb00323f960d37c31d0ddad5f6cf2
Component: engine
2016-09-26 17:31:49 +00:00
832ffce833 Improve error message for removing pre-defined (e.g., ingress) network
This fix tries to address the issue raised in 24538

where the error message is unclear when removing pre-defined networks:
```
docker network rm ingress
Error response from daemon: rpc error: code = 7 desc = 4vlxuzpk8bxdsxpyvkxluol5g is a pre-defined network and cannot be removed
```

This fix improve the error message so that if network's name is specified
in the `RemoveNetwork`, then error message will contain the name and the ID
(instead of just an ID):
```
docker network rm ingress
Error response from daemon: rpc error: code = 7 desc = ingress (4vlxuzpk8bxdsxpyvkxluol5g) is a pre-defined network and cannot be removed
```

An integration test has been added to cover the changes.

This fix fixes 24538.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: de4871165b43ec813940858a1c96ab6bb1fbd776
Component: engine
2016-09-24 11:59:26 -07:00
a5f8803b6c Add integration test for build —cache-from
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4b8e680bcc4864020effe46560a57098e0dc4c35
Component: engine
2016-09-23 11:30:34 -07:00
1c6164038a Merge pull request #26834 from thaJeztah/deprecate-docker-daemon
Deprecate "daemon" subcommand
Upstream-commit: 57f0164fd2aff893364d4544f8778b0925ac287a
Component: engine
2016-09-23 08:51:18 -04:00
a0b2adc110 Merge pull request #26516 from yongtang/26453-build-bad-syntax
Check bad syntax on dockerfile before building.
Upstream-commit: 72f556a9ff1043a4188e8eeef892d8a0ba4fe34f
Component: engine
2016-09-23 12:24:20 +02:00
3c8d35d9dd Deprecate "daemon" subcommand
The daemon is in a separate (dockerd) binary
since docker 1.12, so should no longer be
used.

This marks the command as deprecated, and
adds it to the deprecated features list.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bf58dd82c31bb3a71916eec743d0560e360c6e08
Component: engine
2016-09-23 00:26:27 +02:00
0d2c33693e add docker stack ls
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 5ce08ddfcae5ded73ef0c93c9daba7c916c21ae5
Component: engine
2016-09-22 19:31:39 +00:00
d129fb411b Windows: Remove hard coded base image
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 34fe27f153386d07509fc7bb8363d0166ef9cda3
Component: engine
2016-09-22 09:57:35 -07:00
46015b068c Merge pull request #26787 from Microsoft/jjh/14375hacks
Windows: Remove interim build hacks from tests
Upstream-commit: 9e2178499abb7cc81420a4e9e8f993618a48072f
Component: engine
2016-09-22 11:12:02 +02:00
91744d608c Windows: Remove interim build hacks from tests
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b52c3ec4a45ee89d8ad713a16566fd470b4b5bf1
Component: engine
2016-09-21 11:11:13 -07:00
02d52c35b1 libcontainerd: attach streams before create
Fix #26371

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 02d1934279294f28af6e509a29f909654677ed8b
Component: engine
2016-09-21 09:16:12 -07:00
87c5d52952 integration: fix flaky TestSwarmServiceWithGroup
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: ef4bcf23e6d2324f15628ed3c0e8e8200593bd5f
Component: engine
2016-09-20 12:07:30 -07:00
0313da09a5 Merge pull request #26720 from AkihiroSuda/fix-TestBuildApiDockerFileRemote
[test] Fix TestBuildApiDockerFileRemote
Upstream-commit: 6eb6eaf7181ce9a37fd9bc60422f9993aa59d3c3
Component: engine
2016-09-20 17:57:01 +02:00
782ab7bfdc Fix TestBuildApiDockerFileRemote
TestBuildApiDockerFileRemote has been consistently failing (EPERM) on the host
with #26618, which prohibits /sys/firmware from being accessed using apparmor.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: f453261b4a53ab71db8b78ea119b4edd69b95ae3
Component: engine
2016-09-20 14:15:37 +00:00
8ee0f56810 Add init process for zombie fighting
This adds a small C binary for fighting zombies.  It is mounted under
`/dev/init` and is prepended to the args specified by the user.  You
enable it via a daemon flag, `dockerd --init`, as it is disable by
default for backwards compat.

You can also override the daemon option or specify this on a per
container basis with `docker run --init=true|false`.

You can test this by running a process like this as the pid 1 in a
container and see the extra zombie that appears in the container as it
is running.

```c

int main(int argc, char ** argv) {
	pid_t pid = fork();
	if (pid == 0) {
		pid = fork();
		if (pid == 0) {
			exit(0);
		}
		sleep(3);
		exit(0);
	}
	printf("got pid %d and exited\n", pid);
	sleep(20);
}
```

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: ee3ac3aa66bfb27b7c21dfb253fdaa113baedd4e
Component: engine
2016-09-19 17:33:50 -07:00
5f83c7f680 Merge pull request #26442 from vieux/add_warning_plugin_rm
add check plugin is not used before rm
Upstream-commit: 69114bb3a759d74baa1f6809d3e4610c69b8be07
Component: engine
2016-09-19 16:03:17 -07:00
14f9dd10a3 Merge pull request #26268 from AkihiroSuda/eventsjsonl
add `docker events --format`
Upstream-commit: bb6fe56e8847112e55429309bf3ac004753ae3a8
Component: engine
2016-09-19 17:30:27 +02:00
5049c43226 Merge pull request #25737 from Microsoft/jjh-statistics
Windows: Add support for docker stats
Upstream-commit: 4a0419f536ce3a7b1eade67440cfc84d6e486caf
Component: engine
2016-09-17 09:31:24 -07:00
93e3695b69 Merge pull request #26387 from Microsoft/jjh/securityopts
Only output security options if there are any
Upstream-commit: 94bc2b1bc07843087c0096d06fdb56d70aa45a02
Component: engine
2016-09-16 23:05:30 +02:00
7342ae40e2 Windows: stats support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 340e5233b2fb95981ddea610c1667134ed3b2376
Component: engine
2016-09-16 11:56:15 -07:00
39533df3e9 Only output security options if there are any
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: dd3d223a7ea3fc35eeeb255fc97a7bc46936cae5
Component: engine
2016-09-16 10:05:21 -07:00
ca8908a3a8 add check plugin is not used before rm
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: b22d07f51573e39069b4e3a6d8b0580958412e72
Component: engine
2016-09-15 13:50:57 -07:00
e6635a948e add docker events --format
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 5af5a1be6209bde3f05b5f9ed4e0db0037dfe0ff
Component: engine
2016-09-15 09:55:29 +00:00
3a18bebe6e Merge pull request #26553 from darrenstahlmsft/FixWildcard
Windows: Fix wildcard expansion after slash in filename
Upstream-commit: 39f5d97cde3f93953be3c9172034b83d61bff710
Component: engine
2016-09-14 16:56:35 -07:00
89894cc565 Merge pull request #26552 from darrenstahlmsft/EnableBuildTests
Windows: Enable more build tests
Upstream-commit: 1573ea597433051fc8e5e6962ab2de5918d49c7c
Component: engine
2016-09-14 14:07:19 -07:00
3b6af8e398 Merge pull request #26574 from cpuguy83/fix_improper_use_in_test
Fix improper use of `--rm` in test case
Upstream-commit: f8d6dedb6a2476ee336245e874a49b0da2285f25
Component: engine
2016-09-14 15:28:40 -04:00
efe814ccf6 Windows: Fix wildcard expansion after slash in filename
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 309056648c8263aca388e679179464e59a9f52c8
Component: engine
2016-09-14 11:40:57 -07:00
23bca39d98 Fix improper use of --rm in test case
Test is testing that a user can disconnect from the default network
before it is started (#26220).
This test does not need to use `--rm`, which is never aken into account
since the container is never started.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f05ed0075893bb907b5cc2612d9193d775134e2d
Component: engine
2016-09-14 13:14:30 -04:00
cc5042d8d1 Merge pull request #26504 from tonistiigi/frozen-fix
Fix already loaded detection for frozen images
Upstream-commit: 397df22963e9190bee494c8562a8c4c1bb1fdb6f
Component: engine
2016-09-14 08:22:48 -07:00
422892f89b Merge pull request #25540 from estesp/ro-plus-userns
Remove --read-only restriction when user ns enabled
Upstream-commit: 8ac2000f5065b887753ffe32d2b793bb4bbd84c5
Component: engine
2016-09-14 13:53:58 +02:00
9a730a715e Check bad syntax on dockerfile before building.
This fix tries to address the issue raised in 26453 where bad syntax
on dockerfile is not checked before building, thus user has to wait
before seeing error in dockerfile.

This fix fixes the issue by evaluating all the instructions and check
syntax before dockerfile is invoked actually.

All existing tests pass.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c8dc2b156a079ce03db8f579094b9643632661a8
Component: engine
2016-09-13 21:43:10 -07:00
131853bc0a Merge pull request #26449 from mrjana/net
Fix autostart for swarm scope connected containers
Upstream-commit: 1d76ab4f80e3bc2b6b62e7913b6be01966cb0975
Component: engine
2016-09-13 18:22:16 -07:00
b5041bd104 Windows: Enable more build tests
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: e79b0b42f074ced1814010974ffad47d0d3d24d0
Component: engine
2016-09-13 17:43:27 -07:00
293cb24e33 Fix autostart for swarm scope connected containers
The swarm scope network connected containers with autostart enabled
there was a dependency problem with the cluster to be initialized before
we can autostart them. With the current container restart code happening
before cluster init, these containers were not getting autostarted
properly. Added a fix to delay the container start of those containers
which has atleast one swarm scope endpoint to until after the cluster is
initialized.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: c9fb551d60584ac4ad01561e2f56b7b7cc9483b9
Component: engine
2016-09-13 14:21:58 -07:00
71b78a5b8d Use opts.FilterOpt for filter flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a07be9be38a96f43a0a7bac48caf35f9370bb543
Component: engine
2016-09-13 16:20:10 -04:00
8782511c3a Merge pull request #22373 from cpuguy83/add_mounts_api_on_create
Add new `HostConfig` field, `Mounts`.
Upstream-commit: b4c1645db5d45720665683bbefb053c4e09f73dd
Component: engine
2016-09-13 14:39:50 -04:00
393b27a858 Merge pull request #26503 from clnperez/swarm-test-move-err-check
swarm: always check err before http status in tests
Upstream-commit: 711455d34eb082ad11de1da2e2952dee017175ab
Component: engine
2016-09-13 10:53:55 -07:00
988b9e5bc2 Merge pull request #26433 from Microsoft/jjh/fix24819
Windows: Fix regression pulling linux images
Upstream-commit: 85c3b8c1b15923fb45e59b7fb986012241ece419
Component: engine
2016-09-13 08:35:38 -07:00
06b2219a87 Add new HostConfig field, Mounts.
`Mounts` allows users to specify in a much safer way the volumes they
want to use in the container.
This replaces `Binds` and `Volumes`, which both still exist, but
`Mounts` and `Binds`/`Volumes` are exclussive.
The CLI will continue to use `Binds` and `Volumes` due to concerns with
parsing the volume specs on the client side and cross-platform support
(for now).

The new API follows exactly the services mount API.

Example usage of `Mounts`:

```
$ curl -XPOST localhost:2375/containers/create -d '{
  "Image": "alpine:latest",
  "HostConfig": {
    "Mounts": [{
      "Type": "Volume",
      "Target": "/foo"
      },{
      "Type": "bind",
      "Source": "/var/run/docker.sock",
      "Target": "/var/run/docker.sock",
      },{
      "Type": "volume",
      "Name": "important_data",
      "Target": "/var/data",
      "ReadOnly": true,
      "VolumeOptions": {
	"DriverConfig": {
	  Name: "awesomeStorage",
	  Options: {"size": "10m"},
	  Labels: {"some":"label"}
	}
      }]
    }
}'
```

There are currently 2 types of mounts:

  - **bind**: Paths on the host that get mounted into the
    container. Paths must exist prior to creating the container.
  - **volume**: Volumes that persist after the
    container is removed.

Not all fields are available in each type, and validation is done to
ensure these fields aren't mixed up between types.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: fc7b904dced4d18d49c8a6c47ae3f415d16d0c43
Component: engine
2016-09-13 09:55:35 -04:00
9ad17e2570 Merge pull request #26461 from crosbymichael/term-exec
Add TERM env var to exec
Upstream-commit: 036a8f77b066c8c72e395fc78b08d34c934f9c21
Component: engine
2016-09-12 14:57:37 -07:00
57ee443d45 Fix already loaded detection for frozen images
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ed747e5a9e48c9e4b574895a5aab0e5daab670d1
Component: engine
2016-09-12 12:55:26 -07:00
06d71bc71f Always check err before http status
A test failed expecting 200, but received -1, which is an err rc,
not an HTTP status code, so move these checks up.

Also log the output an not just check for a nil err.

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Upstream-commit: 3dea5dbb9acb2699569c5aaf3737d58793152b3c
Component: engine
2016-09-12 12:45:08 -05:00
ace1c458e2 Add TERM env var to exec
When the `-t` flag is passed on exec make sure to add the TERM env var
to mirror the expected configuration from run.

Fixes #9299

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 4633f15f13d51530de2438c298a1084c55e4fedf
Component: engine
2016-09-12 09:20:27 -07:00
06f3b31b69 test: fix trivial code convention noncompliance
daemon/events/testutils: rename eventstestutils to testutils
volume/testutils: rename volumetestutils to testutils

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: e03cc68e3adb8aa584ed7db3cd70084fac0a2c4f
Component: engine
2016-09-12 07:36:52 +00:00
e66566fbee Windows: Fix regression pulling linux images
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8437d0a3298abf8bf3632a2764b945956ece422f
Component: engine
2016-09-09 11:40:34 -07:00
32b3a84313 Merge pull request #22049 from boucher/docker-checkpoint-restore
Implement containerd API for checkpoints
Upstream-commit: cf58eb437c4229e876f2d952a228b603a074e584
Component: engine
2016-09-09 13:36:55 -04:00
c9069cbf6e Remove --read-only restriction when user ns enabled
The restriction is no longer necessary given changes at the runc layer
related to mount options of the rootfs. Also cleaned up the docs on
restrictions left for userns enabled mode. Re-enabled tests related to
--read-only when testing a userns-enabled daemon in integration-cli.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 6062ae5742e49ec1a79073c327f3d1343c218a12
Component: engine
2016-09-09 13:23:41 -04:00