Commit graph

30331 commits

Author SHA1 Message Date
wefine
a041697cab check both source_image_tag and target_image_tag for 'docker image tag'
Signed-off-by: wefine <wang.xiaoren@zte.com.cn>
2017-01-07 04:55:53 +08:00
Sebastiaan van Stijn
b7c2531779 Merge pull request #29899 from Microsoft/jjh/testbuildworkdirimagecmd
Windows: Enable TestBuildWorkdirImageCmd
2017-01-06 17:15:22 +01:00
Harald Albers
1fe0270e72 Fix wrong command in changelog
Signed-off-by: Harald Albers <github@albersweb.de>
2017-01-06 07:45:09 -08:00
Sebastiaan van Stijn
ec215d4860 Merge pull request #29934 from lixiaobing10051267/masterTop
Provide correct command information and URL
2017-01-06 15:02:34 +01:00
Sebastiaan van Stijn
1df474a311 Merge pull request #29935 from yuexiao-wang/fix-return
Remove redundant return nil
2017-01-06 13:59:44 +01:00
yuexiao-wang
9788822421 Remove redundant return nil
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-01-06 22:18:10 +08:00
Akihiro Suda
bf8cdb9172 Merge pull request #29929 from aaronlehmann/secret-test-fix
Fix TestSecretCreateWithLabels nondeterminism
2017-01-06 13:47:08 +09:00
Brian Goff
21fcbb39b7 Fix race accessing plugin storage map
`plugins.GetAll()` was not locking the plugin map when checking if a
plugin exists, this can cause a race and potentially a panic if another
goroutine is trying to load a plugin into the map at the same time.

Also fixes a race during activation where a plugin inserts itself into
the plugin map but does not check if something else is already there.
This is already checked before trying to activate the plugin, however
the map lock is not held for this entire period, so other plugins may be
loaded during this time.
To fix, before inserting the plugin into the map, check if one with the
same name already exists and use that instead.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-01-05 22:40:45 -05:00
lixiaobing10051267
d8e6241989 Provide correct command imformation and URL
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2017-01-06 11:02:02 +08:00
Brian Goff
9c3955aae1 Merge pull request #29923 from tonistiigi/plugin-names
Set plugins used in tests back to original names
2017-01-05 21:41:39 -05:00
Sebastiaan van Stijn
5259d76393 Merge pull request #29924 from aaronlehmann/logrus-vendor
vendor: Unfork logrus dependency
2017-01-06 02:10:22 +01:00
Tonis Tiigi
d377b074fd Add test for swarm error handling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-01-05 15:46:07 -08:00
Aaron Lehmann
45833ce54d Fix TestSecretCreateWithLabels nondeterminism
This test checks for the substring "foo" in the "secret ls" output. This
is a valid base36 substring and can sometimes show up by chance:

    docker_cli_secret_create_test.go:86:
        c.Assert(out, checker.Not(checker.Contains), name)
    ... obtained string = "" +
    ...     "ID                          NAME                        CREATED UPDATED\n" +
    ...     "ob8y4t4feuz8pn5h6vla9oxoz   stefoo7e268ozqfupi9s4se9q   Less than a second ago   Less than a second ago\n"
    ... substring string = "foo"

Change the secret name to test_secret, matching other tests. Underscores
can't appear in base36 so this name is safe to grep for.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-05 15:22:51 -08:00
Aaron Lehmann
b1f5320dd6 Revendor swarmkit to 2e956c4
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-05 14:55:52 -08:00
Victor Vieux
1b2786c2c2 Merge pull request #29920 from jeveleth/patch-1
Fixes minor typo
2017-01-05 14:37:00 -08:00
Aaron Lehmann
11df2db538 vendor: Unfork logrus dependency
Vendor the latest official logrus release instead of a custom fork
(which now happens to be identical to the fork).

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-05 14:19:08 -08:00
Tonis Tiigi
f4798b98fc Set plugins used in tests back to original names
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-01-05 13:55:43 -08:00
Tibor Vass
40afb853d7 Merge pull request #29845 from vdemeester/fix-the-fix-facepalming-myself
[test-integration] Should check for output, not error in deleteContainer
2017-01-05 13:26:39 -08:00
Josh Eveleth
eee0cfa45d Fix minor typo
Signed-off-by: Josh Eveleth <joshe@opendns.com>
2017-01-05 12:45:56 -08:00
Vivek Goyal
39bdf601f6 devmapper: Return device id in error message
I often get complains that container removal failed and users got following
error message.

"Driver devicemapper failed to remove root filesystem 18a69ba82aaf7a039ce7d44156215012d703001643079775190ac7dd6c6acf56:Device is Busy"

This error message talks about container id but does not give any info
about which particular device id is busy. Most likely device is mounted
in some other mount namespace and if one knows the device id, they
can try to do some debugging figuring which process and which mount
namespace is keeping the device busy and how did we reach that stage.

Without that information, it becomes almost impossible to debug the
problem.

So to improve the debuggability, when device removal fails, also return
device id in error message. Now new message looks as follows.

"Driver devicemapper failed to remove root filesystem 18a69ba82aaf7a039ce7d44156215012d703001643079775190ac7dd6c6acf56: Failed to remove device dbc15bdf9994a17c613d8ef9e924f3cffbf67f91e4f709295c901ad628377991:Device is Busy"

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2017-01-05 15:02:21 -05:00
Vincent Demeester
87e3fcfe1e
Clean some runCommandWithOutput accross integration-cli code
There is still ways to go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-05 17:44:31 +01:00
Akihiro Suda
766e53d8cb Merge pull request #29908 from lixiaobing10051267/masterExpectedErr
optimize Fatalf with the expectedError
2017-01-05 18:05:08 +09:00
Vincent Demeester
1dad4cf30c Merge pull request #29888 from albers/completion-plugin-names
Add bash completion for plugin names
2017-01-05 09:54:17 +01:00
Vincent Demeester
7ad34996bc Merge pull request #29903 from Microsoft/jjh/volumetest-tp5
Windows: Fix TP5 volume unit tests TODOs
2017-01-05 09:53:31 +01:00
Vincent Demeester
ec6d322d37 Merge pull request #29739 from tonistiigi/add-restart-liverestore-test
Add test TestRestartPolicyWithLiveRestore
2017-01-05 09:39:07 +01:00
Vincent Demeester
6b49da6edb Merge pull request #29907 from YunxiangHuang/fix_zsh_docker
Fix completion for zsh
2017-01-05 09:34:39 +01:00
lixiaobing10051267
6305817184 optimize Fatalf with the expectedError
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2017-01-05 14:47:36 +08:00
Akihiro Suda
10eee3dfa7 Merge pull request #29892 from Microsoft/jjh/volcomment
Correct comment in vol driver interface
2017-01-05 13:11:34 +09:00
Yunxiang Huang
c6544394b8 Fix "zsh/_docker"
Signed-off-by: Yunxiang Huang <hyxqshk@vip.qq.com>
2017-01-05 11:13:17 +08:00
John Howard
cc3e59c44e Windows: Fix old TP5 volume unit tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-01-04 16:17:55 -08:00
John Howard
528a5fd2ba Windows: Enable TestBuildWorkdirImageCmd
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-01-04 15:33:40 -08:00
Tibor Vass
4617b66c90 Merge pull request #29877 from mavenugo/npfilter
Use GetAllByCap to get list of network plugins in docker info
2017-01-04 14:57:20 -08:00
Yong Tang
58738cdee3 Add --filter until=<timestamp> for docker container/image prune
This fix is a follow up for comment
https://github.com/docker/docker/pull/28535#issuecomment-263215225

This fix provides `--filter until=<timestamp>` for `docker container/image prune`.

This fix adds `--filter until=<timestamp>` to `docker container/image prune`
so that it is possible to specify a timestamp and prune those containers/images
that are earlier than the timestamp.

Related docs has been updated

Several integration tests have been added to cover changes.

This fix fixes #28497.

This fix is related to #28535.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-04 14:16:42 -08:00
Tonis Tiigi
89f034093a Add test TestRestartPolicyWithLiveRestore
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-01-04 14:12:49 -08:00
Madhu Venugopal
6aaa85f0b0 Swarmkit has enabled the plugin filtering logic based on the drivers
returned in "docker info". Currently info endpoint isnt using the
GetAllByCap, but relies on existing networks to get the plugin names.
This causes a basic issue when it comes to global network plugins which
swarm-mode relies on, wherein swarmkit will not be able to schedule the
network on the worker nodes due to the filtering logic.

In order to break this chicken & egg issue, we must start to use the
GetAllManagedPluginsByCap. We are unable to use GetAllByCap due to
various issues with Plugin-V1's lazy loading approach causing issues
especially during daemon restarts (which uses SystemInfo)

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-04 12:38:14 -08:00
John Howard
c2246f28f6 Correct comment in vol driver interface
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-01-04 12:06:37 -08:00
Victor Vieux
bcf70b309b Merge pull request #29889 from vieux/small_secret_doc_update
small secret doc update
2017-01-04 11:27:11 -08:00
Sebastiaan van Stijn
f0a13eb620 Merge pull request #29867 from Microsoft/jjh/isolationwording
Docs: Tidy --isolation wording
2017-01-04 19:32:49 +01:00
Aaron Lehmann
428600108c plugingetter: Avoid all caps for constant declarations
Go style calls for mixed caps instead of all caps:
https://golang.org/doc/effective_go.html#mixed-caps

Change LOOKUP, ACQUIRE, and RELEASE to Lookup, Acquire, and Release.

This vendors a fork of libnetwork for now, to deal with a cyclic
dependency issue. The change will be upstream to libnetwork once this is
merged.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-04 10:19:04 -08:00
Harald Albers
e7243a303a Add bash completion for plugin names
Signed-off-by: Harald Albers <github@albersweb.de>
2017-01-04 09:53:14 -08:00
John Howard
3c32916141 Tidy --isolation wording
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-01-04 09:14:10 -08:00
allencloud
0fdab49610 fix volume ls filter driver
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-01-04 23:29:12 +08:00
Vincent Demeester
03c17ab66a Merge pull request #29861 from Microsoft/jjh/tidywinkv
Tidy kernel version in tests
2017-01-04 15:48:20 +01:00
Sebastiaan van Stijn
d3f30d6a67 Merge pull request #29650 from allencloud/support-registry-mirror-config-reload
support registry mirror config reload
2017-01-04 13:46:19 +01:00
yuexiao-wang
4f9b076e8e keep network option consistent between network connect and run
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-01-04 19:54:03 +08:00
Vincent Demeester
6129e6ce3e Merge pull request #29697 from yuexiao-wang/fix-docker-daemon
Update docker daemon to dockerd
2017-01-04 11:55:38 +01:00
Vincent Demeester
b029d3dee3
Should check for output, not error in deleteContainer
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 11:15:36 +01:00
Victor Vieux
91b739b552 small secret doc update
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-03 23:13:31 -08:00
allencloud
5b9348c553 support registry mirror config reload
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-01-04 11:04:00 +08:00
Victor Vieux
355f2ae972 Merge pull request #29431 from vieux/update_plugin_examples
replace no-remove by sample-volume-plugin in docs
2017-01-03 18:05:44 -08:00