Commit Graph

728 Commits

Author SHA1 Message Date
cdee8f774a Merge pull request #37183 from vdemeester/service-create-init
Add support for `init` on services
Upstream-commit: f11f24958852986cfc996e6076fed75bfcbf1ed1
Component: engine
2018-06-07 19:22:14 -07:00
a1a394884c Merge pull request #37231 from adshmh/use-unique-names-for-integration-tests-service-create
use unique names for resources in create service integration tests
Upstream-commit: 5ff12f6ba13edf16a174250b65b1c7294fbd5a45
Component: engine
2018-06-07 17:47:07 -07:00
92d9a5ddfd Merge pull request #37215 from adshmh/integration-container-links-tests-use-unique-names
container links integration tests use unique names
Upstream-commit: d47c45175b13e97475649dfe8b1ab1034c4865d0
Component: engine
2018-06-07 22:34:12 +02:00
29579f20f8 use unique names for resources in create service integration tests
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: d5ae23fc11b91275801dcab2326e803725a645a6
Component: engine
2018-06-07 12:11:11 -04:00
43d60463c2 Add support for init on services
It's already supported by `swarmkit`, and act the same as
`HostConfig.Init` on container creation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e401b88e59e098745744917c555d549f08353e6d
Component: engine
2018-06-07 14:17:55 +02:00
025606b2a1 Merge pull request #36644 from jessfraz/rawaccess
api: add MaskedPaths and ReadonlyPaths options
Upstream-commit: 1fe0e49d2057d5ee1b12cc6f53e4c41a197e7fec
Component: engine
2018-06-06 18:16:16 -07:00
9022898c18 integration tests under integration/container/links_linux_test.go use unique names
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 077247050df0bf97b7b62e439152eb362e9ec813
Component: engine
2018-06-06 06:14:24 -04:00
67fe100ad5 api: add configurable MaskedPaths and ReadOnlyPaths to the API
This adds MaskedPaths and ReadOnlyPaths options to HostConfig for containers so
that a user can override the default values.

When the value sent through the API is nil the default is used.
Otherwise the default is overridden.

Adds integration tests for MaskedPaths and ReadonlyPaths.

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
Upstream-commit: 3694c1e34e40fa2e255a97b5541645cec9c8d1d5
Component: engine
2018-06-05 12:33:14 -04:00
60c800804e Update containerd to 1.1
Updates swarmkit, grpc, and all related vendors

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 52ed3e0896c203013388a3eb603658f345a9d80a
Component: engine
2018-06-04 15:37:03 -07:00
94cab3b97b Merge pull request #37191 from adshmh/use-unique-names-for-integration-tests-secret
use unique names for resources in integration tests of secret package
Upstream-commit: d7e94d6ea7c1a76c79b6da722491c79118236999
Component: engine
2018-06-05 00:06:50 +02:00
2f23577c7a vendor: use dockerfile parser from buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c9ebd2f13b3aab49c2d90cc38dcf2cd0d059697f
Component: engine
2018-06-02 11:10:34 -07:00
37acacf605 use unique names for resources in integration tests of integration/secret package
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: a70794aff0fc5a02db9c939397d663f174d2f726
Component: engine
2018-06-01 06:46:52 -04:00
98281f1a9c fix the mis-used skip condition
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: d8e6f273b5016880c5d49673ddf531ceecc2bc0d
Component: engine
2018-05-30 17:13:20 -07:00
ab001b0599 Merge pull request #37169 from AntaresS/add-version-checking
add api version checking for tests from new feature
Upstream-commit: 0a94468a5bed080a77a01847515123b9c2eff62e
Component: engine
2018-05-30 09:58:45 -10:00
75e47b0eb6 Merge pull request #36874 from kolyshkin/stop-timeout
daemon.ContainerStop(): fix for a negative timeout
Upstream-commit: b85799b63fb25423620ed16e717a99401cd3a39b
Component: engine
2018-05-30 13:38:42 -04:00
a99e1e1ff6 add api version checking for tests from new feature
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 8ed0fdebe714c64aa697ed7e2187d2233e34eb22
Component: engine
2018-05-29 15:25:33 -07:00
37672d40d5 Add t.Name() to tests so that service names are unique
This fix adds `t.Name()` to tests in integration/network
so that services created in those tests have unique names.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 76195f8047eb9a6be710d53ec493ab97bcf86e20
Component: engine
2018-05-28 22:57:52 +00:00
db35657a47 Adjust API version to match correct release
This fix was not yet included in Docker 17.05, so
API version v1.37 was not the right selector (Docker
18.03, 18.04 and 18.05 all support API v1.37).

We should change these checks for engine versions,
or use a different method to skip tests when running
against older engines.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a061b1e2d8f6117b0524e44de7b6bc391245864e
Component: engine
2018-05-24 02:39:56 +02:00
0f96e98e12 Various code-cleanup
remove unnescessary import aliases, brackets, and so on.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f23c00d8701e4bd0f2372a586dacbf66a26f9a51
Component: engine
2018-05-23 17:50:54 +02:00
6280cae03a skip feature/test added that is breaking ee
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 84598be35f200bd0ea28a615100c51dbaeb51898
Component: engine
2018-05-22 17:42:41 -07:00
717e3937b9 more fixes on integration
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: b9b4f888703a20ddd7670c1b978dcb1621fa210f
Component: engine
2018-05-22 11:25:25 -07:00
b21cab8bb2 Merge pull request #37110 from thaJeztah/remove-testutil-errorcontains
Replace deprecated testutil.ErrorContains()
Upstream-commit: 9bd5d9912f0cb4fe22b994ac1e7e10038e3be65a
Component: engine
2018-05-21 11:04:45 -07:00
b179a3fc0d Some slight tweaks for the integration test
`arm64` needs get more time duration for the test to finish.

`pty.Start()` opens a file, so the caller should close it explicitly,
else the file I/O can result in unexpected data synchronization issue.

All those changes will not affect the test itself.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 476d7872efb60b1ef1bc7d9d83952f9dbc8f8798
Component: engine
2018-05-21 10:08:27 +08:00
659852c34d Merge pull request #37011 from arm64b/ReAdd-LABEL-command-4-target-option
Construct and add 'LABEL' command from 'label' option to last stage 
Upstream-commit: 8974fd47c7677b21c43597709655136addadb864
Component: engine
2018-05-21 00:15:02 +02:00
fac8e1d52b Replace deprecated testutil.ErrorContains()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 55bebbaecf5e40db9d83b28080ce08dc8642f407
Component: engine
2018-05-21 00:13:04 +02:00
7f78f7fe15 Fix some linting issues
These showed locally when running `make validate`. CI doesn't seem to have the
same (possibly it's disabled in the configuration)

    builder/fscache/fscache.go:618::error: github.com/docker/docker/vendor/github.com/tonistiigi/fsutil.StatInfo composite literal uses unkeyed fields (vet)
    client/swarm_unlock_test.go:44::error: github.com/docker/docker/api/types/swarm.UnlockRequest composite literal uses unkeyed fields (vet)
    client/swarm_unlock_test.go:20::error: github.com/docker/docker/api/types/swarm.UnlockRequest composite literal uses unkeyed fields (vet)
    cmd/dockerd/daemon_unix.go:113::error: github.com/docker/docker/cmd/dockerd/hack.MalformedHostHeaderOverride composite literal uses unkeyed fields (vet)
    cmd/dockerd/daemon_unix.go:110::error: github.com/docker/docker/cmd/dockerd/hack.MalformedHostHeaderOverride composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay/overlay.go:171::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay/overlay.go:413::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay2/overlay.go:203::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay2/overlay.go:584::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/zfs/zfs.go:109::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/zfs/zfs.go:388::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/volumes_windows.go:27::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    integration/service/network_test.go:31::error: github.com/docker/docker/api/types/network.NetworkingConfig composite literal uses unkeyed fields (vet)
    api/server/server.go:129:10⚠️ should not use basic type string as key in context.WithValue (golint)
    integration/service/network_test.go:54::error: github.com/docker/docker/api/types/network.NetworkingConfig composite literal uses unkeyed fields (vet)
    libcontainerd/client_daemon_linux.go:61::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    libcontainerd/client_daemon_linux.go:74::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    pkg/archive/archive_windows.go:76::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    plugin/manager_linux.go:56::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4f8c870d623c63b98f8ef8002448f07f4dda4aa9
Component: engine
2018-05-17 19:28:27 +02:00
e46ae6ff6c Add test case for --label with --target
Add a new test case `TestBuildLabelWithTargets` to cover the Docker builder
with both `--label` and `--target` options.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: f7add4262b69294aa8035c4794236193ce4bc68e
Component: engine
2018-05-17 09:41:06 +08:00
a24b673f22 fix and skip some tests based on API version
Signed-off-by: Anda Xu <anda.xu@docker.com>

Co-authored-by: Anda Xu <anda.xu@docker.com>
Co-authored-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e440831802a500b28ecf16c2627a294dc31dfeb9
Component: engine
2018-05-15 16:05:04 -07:00
c4764c184a Fix logging test type
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 25494e4c74f31551ef06e6e2df4e1119cd83250e
Component: engine
2018-05-15 15:04:46 +02:00
131639fdf7 Merge pull request #37028 from cpuguy83/log_plugin_broken_pipe
Fix logging plugin crash unrecoverable
Upstream-commit: 6821ffd1a11f188d6b1c3e8da01885768e027586
Component: engine
2018-05-15 13:57:01 +02:00
e35dd65158 Merge pull request #37044 from yongtang/03112018-TestDockerNetworkConnectAlias-name
Avoid unique name usage in TestDockerNetworkConnectAlias
Upstream-commit: 829dcefa9d090f5101947ee14074d1f37e44468b
Component: engine
2018-05-15 11:46:11 +02:00
4347082deb Merge pull request #37060 from cpuguy83/fix_swagger_gen
Fix swagger volume type generation
Upstream-commit: bcd86fc2acd3ef22a7fc6c662c7ae8a67b0bb4f4
Component: engine
2018-05-15 11:46:02 +02:00
d1d5dd5da5 Merge pull request #37030 from adshmh/refactor-service-create-integration-tests-use-swarm-create-service
Refactor service create integration tests to use swarm CreateService
Upstream-commit: 6de3be1366cda7b24f02dfae7f9abd036b9c7094
Component: engine
2018-05-14 14:07:22 -07:00
9488201604 Fix logging plugin crash unrecoverable
In cases where a logging plugin has crashed when the daemon tries to
copy the container stdio to the logging plugin it returns a broken pipe
error and any log entries that occurr while the plugin is down are lost.

Fix this by opening read+write in the daemon so logs are not lost while
the plugin is down.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e7479e3ab8128f9e84cc640f0bed4e77b268a6e9
Component: engine
2018-05-14 16:51:56 -04:00
1cb0dc30a7 Fix swagger volume type generation
This was broken by bf6a790f00ab96bb8857e3c73502909ee5e36217

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b16b125bb4326e2eec9948fd54ca8c5d83eba36a
Component: engine
2018-05-14 13:46:20 -04:00
74db940ed7 Avoid unique name usage in TestDockerNetworkConnectAlias
In TestDockerNetworkConnectAlias the network and container
names used are unique which are not preferred. This
fix address the issue by appending t.Name() so that
names are randomized.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e7b5f4500dc77ec55e5ef202065fbc92218ce394
Component: engine
2018-05-14 16:59:13 +00:00
4ca879c241 Fixing network inspect for swarm
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Upstream-commit: a059d6f4f5eb5fdb319b6f715a9bb50eb5d6173d
Component: engine
2018-05-13 07:31:14 -07:00
39cf7e12b3 refactor integration tests under integration/service/create_test.go to use swarm.CreateService
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: e9a687146a1e2721e19d858927283c35f8c2da97
Component: engine
2018-05-10 05:45:49 -04:00
ce7c08e19e Merge pull request #36803 from adshmh/refactor-network-integration-tests-use-swarm-create-service
refactored network integration tests to make use of swarm.CreateService
Upstream-commit: 6d2081481938c6c267f62c6e8b43e5940521cb22
Component: engine
2018-05-08 00:21:32 +02:00
c51303ad17 daemon.ContainerStop(): fix for a negative timeout
1. As daemon.ContainerStop() documentation says,

> If a negative number of seconds is given, ContainerStop
> will wait for a graceful termination.

but since commit cfdf84d5d04c8ee (PR #32237) this is no longer the case.

This happens because `context.WithTimeout(ctx, timeout)` is implemented
as `WithDeadline(ctx, time.Now().Add(timeout))`, resulting in a deadline
which is in the past.

To fix, don't use WithDeadline() if the timeout is negative.

2. Add a test case to validate the correct behavior and
as a means to prevent a similar regression in the future.

3. Fix/improve daemon.ContainerStop() and client.ContainerStop()
description for clarity and completeness.

4. Fix/improve DefaultStopTimeout description.

Fixes: cfdf84d5d04c ("Update Container Wait")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 69b4fe406540c7989bd99b2244ed67ced96e17c7
Component: engine
2018-05-03 10:04:33 -07:00
87f255b417 Merge pull request #36396 from selansen/master
Allow user to specify default address pools for docker networks
Upstream-commit: 82d9185470c99d5768b60926648b3739ec15bbc4
Component: engine
2018-05-03 06:34:14 -04:00
b9f36ffdf0 Allow user to control the default address pools
- Via daemon flag --default-address-pools base=<CIDR>,size=<int>

Signed-off-by: Elango Siva  <elango@docker.com>
Upstream-commit: 173b3c364ebedd56bd5b6c190a9b41f592ba57d6
Component: engine
2018-04-30 11:14:08 -04:00
904bb15bee Merge pull request #36944 from vdemeester/fix-e2e-run
Skip some test on remote daemon for e2e run(s)
Upstream-commit: 765a9f31adb5f9eef197aa7863717a4d8a743122
Component: engine
2018-04-27 05:03:12 -10:00
7dc2c5606a Skip some test on remote daemon for e2e run(s)
We really need to run those on the CI too at some point.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: ef2c2040c22eba8ab6ea1033ad64ba9b0095db9b
Component: engine
2018-04-26 16:25:52 +00:00
256deb9131 Merge pull request #36924 from runcom/fix-created-rp
restartmanager: do not apply restart policy on created containers
Upstream-commit: 18bfe3c12838ccec3d6a749f6d71355c1daed164
Component: engine
2018-04-25 21:48:01 +02:00
e77630ac6d restartmanager: do not apply restart policy on created containers
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 75d3214934b397692a2765ef6fd8ce086044831b
Component: engine
2018-04-24 11:41:09 +02:00
e3af8e0774 Switch from x/net/context -> context
Since Go 1.7, context is a standard package. Since Go 1.9, everything
that is provided by "x/net/context" is a couple of type aliases to
types in "context".

Many vendored packages still use x/net/context, so vendor entry remains
for now.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 7d62e40f7e4f3c17d229a7687d6fcca5448de813
Component: engine
2018-04-23 13:52:44 -07:00
e52c8b0018 Some improvement in restart_test.go
This fix consists of some improvement in restart_test.go
by replacing Fatal with assert, so that they are consistent
with other tests in integration/container.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 67535921b32f68863f7a882d2300b59e0bbeffa4
Component: engine
2018-04-21 19:42:20 +00:00
59772b34d9 refactored network integration tests to make use of swarm.CreateService
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 8e335e00bb839be07ec3e1aca85deacf57a7c46a
Component: engine
2018-04-21 09:07:57 -04:00
695bc0d42c Make testing helpers as such…
That way, those lines won't be reported in the failure.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: cb8db44395df70fa3044d2a9683d6d24438cfa74
Component: engine
2018-04-20 10:38:43 +02:00