Commit Graph

3645 Commits

Author SHA1 Message Date
917c737de1 Merge pull request #25341 from tonistiigi/fix-pending-tests
Fix swarm pending state tests
Upstream-commit: 4a94a6513be00d86bec691cfefa21a1c63aab8d9
Component: engine
2016-08-03 16:12:43 +02:00
15ac980cd0 Merge pull request #25159 from diogomonica/adding-force-to-node-remove
Adding force to node rm
Upstream-commit: 10ae908bfa88bf128ce416067391ed125ad0f1be
Component: engine
2016-08-02 22:49:15 +02:00
03c04671d2 Fix swarm pending state tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fa3b5964b93260acb0083500377756300ddbd43d
Component: engine
2016-08-02 11:39:05 -07:00
4d3e916059 Merge pull request #25300 from duglin/FixEnv
Don't allow empty env names
Upstream-commit: c73b054ae384a519330de765026d7aed41a3e027
Component: engine
2016-08-02 09:45:28 -07:00
5ef37313b9 Fix TestUpdateKernelMemoryUninitialized on new kernel version
Fixes: #25073

Update kernel memory on running containers without initialized
is forbidden only on kernel version older than 4.6.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: da5d66fb70064b093f73cc31eddb7e8285048161
Component: engine
2016-08-02 13:17:20 +08:00
0e5400a423 Add --force to node removal
Signed-off-by: Diogo Monica <diogo.monica@gmail.com>
Upstream-commit: a327c231b5c68c13b7dcde2fdc83b8e4cec59c43
Component: engine
2016-08-01 18:55:58 -07:00
48cfcaddd4 Merge pull request #24878 from dongluochen/swarmConstraintTest
Add integration test for constraints
Upstream-commit: f35c4343f32aff4fb4f261e1dedb4200410d53b4
Component: engine
2016-08-01 17:45:23 -06:00
a35a169675 Merge pull request #25171 from cpuguy83/23545_test_sockets_in_separate_dir
Use temp dir for integration daemon sockets
Upstream-commit: f23c3a1263b4549030488938741ec6656f2f0133
Component: engine
2016-08-02 01:21:22 +02:00
4d20df22ad Merge pull request #24947 from dnephin/integration-remove-cmdwithargs
Remove CmdWithArgs from integration-cli
Upstream-commit: 415c0f12d2e2edf35daa626e8fe577e7248e4572
Component: engine
2016-08-01 14:56:08 -07:00
08f50a9752 Merge pull request #25187 from anusha-ragunathan/plugin-delete
Remove plugin root from filesystem.
Upstream-commit: 3c46c3481fb6378562183c9f281e29f84b2b527e
Component: engine
2016-08-01 14:33:30 -07:00
99b9e36eb0 Remove plugin root from filesystem.
`docker plugin remove` didnt actually remove plugin from disk. Fix that.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 5690730a7471726bbaf813e634a7117a562dfb8c
Component: engine
2016-08-01 10:46:50 -07:00
bb00cee2aa Don't allow empty env names
Closes: #25281

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: e72c0137af63c2f5aecce48443e3b654a3895150
Component: engine
2016-08-01 10:25:51 -07:00
8c0fcc0e8f Merge pull request #25258 from yongtang/24547-remove-require-network-from-swarm-tests
Remove testRequires(c, Network) from swarm integration tests
Upstream-commit: 2b90eaa596ee9429222973d3208da1c1f172c4e0
Component: engine
2016-08-01 13:33:36 +02:00
ebd25734a8 Merge pull request #25224 from michael-holzheu/PR-TestRunSeccompUnconfinedCloneUserns-check
TestRunSeccompUnconfinedCloneUserns: Check for unprivileged_userns_clone
Upstream-commit: b38c25ad4108dadc6d92930b20a989aaea891767
Component: engine
2016-07-31 17:03:36 +01:00
8eb814c15b Remove testRequires(c, Network) from swarm integration tests
Since 24237 has been merged, it is not necessary to require network
for swarm integration tests (`integration-cli/docker_api_swarm_test.go`)
any more.

This fix removes testRequires(c, Network) from swarm integration
tests.

This fix could be verified by disable networking, and all related
tests pass.

This fix is related to 24547, 24490, 24237.

This fix fixes 24547.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 85c9ef8a47fcf552ae9f436e7c00340dacf03030
Component: engine
2016-07-30 09:59:30 -07:00
3e830fffcd integration: drain node before stop in TestApiSwarmForceNewCluster
It's too long to wait for reschedule.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 307b7b0d151e949024e7ab7ad276b174802a75f2
Component: engine
2016-07-29 10:44:30 -07:00
481a5ed3bf Merge pull request #24020 from yongtang/23973-rename-with-linked-container
Fix docker rename with linked containers
Upstream-commit: 10fcd30a905b527d99c1a2f82f2e67b100594d95
Component: engine
2016-07-29 12:24:35 -04:00
ca5f5427a8 TestRunSeccompUnconfinedCloneUserns: Check for unprivileged_userns_clone
On Ubuntu and Debian there is a sysctl which allows to block
clone(CLONE_NEWUSER) via "sysctl kernel.unprivileged_userns_clone=0"
for unprivileged users that do not have CAP_SYS_ADMIN.

See: https://lists.ubuntu.com/archives/kernel-team/2016-January/067926.html

The DockerSuite.TestRunSeccompUnconfinedCloneUserns testcase fails if
"kernel.unprivileged_userns_clone" is set to 0:

 docker_cli_run_unix_test.go:1040:
    c.Fatalf("expected clone userns with --security-opt seccomp=unconfined
              to succeed, got %s: %v", out, err)
 ... Error: expected clone userns with --security-opt seccomp=unconfined
              to succeed, got clone failed: Operation not permitted
 : exit status 1

So add a check and skip the testcase if kernel.unprivileged_userns_clone is 0.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Upstream-commit: 87e4e3af68741afcebf11499d1dcbc91b655b349
Component: engine
2016-07-29 12:16:03 -04:00
bb300af70f Merge pull request #23759 from AkihiroSuda/cobraexec
Migrate exec command to cobra
Upstream-commit: 3d42bf5f120b6cbd38b54f71dff4343c316939a0
Component: engine
2016-07-29 07:41:02 +02:00
d22f93678b Migrate exec command to cobra
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 9d9dff3d0d9e92adf7c2e59f94c63766659d1d47
Component: engine
2016-07-29 02:10:36 +00:00
3564d84153 Remove unnecessary CmdWithArgs
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c0d2f7b33869cf749efcbab003bdb9bd2f665cec
Component: engine
2016-07-28 20:14:14 -04:00
6486d4730a Remove hack from test name.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0ec20a3c015c998d43925554498a73b52307dc90
Component: engine
2016-07-28 20:12:36 -04:00
c68f19845d Add live-restore state to daemon reload event
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: ff62681d59231489e1ef01767a4db66efd54cf2f
Component: engine
2016-07-28 17:10:40 -07:00
e1f42120bb Add live-restore state to docker info output
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 189aaf8aea953c591f36ac340ad96def1131e869
Component: engine
2016-07-28 17:10:40 -07:00
4cd88300bd Merge pull request #24502 from allencloud/change-comparison-log-in-container-config
update comparison log in container config
Upstream-commit: ca43efb40eb011e0f8adaca2eda77a5330f02089
Component: engine
2016-07-28 16:51:11 -07:00
8e586b192e Merge pull request #25077 from cpuguy83/fix_TestApiSwarmRestartCluster
Fix race in `TestApiSwarmRestartCluster`
Upstream-commit: 262063531a4845c436b64deff9a7fca9f90c0c13
Component: engine
2016-07-28 10:15:31 -07:00
b20b8c2790 Use temp dir for integration daemon sockets
Instead of using the bundles dir, which may be mounted in and ultimately
break if using b2d/d4mac/d4win. This makes it much easier to collect
test daemon logs and more natural for use d4mac/d4win users to run tests.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 4804eb700c3b9f0e337abc6e3c51b031c0328482
Component: engine
2016-07-28 12:53:56 -04:00
a2827e4f47 Merge pull request #25137 from justincormack/32bit-seccomp-test
Add a test that the default seccomp profile allows execution of 32 bit binaries
Upstream-commit: 8a8a63aa32a60e12b3c4d8e9e3397a8bd3b96d54
Component: engine
2016-07-28 17:01:04 +02:00
ae11b0dc77 Merge pull request #24816 from stevvooe/service-ps-over-tasks
cli: `docker service|node|stack ps` instead of tasks
Upstream-commit: 1a7d339d3698d13a4cf9592e8e73df27bf43664f
Component: engine
2016-07-27 23:13:28 +02:00
3cd473134d Merge pull request #24760 from anusha-ragunathan/plugin-events
Make daemon events listen for plugin lifecycle events.
Upstream-commit: 297745b1cdfb79a12986465f8150e22b0018c640
Component: engine
2016-07-27 13:36:49 -07:00
6a1ceaa1e1 cli: docker service|node|stack ps instead of tasks
Rather than conflict with the unexposed task model, change the names of
the object-oriented task display to `docker <object> ps`. The command
works identically to `docker service tasks`. This change is superficial.

This provides a more sensical docker experience while not trampling on
the task model that may be introduced as a top-level command at a later
date.

The following is an example of the display using `docker service ps`
with a service named `condescending_cori`:

```
$ docker service ps condescending_cori
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 13 minutes ago  Running        6c6d232a5d0e
```

The following shows the output for the node on which the command is
running:

```console
$ docker node ps self
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
b1tpbi43k1ibevg2e94bmqo0s  mad_kalam.1           mad_kalam           apline  Accepted 2 seconds ago  Accepted       6c6d232a5d0e
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 12 minutes ago  Running        6c6d232a5d0e
4x609m5o0qyn0kgpzvf0ad8x5  furious_davinci.1     furious_davinci     redis   Running 32 minutes ago  Running        6c6d232a5d0e
```

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 0aa4e1e68973ede0c73f8a4356e2a17fc903f549
Component: engine
2016-07-27 11:06:42 -07:00
980ac6c629 Add a test that the default seccomp profile allows execution of 32 bit binaries
While testing #24510 I noticed that 32 bit syscalls were incorrectly being
blocked and we did not have a test for this, so adding one.

This is only tested on amd64 as it is the only architecture that
reliably supports 32 bit code execution, others only do sometimes.

There is no 32 bit libc in the buildpack-deps so we cannot build
32 bit C code easily so use the simplest assembly program which
just calls the exit syscall.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 93bbc76ee53240e0862c6f1ff409e7a4ee0883dc
Component: engine
2016-07-27 18:42:34 +01:00
cb9f5d85ea Merge pull request #25067 from lixiaobing10051267/masterBreak
Add break after found = true
Upstream-commit: 2c947a4b009f90ce79abbdf137ea908320ab28ec
Component: engine
2016-07-27 14:44:13 +02:00
49967c7276 Merge pull request #25104 from cpuguy83/fix_TestApiSwarmRaftQuorum
fix race in TestApiSwarmRaftQuorum
Upstream-commit: e07ff10f706a5bb9aa403c8d56876b09f9cba857
Component: engine
2016-07-27 12:50:09 +02:00
ce6c596db3 Merge pull request #25107 from stevvooe/cleanup-leader-election-test
integration-cli: cleanup leader election tests
Upstream-commit: ef63637b995b07a08b6cb326dc8953b927e9df1d
Component: engine
2016-07-27 12:47:33 +02:00
fbd6f3276f Merge pull request #25085 from aaronlehmann/restart-delay-integration-tests
Specify a lower restart delay for swarm integration tests
Upstream-commit: 5d65ba4ca7ecaaa31f13cd3052ac7c052f09e21f
Component: engine
2016-07-26 22:18:28 -04:00
9f01f14280 integration-cli: cleanup leader election tests
Ensure convergence before moving on with testing leader election
conditions. This reduce the flakiness of this test when run in different
environments.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 946e23776be78510799f3f242f7b9f7acbbfd357
Component: engine
2016-07-26 19:12:27 -07:00
025360735d fix race in TestApiSwarmRaftQuorum
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 4a856d7a87c65dd8c537a45443c72698f056cf13
Component: engine
2016-07-26 21:32:56 -04:00
2d9c640d4f Specify a lower restart delay for swarm integration tests
If no restart delay is specified for a swarm service, the default
restart delay is 5 seconds. This is a reasonable value for actual
deployments - one example of where it's useful is that if a bad image is
specified, the orchestrator will wait 5 seconds between attempts to
restart it instead of restarting it in a tight loop.

In integration tests, this 5 second delay is dead time. The tests run
faster if the delay is reduced. Set it to 100 ms to avoid the waste of
time.

This appears to speed up a few tests:

DockerSwarmSuite.TestApiSwarmForceNewCluster 37.241s -> 34.323s
DockerSwarmSuite.TestApiSwarmRestartCluster  22.038s -> 15.545s
DockerSwarmSuite.TestApiSwarmServicesMultipleAgents 24.456s -> 19.853s
DockerSwarmSuite.TestApiSwarmServicesStateReporting 19.240s -> 10.049s

...a small step towards making the Swarm integration tests run in a
reasonable amount of time.

Also, change the update delay for the rolling update test from 8 seconds
to 4 seconds, which should be sufficient to differentiate between
batches of updated tasks. This reduces the runtime for
DockerSwarmSuite.TestApiSwarmServicesUpdate from 28s to 20s.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c93c6492589504ed9474922f7c98f9ecb24df77f
Component: engine
2016-07-26 12:12:43 -07:00
1fe61aeefa Fix flaky TestSwarmNodeTaskListFilter by waiting for task fully deployed
This is an attempt to fix the flaky test of TestSwarmNodeTaskListFilter in 25029.

Basically this fix adds a check to wait until 3 containers has already up,
before processing `node tasks ...`.

This might fix 25029.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 63c0366bc9a7f326ad61cdfa69fa860cf844a2c7
Component: engine
2016-07-26 11:56:58 -07:00
5a19e582d6 Fix race in TestApiSwarmRestartCluster
In `TestApiSwarmRestartCluster`, it's calling `checkClusterHealth`.
`checkClusterHealth` calls `d.info()`, which will return an error if
there is no cluster leader... problem is `checkClusterHealth` is doing a
nil error assertion w/o giving any time for a leader to be elected.

This moves the `d.info()` call into a `waitAndAssert` using the default
reconciliation timeout.

It also moves some other checks into a `waitAndAssert` to give the
cluster enough time to come back up.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: fdcde8bb65acf2c459e93678bf2659139ef5e918
Component: engine
2016-07-26 14:37:18 -04:00
062b507351 Make daemon events listen for plugin lifecycle events.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 42abccb841b5bc0d420044e69165852b0054c38f
Component: engine
2016-07-26 10:51:47 -07:00
3c909576f6 Merge pull request #25033 from anusha-ragunathan/plugin-restart
Check for plugin state before enabling plugin.
Upstream-commit: 3c4d3b2cacdd263ccded0ed0639c22fad96550d6
Component: engine
2016-07-26 18:24:02 +02:00
c402160cdb Add break after found = true
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 8928677ea2b4e69ecfd96a2c951a33e46b7b7388
Component: engine
2016-07-26 23:28:44 +08:00
eb900df556 Remove swarm inspect and use info instead
Remove the swarm inspect command and use docker info instead to display
swarm information if the current node is a manager.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e6923f6d75c2bd1b22cc1229214ffceca3251cc6
Component: engine
2016-07-25 20:31:10 -07:00
37c9afdc01 Check for plugin state before enable and disable.
This prevents unnecessary API call to containerd.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: b867f6c6e18f9d999ddec911a241941428777569
Component: engine
2016-07-25 19:24:28 -07:00
b94b8fd3fd Merge pull request #25023 from cpuguy83/25022_fix_label_panic
fix panic on --label-add
Upstream-commit: afac3361dc66b0fd0c3910f89d0d7e8156b37e24
Component: engine
2016-07-25 18:13:15 -07:00
d759fd7b51 Merge pull request #24545 from runshenzhu/health-check
swarm: block controller.Start until container is healthy
Upstream-commit: a4634cd8a8edb9be9c73dc552e045fa868a861f7
Component: engine
2016-07-25 20:32:27 -04:00
d2f3f931f0 fix panic on --label-add
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 85bc3194aa12c19a5bd755666d1e9617dc1bb322
Component: engine
2016-07-25 19:20:44 -04:00
5a95df9753 extend health check to start service
Signed-off-by: runshenzhu <runshen.zhu@gmail.com>
Signed-off-by: Runshen Zhu <runshen.zhu@gmail.com>
Upstream-commit: a99db84b4a966f0f09e81c446e857323a2a3302c
Component: engine
2016-07-25 15:49:22 -07:00