Commit Graph

3827 Commits

Author SHA1 Message Date
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
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
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
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
edfe468b08 Fix issue in disconnecting a container from network
This fix tries to address the issue raised in 26220 where
disconnecting a container from network does not work if
the network id (instead of network name) has been specified.

The issue was that internally when trying to disconnecting
a contaienr fromt the network, the originally passed network
name or id has been used.

This fix uses the resolved network name (e.g., `bridge`).

An integration test has been added to cover the changes.

This fix fixes 26220.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 83d79f13aa2e94085e83e0f5bc5d51305dd2c192
Component: engine
2016-09-04 07:28:45 -07:00
637e45cd56 Merge pull request #26290 from tonistiigi/govet17
Fix govet for go1.7
Upstream-commit: c73fae2352788323476759f4199b034b7ffc54dd
Component: engine
2016-09-03 19:27:19 +02:00
833a33ebb8 Fix govet for go1.7
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 7a8c7b47cffa8485b03db715f78c087b01ae5dfa
Component: engine
2016-09-02 19:07:54 -07:00
300565157d Merge pull request #26225 from yongtang/26173-docker-import-quoted-change
Fix issue in `docker import -c` with quoted flags
Upstream-commit: 2e0bc0393a7a8f912e0d05d1806c770c1c8c6790
Component: engine
2016-09-02 13:34:25 -04:00
deca0aec9f Merge pull request #26261 from Microsoft/jjh/morebuildtests
Windows CI: Enable some more build tests
Upstream-commit: 84ebbb52314433d4724ad9c75c7d04e886fb59bd
Component: engine
2016-09-02 09:41:08 -04:00
e92f9d7cac Merge pull request #24510 from runcom/new-seccomp-format
New seccomp json format
Upstream-commit: 9d71cba5f09825cdafe04fdb0243cc30bf887b68
Component: engine
2016-09-02 09:14:01 +01:00
e2707394d0 Fix issue in docker import -c with quoted flags
This fix tries to address the issue in 26173 where `docker import -c`
with quoted flags returns an error.

The issue was that in `api/client/image/import.go` the flag
`--change/-c` was handled by `StringSliceVarP` which does not handle
the quote well.

The similiar issue was enountered for 23309 (`docker commit`).

This fix takes the same approach as 23309 where `StringSliceVarP`
was replaced with `VarP` and `opts.ListOpts`.

An integration test has been added to cover the changes.

This fix fixes 26173.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a79a27412d721a042ae96b411ab1b5b926a7d28a
Component: engine
2016-09-01 16:28:22 -07:00
9968a690ca Windows CI: Enable some more build tests
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ede6163ec684efd04faffa8ce6d7f4213fe08c75
Component: engine
2016-09-01 16:27:04 -07:00
19ba10b1b0 Merge pull request #26172 from Microsoft/jjh/testinspect
Windows: Enable multiple TestInspect tests
Upstream-commit: a19bdec6f0f2ca1b7539f701583f2f33f1923a2c
Component: engine
2016-09-01 19:46:19 +02:00
a1893f6374 Merge pull request #26077 from runcom/fix-TestImportBadURL
integration-cli: fix TestImportBadURL w/o network
Upstream-commit: 83fc63f9678cd1233bb0f86591a558acada621ac
Component: engine
2016-09-01 09:30:02 -07:00
9c1528efb8 Merge pull request #26226 from YuPengZTE/devTest
The first letter should be small in errors.New
Upstream-commit: 8abaf62715fab8422f20a28af2ff848223898839
Component: engine
2016-09-01 17:28:32 +02:00
009555a4b2 New seccomp format
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 5ff21add06ce0e502b41a194077daad311901996
Component: engine
2016-09-01 11:53:07 +02:00
a03ebc79ee Merge pull request #26200 from runcom/engine-api-vendor
vendor docker/engine-api@f9cef59044
Upstream-commit: 8ccac1ad4de898583113d036810da3a35a9be906
Component: engine
2016-09-01 10:51:34 +01:00
d73fb19f36 Merge pull request #26180 from yongtang/25943-validate-ip6
Fix issue in `--ip6` validation for `docker create`
Upstream-commit: f173555de8201d8b4a6578a52d405655212fbb5d
Component: engine
2016-09-01 11:02:16 +02:00
861fb5fa76 Merge pull request #26181 from yongtang/08302016-DockerDaemonSuite-NewDaemon
Change related test from DockerSuite to DockerDaemonSuite in `docker_cli_daemon_test.go`
Upstream-commit: b8d510e86ad6a70aad09442b89e0e984b14e0c72
Component: engine
2016-09-01 09:42:59 +02:00
c484c505e6 The first letter should be small in errors.New
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
Upstream-commit: e7935da2390bf458f07e9898f08a332ef9f53255
Component: engine
2016-09-01 11:26:40 +08:00