Commit Graph

3677 Commits

Author SHA1 Message Date
f2ff00f808 Ignore socket rm errors on daemon suite teardown
Errors here are not important and not really related to set success/failure.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e34244842ca968ff96769d1b5eab52fecddee80d
Component: engine
2016-08-10 15:18:35 -04:00
cb1c855c27 Merge pull request #23951 from allencloud/defer-os-file-close
add defer file.Close to avoid potential fd leak
Upstream-commit: 64605d709f9bf5677d513d6ed78d63fffadc697d
Component: engine
2016-08-10 11:07:15 -07:00
1c502571ef add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0ead624473b6bddc232b46bc7c76ab4f9c743ff5
Component: engine
2016-08-10 08:36:09 +08:00
b9457de055 Merge pull request #25518 from yuexiao-wang/add-debug-info
add more info for debugging
Upstream-commit: eb28dde01f165849bf372e18200e83042c76f26c
Component: engine
2016-08-09 11:56:09 -07:00
bc307a89de Merge pull request #25461 from coolljt0725/fix_update_mem
Fix update memory without memoryswap
Upstream-commit: 8233e2b54d8c88d9c5845cbd30d54e7d5d8cb852
Component: engine
2016-08-09 16:02:55 +02:00
1a12027160 add more info for debugging
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 5882a9ea171b4cade430da8428beec180d0af952
Component: engine
2016-08-09 17:06:44 +08:00
31e42c852b Fix typo
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: da6609ccdca80c587410b0b13606842412e329bd
Component: engine
2016-08-09 09:42:23 +08:00
34a323258f Wait container's removal via Events API
If AutoRemove is set, wait until client get `destroy` events, or get
`detach` events that implies container is detached but not stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 6dd8e10d6ed7a7371c5c1824ad58c4403a7b3bfd
Component: engine
2016-08-08 22:46:53 +08:00
b27f1b6d73 Move --rm to daemon side
`--rm` is a client side flag which caused lots of problems:
1. if client lost connection to daemon, including client crash or be
killed, there's no way to clean garbage container.
2. if docker stop a `--rm` container, this container won't be
autoremoved.
3. if docker daemon restart, container is also left over.
4. bug: `docker run --rm busybox fakecmd` will exit without cleanup.

In a word, client side `--rm` flag isn't sufficient for garbage
collection. Move the `--rm` flag to daemon will be more reasonable.

What this commit do is:
1. implement a `--rm` on daemon side, adding one flag `AutoRemove` into
HostConfig.
2. Allow `run --rm -d`, no conflicting `--rm` and `-d` any more,
auto-remove can work on detach mode.
3. `docker restart` a `--rm` container will succeed, the container won't
be autoremoved.

This commit will help a lot for daemon to do garbage collection for
temporary containers.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 3c2886d8a45d8e79b00ab413d91f1af871b58d0a
Component: engine
2016-08-08 22:46:53 +08:00
63356b5588 Merge pull request #23718 from yongtang/23498-entrypoint-unset
Allow unset `--entrypoint` in `docker run` or `docker create`
Upstream-commit: 2684459ed433125257ffde5e95666ff785f26ec2
Component: engine
2016-08-08 14:38:01 +02:00
2dac8a0018 Fix update memory without memoryswap
The memory should always be smaller than memoryswap,
we should error out with message that user know how
to do rather than just an invalid argument error if
user update the memory limit bigger than already set
memory swap.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 92394785fa3e55b19402fc762c030d28b36b6cfc
Component: engine
2016-08-08 18:36:03 +08:00
3b72d892d5 modify func namt from TestUserAgentPassThroughOnPull to TestUserAgentPassThrough
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 427869fe94c9d32daa29f964bbf4371bf2295748
Component: engine
2016-08-08 11:40:20 +08:00
0c94d9d1e8 Allow unset --entrypoint in docker run or docker create
This fix tries to address the issue raised in #23498 to allow unset
`--entrypoint` in `docker run` or `docker create`.

This fix checks the flag `--entrypoint` and, in case `--entrypoint=` (`""`)
is passed, unset the Entrypoint during the container run.

Additional integration tests have been created to cover changes in this fix.

This fix fixes #23498.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c8d3ee80933d6337382fb4a52d90835e263c1aaf
Component: engine
2016-08-05 16:35:20 -07:00
6020e85931 Merge pull request #25402 from lixiaobing10051267/masterChmod
Fatal info not identical with actual chmod intent
Upstream-commit: 4c528ae7199191955a8294764fdb5eefaa664841
Component: engine
2016-08-05 08:42:30 -07:00
d006708306 Merge pull request #23475 from vdemeester/add-format-flag-to-network-and-volume-ls
Add format flag to network and volume ls
Upstream-commit: 1ccd9d31372c41aaac5bc9972122348b1007ea14
Component: engine
2016-08-05 15:17:45 +02:00
823b6241c7 Merge pull request #25387 from yongtang/25374-ps-filter-order
Sort output of `docker ps --filter` with order by creation time
Upstream-commit: 29fef34139a4be9235a245a85e98c8a3b9432f2d
Component: engine
2016-08-05 14:47:10 +02:00
fb8eea7ff0 Merge pull request #25096 from vieux/docker_plugin_remove_force
Add --force to docker plugin remove
Upstream-commit: 85428a1a53292684be55de9de3646e8c4745c72e
Component: engine
2016-08-05 14:45:05 +02:00
58b42febf4 Merge pull request #25401 from lixiaobing10051267/masterConfig
Docker api inspect assert HostConfig
Upstream-commit: f570fbb9ba14ba9ce5725cf51e1c4360dcb6d179
Component: engine
2016-08-05 14:11:29 +02:00
87b0575d6c Sort output of docker ps --filter with order by creation time
This fix tries to address the issue raised in 25374 where the
output of `docker ps --filter` is in random order and
not deterministic.

This fix sorts the list of containers by creation time so that the
output is deterministic.

An integration test has been added.

This fix fixes 25374.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3f971335463b99a7caedcf597ffc544845b37a21
Component: engine
2016-08-04 19:27:50 -07:00
d5f439ee89 Add --force to docker plugin remove
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 0016b331dac94661678fd7676c7b6ccc9ec2d147
Component: engine
2016-08-04 15:55:45 -07:00
bcd928c83a Merge pull request #23902 from dnephin/inspect-to-cobra
Convert inspect command to Cobra
Upstream-commit: 979d48bbf58599ecf236984463ae94ee59ba3b47
Component: engine
2016-08-04 11:20:43 -07:00
5820821c40 Merge pull request #25370 from thaJeztah/move-experimental-test
Move TestInspectNamedMountPoint integrationtest from experimental
Upstream-commit: af51c9704c058f5a6545a6e5a27d7797f4cadab5
Component: engine
2016-08-04 11:12:46 -04:00
d43047d4a6 Docker api inspect Assert HostConfig
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 86c72aa01fe55af3abefe98cd4d6d36ab2dd3217
Component: engine
2016-08-04 23:01:16 +08:00
b837103bde Add volume --format flag to ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a488ad1a090eb0b6069f79cd045badaaa8ec1bda
Component: engine
2016-08-04 14:59:55 +02:00
33375755ad Add network --format flag to ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a8aaafc4a3fc716bdb2c4e571e34c66eb80bbab2
Component: engine
2016-08-04 14:59:51 +02:00
7ffe9a911c Fatal info not identical with actual chmod intent
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: bd0ec7ed55a9ec2cd5957e9a9ac3542a9d218dcc
Component: engine
2016-08-04 20:14:15 +08:00
82e10dbf88 Decrease sleep to 2 seconds
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 94b1bb82e19242e87edfc688bb3d3c3c010d4603
Component: engine
2016-08-03 15:25:27 -07:00
6cbe7c9c86 Change number of pings to 1
This cuts the test time down from 6s to 2s

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: cfde8e785582502b830238245ad69eae5394b4f0
Component: engine
2016-08-03 13:30:34 -07:00
c5d4a2d2e9 Make network stats version test concurrent
This change makes the test run go down from 10s to 2s

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 2f3b7f08a09d70bc17a75b00a81e56357a9cae3f
Component: engine
2016-08-03 13:24:55 -07:00
4edb73517c Remove build 60 steps
This test is already covered in the individual graph driver tests and it
adds 15s to the test run without adding value.  The original idea was to
test max number of layers, this is fulfilled by the graph drivers.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 3ffa5f61494aa67434a9b408540a9efb32e332cf
Component: engine
2016-08-03 13:16:01 -07:00
9233ed872e Ignore 'not a swarm error' when inspecting a task.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fab2a3dc826ec05e7fb0dc66748b235fb4a43df6
Component: engine
2016-08-03 12:22:07 -04:00
2c3746fbe6 Move TestInspectNamedMountPoint integrationtest from experimental
This feature is no longer experimental, and should
now work on Windows too

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6f2e8205024ae259336d43f75169e9bb43de35a5
Component: engine
2016-08-03 16:21:38 +02:00
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