Commit Graph

3843 Commits

Author SHA1 Message Date
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
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
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
5c50f1d40b Merge pull request #26428 from darrenstahlmsft/AddToSymlink
Don't attempt to evaluate drive root on Windows
Upstream-commit: c1f2776bf1e8997e44d3c244e99104b3511b7255
Component: engine
2016-09-09 09:09:24 -07:00
7bef93723c Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: d8fef66b03c1ea8715470690efbd950033f7f628
Component: engine
2016-09-08 21:31:52 -04:00
015d80b443 client: don't hide context errors
Instead of reformatting error from the request action, we wrap it,
allowing the cause to be recovered. This is important for consumers that
need to be able to detect context errors, such as `Cancelled` and
`DeadlineExceeded`.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 8e5ef8af5c90a3fbc93173cb485d42e044ca56ae
Component: engine
2016-09-08 17:47:43 -07:00
4e9c99c3b4 Don't attempt to evaluate drive root on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: fdce2a7775ec80d769f585c0a400c6cf6615776b
Component: engine
2016-09-08 13:52:54 -07:00
fbcd483854 Merge pull request #26119 from cpuguy83/lazily_load_fixtures
Move some test fixtures to go
Upstream-commit: 4e2d4429013ff4f6ca100063869b27b247f7da34
Component: engine
2016-09-08 11:16:27 -07:00
10deb56947 Merge pull request #26405 from yongtang/26326-inspect-ulimit-with-daemon-default
Fix Ulimits in `docker inspect` when daemon default exists
Upstream-commit: ba07661f0d6ae6b1b0d2e7271a8c8933bcc15364
Component: engine
2016-09-08 13:21:26 -04:00
9fa1fb8eb9 Merge pull request #25962 from mrjana/net
Add support for docker run in swarm mode overlay
Upstream-commit: 719a640743604105d8eb029613c6d976163cea91
Component: engine
2016-09-08 09:39:00 -07:00
955f123fe8 Fix ulimits in docker inspect when daemon default exists
This fix tries to fix 26326 where `docker inspect` will not show
ulimit even when daemon default ulimit has been set.

This fix merge the HostConfig's ulimit with daemon default in
`docker inspect`, so that when daemon is started with `default-ulimit`
and HostConfig's ulimit is not set, `docker inspect` will output
the daemon default.

An integration test has been added to cover the changes.

This fix fixes 26326.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7d705a7355d650feffc966e08efc0f92297145a8
Component: engine
2016-09-07 23:15:22 -07:00
f0d30a4b26 Add support for docker run in swarm mode overlay
This PR adds support for running regular containers to be connected to
swarm mode multi-host network so that:
    - containers connected to the same network across the cluster can
      discover and connect to each other.
    - Get access to services(and their associated loadbalancers)
      connected to the same network

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: 99a98ccc14a9427be47c8006e130750710db0a16
Component: engine
2016-09-07 21:20:41 -07:00
29459f6822 Windows: docker top implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 52f0474851298e7ba70b1a7ea16e3421d5926c98
Component: engine
2016-09-07 16:29:02 -07:00
cecd3ec1b9 Move some test fixtures to go
moves ensure-frozen-images to go
moves ensure-syscall-test to go
moves ensure-nnp-test to go
moves ensure-httpserver to go

Also makes some of the fixtures load only for the required tests.
This makes sure that fixtures that won't be needed for a test run such as
`make TESTFLAGS='-check.f Swarm' test-integration-cli` (for example)
aren't loaded... like the syscall tests.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ff91276d1f5beab5582d9ca582ee01af13198333
Component: engine
2016-09-07 17:30:35 -04:00
45ddc4bfcb Add engine-api types to docker
This moves the types for the `engine-api` repo to the existing types
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 91e197d614547f0202e6ae9b8a24d88ee131d950
Component: engine
2016-09-07 11:05:58 -07:00
a1f4f932da Merge pull request #26342 from cpuguy83/20079_restore_volume_migrate
restore migrating pre-1.7.0 volumes
Upstream-commit: a6daa94e3e0c1a60ba054eddc819c77a5dcc78b9
Component: engine
2016-09-07 10:56:07 -07:00
19d0c0f4d5 Merge pull request #23100 from runcom/fix-stores
support legacy registries in exernal stores
Upstream-commit: 86124ca04b4b0ff4096ca95626e7864692edeadf
Component: engine
2016-09-07 09:44:41 -07:00
03938c05b0 Merge pull request #26115 from yongtang/08292016-info-registry-mirrors
Add registry mirrors information in the output of `docker info`
Upstream-commit: 6168e98a13ee4d226fe96c5afbe672065ddf2c8e
Component: engine
2016-09-07 11:37:36 -04:00
c44fd4c927 Merge pull request #26352 from Microsoft/jjh/volumenocopydata
Windows: Correct TestVolumesNoCopyData
Upstream-commit: a51fcc26fa14c92b5bee8896c738943a29e38818
Component: engine
2016-09-07 11:23:10 +02:00
4eb86a788b support legacy registries in exernal stores
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 67d752ac55869eab42280947ad37ff5e1468d458
Component: engine
2016-09-07 09:45:42 +02:00
4cf63a1696 Windows: Correct TestVolumesNoCopyData
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8a1fdce7fe991f64d7ba44ea39f6e9fe99199e0f
Component: engine
2016-09-06 15:38:19 -07:00
02397cb234 Integration-cli: change daemon id generation
Fixes #24805

Changes test daemon id generation from using time.Now().UnixNano() to using
stringid. This is because of a go bug (fixed upstream for 1.8) on ppc64le
and s390x where time.Now().UnixNano() would not return nanosecond precision,
so initializing consecutive daemons sometimes would result in them having
the same id.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 42f3865d248c29b6a9accf7f0c07d766c3b54d4a
Component: engine
2016-09-06 18:17:24 -04:00
0805748a2b restore migrating pre-1.7.0 volumes
This was removed in a clean-up
(060f4ae6179b10aeafa883670826159fdae8204a) but should not have been.
Fixes issues with volumes when upgrading from pre-1.7.0 daemons.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: dc712b92495d12d789f45c84d45c3de3292089a8
Component: engine
2016-09-06 17:17:47 -04:00
0192bac2c8 Add test for checking created directories on remapped root
Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
Upstream-commit: c6bff578b4f169e2fbd67dfbe9f0ac147fc8c255
Component: engine
2016-09-05 13:02:13 +03:00