Commit Graph

32512 Commits

Author SHA1 Message Date
46e07309bd Migrates several swarm secrets from integration-cli to api tests
This fix migrates several swarm secrets from integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f955d2e2042cabaeac8a451b83a507b76e606d33
Component: engine
2018-02-11 21:17:44 +00:00
4571efe6b5 Remove docker_api_swarm_secret_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3499557c9b3aa728cb52402c1bb4302f80ab4721
Component: engine
2018-02-11 21:17:25 +00:00
e3241636cf Merge pull request #36257 from arm64b/fix-inspect-network-timeout
Fix timeout issue of `InspectNetwork` on AArch64
Upstream-commit: 178ebca0b9fdf41d473cd6dd52ff6607bed28fd7
Component: engine
2018-02-11 20:50:08 +09:00
fd34f2aedf Merge pull request #36276 from nogoegst/update-vendor-x-sys
Update golang.org/x/sys vendor
Upstream-commit: 52a65f6e34261158007d6b85fb90ebe65cfa73af
Component: engine
2018-02-11 17:08:15 +09:00
defd7909c5 Add an integration/internal/container helper package
To help creating/running/… containers using the client for test integration.
This should make test more readable and reduce duplication a bit.

Usage example

```
// Create a default container named foo
id1 := container.Create(t, ctx, client, container.WithName("foo"))
// Run a default container with a custom command
id2 := container.Run(t, ctx, client, container.WithCmd("echo", "hello world"))
```

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0bb7d42b03bfb125cd50ab50dabe99726e66ab71
Component: engine
2018-02-10 17:29:38 +01:00
3927eb596e Update golang.org/x/sys vendor to 37707fdb30a5b38865cfb95e5aab41707daec7fd
Signed-off-by: Ivan Markin <sw@nogoegst.net>
Upstream-commit: 6f66ccaf507e58f3031a88ec85a84a77c0c3b928
Component: engine
2018-02-10 15:58:20 +00:00
1c3e1e8db6 Rename integration/util to integration/internal
Both names have no real sense, but one allows to make sure these packages
aren't used outside of `integration`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: af306d149e76b100e08972cda364647bd7bcfe1e
Component: engine
2018-02-10 09:16:32 +01:00
81a9d51f50 Merge pull request #36242 from kolyshkin/rwlayer-nil-deref
c.RWLayer: check for nil before use
Upstream-commit: ab3ea81376441e93311c94910be78ac42292c496
Component: engine
2018-02-09 18:13:03 -08:00
e42b22c770 Merge pull request #36259 from yongtang/02082018-kill_test
Migrate TestKillDifferentUserContainer to api test
Upstream-commit: 2d97f5e7800b43a7ea9106c3c95200c6f4404930
Component: engine
2018-02-09 13:47:35 -08:00
2f849b7e23 Merge pull request #36260 from yongtang/02082018-inspect_test
Migrate docker_api_inspect_unix_test.go to integration api test
Upstream-commit: 5589e9cad1107eb9cf030b73d9375e9a7c84cc47
Component: engine
2018-02-09 13:33:51 -08:00
663c468cfb Merge pull request #36221 from yongtang/02032018-secret_ls
Migrate secret list tests from integration-cli to api tests
Upstream-commit: 9d55eefc1b4553260785c1c09772ccd9660b075f
Component: engine
2018-02-09 13:29:19 -08:00
89a07f6033 c.RWLayer: check for nil before use
Since commit e9b9e4ace294230c6b8eb has landed, there is a chance that
container.RWLayer is nil (due to some half-removed container). Let's
check the pointer before use to avoid any potential nil pointer
dereferences, resulting in a daemon crash.

Note that even without the abovementioned commit, it's better to perform
an extra check (even it's totally redundant) rather than to have a
possibility of a daemon crash. In other words, better be safe than
sorry.

[v2: add a test case for daemon.getInspectData]
[v3: add a check for container.Dead and a special error for the case]

Fixes: e9b9e4ace294230c6b8eb
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 195893d38160c0893e326b8674e05ef6714aeaa4
Component: engine
2018-02-09 11:24:09 -08:00
20c1120c88 Migrate TestKillDifferentUserContainer to api test
This fix migrates TestKillDifferentUserContainer to api test

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0855922cd3cd1e9d846fd85ef968653ff8649a44
Component: engine
2018-02-09 13:40:32 +00:00
a75949cd5f Migrate docker_api_inspect_unix_test.go to integration api test
This fix migrates docker_api_inspect_unix_test.go to integration api test

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8197529ca2fabc95b9fc4a7e3ff643740b1f4388
Component: engine
2018-02-09 12:56:07 +00:00
fd856e7e70 Merge pull request #36226 from yongtang/36198-follow-up
Add description to TestContainerNetworkMountsNoChown
Upstream-commit: 7e7f8160fcccce94a45596b4fd41f7ddcf9d910f
Component: engine
2018-02-09 04:39:56 -08:00
b582c47758 Fix timeout issue of InspectNetwork on AArch64
Service of inspect network can't be finished within 10s on AArch64 platform,
so we need to adjust the timeout value avoid to paper cover the real issue, plus
to make the integreation test can continue while not terminate with below error:

> === RUN   TestInspectNetwork
> --- FAIL: TestInspectNetwork (27.65s)
>         daemon.go:285: [de79880f4ed4a] waiting for daemon to start
>         daemon.go:317: [de79880f4ed4a] daemon started
>         inspect_test.go:57: timeout hit after 10s: waiting for tasks to enter run state
>         daemon.go:275: [de79880f4ed4a] exiting daemon
> FAIL
> ---> Making bundle: .integration-daemon-stop (in bundles/test-integration)
> Removing test suite binaries
> Makefile:171: recipe for target 'test-integration' failed

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 8f5c1841a8bffb4a7e33f51174177b7ad0182969
Component: engine
2018-02-09 03:20:14 +00:00
5072bc0df8 Migrate secret list tests from integration-cli to api tests
This fix migrates secret list tests from integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9349c035831e09057bd039b8f677fa19d3354f73
Component: engine
2018-02-09 00:45:22 +00:00
62e1fa1243 Remove docker_cli_secret_ls_test.go from integration-cli
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 42465784dcc61aa69b8fcefe4669d20422471fea
Component: engine
2018-02-09 00:45:08 +00:00
f5f60f4ad4 Migrate rename tests in integration-cli to api tests
This fix migrates rename tests in integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: be24a6b11e36b542d37cf168f6d198d5445803a5
Component: engine
2018-02-08 23:27:14 +00:00
158c963b62 Merge pull request #36241 from yongtang/02072018-create-tests
Migrate TestCreateTmpfsMountsTarget test to api test
Upstream-commit: 15001f83bdb268ce3d4c0191eab39f443cc6ea5c
Component: engine
2018-02-08 14:58:06 -08:00
8aa2823503 Merge pull request #36140 from vdemeester/integration-container-kill
Migrate some kill integration cli test to api tests
Upstream-commit: 21c9e5701bef4687847adb9c26ac42583a57c174
Component: engine
2018-02-08 09:55:28 -08:00
085b7dfcd2 Merge pull request #36235 from yongtang/02072018-info-api-test
Migrates docker info tests to integration api tests
Upstream-commit: 12ff002eedb602f6c8c36d41876dae15e1587849
Component: engine
2018-02-08 09:55:08 -08:00
61559bd9ba Migrate TestCreateTmpfsMountsTarget test to api test
This fix migrates TestCreateTmpfsMountsTarget test to api test,
and removed integration-cli/docker_cli_create_unix_test.go

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f601bc16d555238c86dad1cc0a67bcfcf36a3301
Component: engine
2018-02-08 15:59:12 +00:00
82570b7d22 Migrate some calls to new client function
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6977f468bbcf43864a5acf6c89c331a9180169e5
Component: engine
2018-02-08 16:21:45 +01:00
8991a8a5bd Merge pull request #36220 from dnephin/support-proxy-in-splunk-driver
Support a proxy in splunk log driver
Upstream-commit: f653485e57a36518085868dcb48b4d924a520877
Component: engine
2018-02-08 15:32:19 +01:00
9887b96613 Move some kill integration cli to api tests
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2227c8ad5ee2bd2f636651efd4ef70e56c082f85
Component: engine
2018-02-08 15:26:24 +01:00
0590bb4b31 Introduce NewClientWithOpts func to build custom client easily
This allows to create a client with default values and override those
using functors. As an example, `NewEnvClient()` becomes
`NewClientWithOpts(FromEnv)` ; and if you want a different api version
for this client : `NewClientWithOpts(FromEnv, WithVersion("1.35"))`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 772edd020cc784913973387b00c4d0c526a10a26
Component: engine
2018-02-08 15:26:24 +01:00
83ccee96c3 Merge pull request #36173 from cpuguy83/fix_containerd_crash_spin
Refresh containerd remotes on containerd restarted
Upstream-commit: 384ff69f2f97c0cf0ee2b863bd4d90a82e1cc1a4
Component: engine
2018-02-08 06:19:29 -08:00
d7f3bf126b Merge pull request #36243 from thaJeztah/bump-golang-1.9.4
Bump Golang to 1.9.4
Upstream-commit: 6f33b5a2ab29f3e5db40ed5d958a54e731adca59
Component: engine
2018-02-08 06:17:35 -08:00
e09b72af21 Merge pull request #36224 from dnephin/refactor-commit
Refactor Daemon.Commit()
Upstream-commit: 9769ef333f2af24b30fed0dd7b00384b2df3b953
Component: engine
2018-02-08 21:02:30 +09:00
909b58836c Remove workaround for Nano server TP5
This workaround for golang/go#15286 was added for Nano server TP5 in
fa82c0aa10cfac8c6d5e2446876dc79b2b0c1bf9, and should no longer be
needed

Due to a security fix in Go 1.9.4/1.8.7, loading the .dll is no longer
allowed, and produces an error:

   .\docker_windows.go:9:3: //go:cgo_import_dynamic main.dummy CommandLineToArgvW%2 "shell32.dll" only allowed in cgo-generated code

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 250193387c98a4ad69a6591d5fe5a39c1409ffba
Component: engine
2018-02-07 23:38:14 -08:00
a076c21e0c Remove integration-cli/docker_cli_create_unix_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8331a1a5cf1f7f751fdb011cb9e1aa4b0642c1e5
Component: engine
2018-02-08 00:21:29 +00:00
72d7f12462 Bump Golang to 1.9.4
This fixes a vulnerability in `go get` (CVE-2018-6574, http://golang.org/issue/23672),
but shouldn't really affect our code, but it's good to keep in sync.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: caeab268430a033fedd27c53be16758ac1a0f71e
Component: engine
2018-02-07 14:49:51 -08:00
fd90b16ff5 Merge pull request #36194 from dnephin/add-canonical-import
Add canonical import path
Upstream-commit: 3a633a712c8bbb863fe7e57ec132dd87a9c4eff7
Component: engine
2018-02-07 13:06:45 -08:00
4ec1fd107e Refactor commit
The goal of this refactor is to make it easier to integrate buildkit
and containerd snapshotters.

Commit is used from two places (api and build), each calls it
with distinct arguments. Refactored to pull out the common commit
logic and provide different interfaces for each consumer.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: daff039049aea6e19a4bda1df2834d14b4198bc0
Component: engine
2018-02-07 15:09:06 -05:00
f68b87fd47 Support a proxy in splunk log driver
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3c4537d5b33d951237ea5e4cc123953eda7a37e7
Component: engine
2018-02-07 14:52:32 -05:00
3257e049e6 update vendor
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7d296522f68a80d540b20753ea0648171ee12825
Component: engine
2018-02-07 14:46:24 -05:00
b2efbde0e3 Migrates docker info tests to integration api tests
This fix migrates docker info tests in integration-cli
to integration tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 68d9beedbe0994af5c91022874daa271b657be8c
Component: engine
2018-02-07 18:26:01 +00:00
1e3931f923 Refresh containerd remotes on containerd restarted
Before this patch, when containerd is restarted (due to a crash, or
kill, whatever), the daemon would keep trying to process the event
stream against the old socket handles. This would lead to a CPU spin due
to the error handling when the client can't connect to containerd.

This change makes sure the containerd remote client is updated for all
registered libcontainerd clients.

This is not neccessarily the ideal fix which would likely require a
major refactor, but at least gets things to a working state with a
minimal patch.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 400126f8698233099259da967378c0a76bc3ea31
Component: engine
2018-02-07 11:53:00 -05:00
0919d8f13e Merge pull request #36201 from arm64b/oom-kill-disable-fixing
Daemon: passdown the `--oom-kill-disable` option to containerd
Upstream-commit: 2e8ccbb49e21b8696ad4c39185036a8b7e50402f
Component: engine
2018-02-06 21:39:43 -08:00
9e9ebf27ff Merge pull request #36223 from yongtang/02062018-clean
Combine runSimpleContainer with runContainer for rename test
Upstream-commit: 4ba4b4b283162c4917d773bf49f8d2c7f5de6b3c
Component: engine
2018-02-06 17:26:49 -08:00
d2876760b0 Add description to TestContainerNetworkMountsNoChown
This fix is a follow up to 36198 by adding description
to TestContainerNetworkMountsNoChown so that it is clear
about the purpose of the test for ownership.

This fix is related to comment in 36198.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 28a2187ea7f0484ce515e7ae1662d778dcf94720
Component: engine
2018-02-07 00:19:38 +00:00
f496025a99 Merge pull request #36198 from yongtang/02042018-mount-tests
Migrates TestContainersAPINetworkMountsNoChown to api tests
Upstream-commit: 382c9593bfc73a0bf967557c98a560413c537b42
Component: engine
2018-02-06 14:08:35 -08:00
d3b2389f2d Merge pull request #35414 from madhanrm/hotadd1
Enable HotAdd for Windows
Upstream-commit: e62d36bcad6ef1b1beafb15411f927b25f52c3d1
Component: engine
2018-02-06 10:40:39 -08:00
20243d6421 Combine runSimpleContainer with runContainer for rename test
As there is already a  runSimpleContainer, I think it makes
sense to combine runSimpleContainer with runContainer for rename test
to reduce code duplication.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 203d871658104b00099d818425b25f4cd1eff55b
Component: engine
2018-02-06 17:11:39 +00:00
607349c14f Migrates TestContainersAPINetworkMountsNoChown to api tests
This fix migrates TestContainersAPINetworkMountsNoChown from
integration-cli to api tests in integration.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c028da3557cc0e9f80aee9b08118e9947e1fa57a
Component: engine
2018-02-06 15:56:20 +00:00
4056ff9d7d Merge pull request #36188 from yongtang/02012018-TestSecretInspect
Migrate TestSecretInspect from integration-cli to api tests
Upstream-commit: 30a8c6c1094aca87f62f321ea1420865565f1d04
Component: engine
2018-02-06 15:19:08 +01:00
be83c11fb0 Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4f0d95fa6ee7f865597c03b9e63702cdcb0f7067
Component: engine
2018-02-05 16:51:57 -05:00
83bc700def Merge pull request #36192 from yongtang/02012018-docker_cli_nat_test
Migrate some of the nat tests in integration-cli to api tests
Upstream-commit: 090c5bf25a53c8656cddfed275874030a6109ec0
Component: engine
2018-02-05 10:54:43 -08:00
44aff4f98f Merge pull request #36191 from cpuguy83/fix_attachable_network_race
Fix race in attachable network attachment
Upstream-commit: 6987557e0cef9bd139128e62d86586a40cda6036
Component: engine
2018-02-05 09:41:35 -08:00