Commit graph

3839 commits

Author SHA1 Message Date
Sebastiaan van Stijn
94bc2b1bc0 Merge pull request #26387 from Microsoft/jjh/securityopts
Only output security options if there are any
2016-09-16 23:05:30 +02:00
John Howard
dd3d223a7e Only output security options if there are any
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-16 10:05:21 -07:00
John Howard
39f5d97cde Merge pull request #26553 from darrenstahlmsft/FixWildcard
Windows: Fix wildcard expansion after slash in filename
2016-09-14 16:56:35 -07:00
Tõnis Tiigi
1573ea5974 Merge pull request #26552 from darrenstahlmsft/EnableBuildTests
Windows: Enable more build tests
2016-09-14 14:07:19 -07:00
Brian Goff
f8d6dedb6a Merge pull request #26574 from cpuguy83/fix_improper_use_in_test
Fix improper use of `--rm` in test case
2016-09-14 15:28:40 -04:00
Darren Stahl
309056648c Windows: Fix wildcard expansion after slash in filename
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-09-14 11:40:57 -07:00
Brian Goff
f05ed00758 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>
2016-09-14 13:14:30 -04:00
Alexander Morozov
397df22963 Merge pull request #26504 from tonistiigi/frozen-fix
Fix already loaded detection for frozen images
2016-09-14 08:22:48 -07:00
Sebastiaan van Stijn
8ac2000f50 Merge pull request #25540 from estesp/ro-plus-userns
Remove --read-only restriction when user ns enabled
2016-09-14 13:53:58 +02:00
Madhu Venugopal
1d76ab4f80 Merge pull request #26449 from mrjana/net
Fix autostart for swarm scope connected containers
2016-09-13 18:22:16 -07:00
Darren Stahl
e79b0b42f0 Windows: Enable more build tests
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-09-13 17:43:27 -07:00
Jana Radhakrishnan
c9fb551d60 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>
2016-09-13 14:21:58 -07:00
Daniel Nephin
a07be9be38 Use opts.FilterOpt for filter flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-13 16:20:10 -04:00
Brian Goff
b4c1645db5 Merge pull request #22373 from cpuguy83/add_mounts_api_on_create
Add new `HostConfig` field, `Mounts`.
2016-09-13 14:39:50 -04:00
Tõnis Tiigi
711455d34e Merge pull request #26503 from clnperez/swarm-test-move-err-check
swarm: always check err before http status in tests
2016-09-13 10:53:55 -07:00
Alexander Morozov
85c3b8c1b1 Merge pull request #26433 from Microsoft/jjh/fix24819
Windows: Fix regression pulling linux images
2016-09-13 08:35:38 -07:00
Brian Goff
fc7b904dce 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>
2016-09-13 09:55:35 -04:00
Alexander Morozov
036a8f77b0 Merge pull request #26461 from crosbymichael/term-exec
Add TERM env var to exec
2016-09-12 14:57:37 -07:00
Tonis Tiigi
ed747e5a9e Fix already loaded detection for frozen images
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-09-12 12:55:26 -07:00
Christy Perez
3dea5dbb9a 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>
2016-09-12 12:45:08 -05:00
Michael Crosby
4633f15f13 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>
2016-09-12 09:20:27 -07:00
Akihiro Suda
e03cc68e3a 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>
2016-09-12 07:36:52 +00:00
John Howard
8437d0a329 Windows: Fix regression pulling linux images
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-09 11:40:34 -07:00
Phil Estes
cf58eb437c Merge pull request #22049 from boucher/docker-checkpoint-restore
Implement containerd API for checkpoints
2016-09-09 13:36:55 -04:00
Phil Estes
6062ae5742
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)
2016-09-09 13:23:41 -04:00
Michael Crosby
c1f2776bf1 Merge pull request #26428 from darrenstahlmsft/AddToSymlink
Don't attempt to evaluate drive root on Windows
2016-09-09 09:09:24 -07:00
boucher
d8fef66b03 Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
2016-09-08 21:31:52 -04:00
Stephen J Day
8e5ef8af5c
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>
2016-09-08 17:47:43 -07:00
Darren Stahl
fdce2a7775 Don't attempt to evaluate drive root on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-09-08 13:52:54 -07:00
Michael Crosby
4e2d442901 Merge pull request #26119 from cpuguy83/lazily_load_fixtures
Move some test fixtures to go
2016-09-08 11:16:27 -07:00
Brian Goff
ba07661f0d Merge pull request #26405 from yongtang/26326-inspect-ulimit-with-daemon-default
Fix Ulimits in `docker inspect` when daemon default exists
2016-09-08 13:21:26 -04:00
Madhu Venugopal
719a640743 Merge pull request #25962 from mrjana/net
Add support for docker run in swarm mode overlay
2016-09-08 09:39:00 -07:00
Yong Tang
7d705a7355 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>
2016-09-07 23:15:22 -07:00
Jana Radhakrishnan
99a98ccc14 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>
2016-09-07 21:20:41 -07:00
John Howard
52f0474851 Windows: docker top implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-07 16:29:02 -07:00
Brian Goff
ff91276d1f 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>
2016-09-07 17:30:35 -04:00
Michael Crosby
91e197d614 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>
2016-09-07 11:05:58 -07:00
Tõnis Tiigi
a6daa94e3e Merge pull request #26342 from cpuguy83/20079_restore_volume_migrate
restore migrating pre-1.7.0 volumes
2016-09-07 10:56:07 -07:00
Aaron Lehmann
86124ca04b Merge pull request #23100 from runcom/fix-stores
support legacy registries in exernal stores
2016-09-07 09:44:41 -07:00
Brian Goff
6168e98a13 Merge pull request #26115 from yongtang/08292016-info-registry-mirrors
Add registry mirrors information in the output of `docker info`
2016-09-07 11:37:36 -04:00
Vincent Demeester
a51fcc26fa Merge pull request #26352 from Microsoft/jjh/volumenocopydata
Windows: Correct TestVolumesNoCopyData
2016-09-07 11:23:10 +02:00
Antonio Murdaca
67d752ac55
support legacy registries in exernal stores
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-07 09:45:42 +02:00
John Howard
8a1fdce7fe Windows: Correct TestVolumesNoCopyData
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-06 15:38:19 -07:00
Christopher Jones
42f3865d24
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>
2016-09-06 18:17:24 -04:00
Brian Goff
dc712b9249 restore migrating pre-1.7.0 volumes
This was removed in a clean-up
(060f4ae617) 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>
2016-09-06 17:17:47 -04:00
Antonis Kalipetis
c6bff578b4
Add test for checking created directories on remapped root
Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
2016-09-05 13:02:13 +03:00
Yong Tang
83d79f13aa 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>
2016-09-04 07:28:45 -07:00
Vincent Demeester
c73fae2352 Merge pull request #26290 from tonistiigi/govet17
Fix govet for go1.7
2016-09-03 19:27:19 +02:00
Tonis Tiigi
7a8c7b47cf Fix govet for go1.7
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-09-02 19:07:54 -07:00
Daniel Nephin
2e0bc0393a Merge pull request #26225 from yongtang/26173-docker-import-quoted-change
Fix issue in `docker import -c` with quoted flags
2016-09-02 13:34:25 -04:00