Commit Graph

31121 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 5c69746852 Merge pull request #29841 from wefine/docker_image_tag_input_check
check both source_image_tag and target_image_tag for 'docker image tag'
Upstream-commit: fc9d74136bf22f9a1d0a7d69bfeae33055d360ad
Component: engine
2017-01-06 17:58:58 +01:00
wefine 06b5f5c249 check both source_image_tag and target_image_tag for 'docker image tag'
Signed-off-by: wefine <wang.xiaoren@zte.com.cn>
Upstream-commit: a041697cabb934e875a1e7f8adea15495209b347
Component: engine
2017-01-07 04:55:53 +08:00
Sebastiaan van Stijn 1725c8a9d3 Merge pull request #29899 from Microsoft/jjh/testbuildworkdirimagecmd
Windows: Enable TestBuildWorkdirImageCmd
Upstream-commit: b7c25317799e5fa380d3167823f09263f4397114
Component: engine
2017-01-06 17:15:22 +01:00
Harald Albers 6e6e9806d5 Fix wrong command in changelog
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1fe0270e728dd587c724c5f0de211ab739918e4b
Component: engine
2017-01-06 07:45:09 -08:00
Sebastiaan van Stijn d5e0782250 Merge pull request #29934 from lixiaobing10051267/masterTop
Provide correct command information and URL
Upstream-commit: ec215d48603706ceaa62d5bfd16fee902168d087
Component: engine
2017-01-06 15:02:34 +01:00
Sebastiaan van Stijn 2f07f645eb Merge pull request #29935 from yuexiao-wang/fix-return
Remove redundant return nil
Upstream-commit: 1df474a3118907a072ff5ac7a60529f0846a770e
Component: engine
2017-01-06 13:59:44 +01:00
yuexiao-wang 434810fce9 Remove redundant return nil
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 9788822421255a0516a0e3ce2ac32b1ec9d7d894
Component: engine
2017-01-06 22:18:10 +08:00
Akihiro Suda 72dca92b14 Merge pull request #29929 from aaronlehmann/secret-test-fix
Fix TestSecretCreateWithLabels nondeterminism
Upstream-commit: bf8cdb9172c3516eecb80974971b0b2da00afc11
Component: engine
2017-01-06 13:47:08 +09:00
Brian Goff bd5280d393 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>
Upstream-commit: 21fcbb39b73310e69d6403a1cfa8b26799cc1355
Component: engine
2017-01-05 22:40:45 -05:00
lixiaobing10051267 97d6813cf8 Provide correct command imformation and URL
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: d8e6241989cdfda4513dd30faef00f1f71afa489
Component: engine
2017-01-06 11:02:02 +08:00
Brian Goff 47410763de Merge pull request #29923 from tonistiigi/plugin-names
Set plugins used in tests back to original names
Upstream-commit: 9c3955aae1bf5f743523abc7d310b0a6668ee062
Component: engine
2017-01-05 21:41:39 -05:00
Sebastiaan van Stijn f61ba34e6f Merge pull request #29924 from aaronlehmann/logrus-vendor
vendor: Unfork logrus dependency
Upstream-commit: 5259d7639347e50e1a63eb64570cae71cb9a37c3
Component: engine
2017-01-06 02:10:22 +01:00
Tonis Tiigi 2eb5499d33 Add test for swarm error handling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d377b074fdcbf735d9fbafdb9bcab6878e5c0ae9
Component: engine
2017-01-05 15:46:07 -08:00
Aaron Lehmann 0317f61145 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>
Upstream-commit: 45833ce54d741b2378819e3ba5859533c317ae01
Component: engine
2017-01-05 15:22:51 -08:00
Aaron Lehmann 5b11368767 Revendor swarmkit to 2e956c4
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b1f5320dd6812a34cb4684419f509d17798985b7
Component: engine
2017-01-05 14:55:52 -08:00
Victor Vieux 773b47f51e Merge pull request #29920 from jeveleth/patch-1
Fixes minor typo
Upstream-commit: 1b2786c2c21d0e432b769446c02beed99550b57d
Component: engine
2017-01-05 14:37:00 -08:00
Aaron Lehmann d3ac4a81ef 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>
Upstream-commit: 11df2db538fbc7a6181c591b6ec47db9f96a87e4
Component: engine
2017-01-05 14:19:08 -08:00
Tonis Tiigi beeae010cf Set plugins used in tests back to original names
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f4798b98fc2c8d3d7688fdd7c1a055f452c29770
Component: engine
2017-01-05 13:55:43 -08:00
Tibor Vass dc5e201344 Merge pull request #29845 from vdemeester/fix-the-fix-facepalming-myself
[test-integration] Should check for output, not error in deleteContainer
Upstream-commit: 40afb853d718358a26b01d6e796f80f8cf0c5728
Component: engine
2017-01-05 13:26:39 -08:00
Josh Eveleth c2674c6655 Fix minor typo
Signed-off-by: Josh Eveleth <joshe@opendns.com>
Upstream-commit: eee0cfa45dd75223dec204428dc85dccb2b5abe9
Component: engine
2017-01-05 12:45:56 -08:00
Vivek Goyal a480d05277 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>
Upstream-commit: 39bdf601f6bea3c189d8e189e13c7e48b6f66b43
Component: engine
2017-01-05 15:02:21 -05:00
Vincent Demeester 424f0925a7 Clean some runCommandWithOutput accross integration-cli code
There is still ways to go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 87e3fcfe1e059780c4ee57abb097296fd29e09af
Component: engine
2017-01-05 17:44:31 +01:00
allencloud 2d3aa0f1db update events related doc and swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: ffc79bd1b092070ddd18c1ec87d8b87cbfaf741b
Component: engine
2017-01-05 21:40:21 +08:00
Yong Tang f5d346298d Run btrfs rescan only if userDiskQuota is enabled
This fix tries to address the issue raised in 29810
where btrfs subvolume removal failed when docker
is in an unprivileged lxc container. The failure
was caused by `Failed to rescan btrfs quota` with
`operation not permitted`.

However, if disk quota is not enabled, there is no
need to run a btrfs rescan at the first place.

This fix checks for `quotaEnabled` and only run btrfs
rescan if `quotaEnabled` is true.

This fix fixes 29810.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b36e613d9f311e69387ccec2be16f8618fa1f558
Component: engine
2017-01-05 05:18:11 -08:00
Akihiro Suda c2ca52e58a Merge pull request #29908 from lixiaobing10051267/masterExpectedErr
optimize Fatalf with the expectedError
Upstream-commit: 766e53d8cb21642ab7ed0cd3f93f6265107ef969
Component: engine
2017-01-05 18:05:08 +09:00
Vincent Demeester 122bb479a3 Merge pull request #29888 from albers/completion-plugin-names
Add bash completion for plugin names
Upstream-commit: 1dad4cf30c7cdccdc04d5d8c5d4ac9f8f729f0f3
Component: engine
2017-01-05 09:54:17 +01:00
Vincent Demeester 092b719cd9 Merge pull request #29903 from Microsoft/jjh/volumetest-tp5
Windows: Fix TP5 volume unit tests TODOs
Upstream-commit: 7ad34996bc88ce13ad4d7fb9b89be57366e75bb0
Component: engine
2017-01-05 09:53:31 +01:00
Vincent Demeester d5020524c6 Merge pull request #29739 from tonistiigi/add-restart-liverestore-test
Add test TestRestartPolicyWithLiveRestore
Upstream-commit: ec6d322d37d5faf5e46a99dba78809913f6ab0ac
Component: engine
2017-01-05 09:39:07 +01:00
Vincent Demeester d7d442f89f Merge pull request #29907 from YunxiangHuang/fix_zsh_docker
Fix completion for zsh
Upstream-commit: 6b49da6edb2f40b3618fd68e82bff66508d0c603
Component: engine
2017-01-05 09:34:39 +01:00
lixiaobing10051267 16eae482a2 optimize Fatalf with the expectedError
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 63058171849a9b491da2f2c45b476c0d58daa4a7
Component: engine
2017-01-05 14:47:36 +08:00
Akihiro Suda 354a4c397b Merge pull request #29892 from Microsoft/jjh/volcomment
Correct comment in vol driver interface
Upstream-commit: 10eee3dfa7808f8b252fa6a998fc033bd5fd0c83
Component: engine
2017-01-05 13:11:34 +09:00
Yunxiang Huang de1ab35d12 Fix "zsh/_docker"
Signed-off-by: Yunxiang Huang <hyxqshk@vip.qq.com>
Upstream-commit: c6544394b8c5f406ea9054ed7e3e00206c2f0235
Component: engine
2017-01-05 11:13:17 +08:00
John Howard 75ea28e3b8 Windows: Fix old TP5 volume unit tests
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: cc3e59c44e997c6c399415d1378072f247129230
Component: engine
2017-01-04 16:17:55 -08:00
John Howard 55d4d2f410 Windows: Enable TestBuildWorkdirImageCmd
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 528a5fd2ba02ea8d34cc528cddbd1b5b62a30074
Component: engine
2017-01-04 15:33:40 -08:00
Yong Tang 5112890bb5 Add .CreatedAt placeholder for docker network ls --format
This fix tries to add a placeholder `.CreatedAt` for Go
format template in `docker network ls --format`.

While working on 29226, I noticed that it is not possible to
display network's creation time in `docker network ls`, with or
without `--format`.

We are able to find the timestamp through `docker network inspect` though.

However, as we allows networks to be pruned based on the timestamp
(see 29226), showing the timestamp in `docker network ls --format`
would be much useful now.

This fix adds the `.CreatedAt` placeholder for `docker network ls --format`.
The default output was not changed for `docker network ls --format`.

A test case for unit tests has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0ad02c610880f7ccb96be418baa8667e41aba7a5
Component: engine
2017-01-04 15:18:44 -08:00
Tibor Vass a89bf941cb Merge pull request #29877 from mavenugo/npfilter
Use GetAllByCap to get list of network plugins in docker info
Upstream-commit: 4617b66c90eb54119d54f459f48f873f583731df
Component: engine
2017-01-04 14:57:20 -08:00
Yong Tang 0c3b3bfadc 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>
Upstream-commit: 58738cdee327f5de481dcf7d3d377374cbb5f13a
Component: engine
2017-01-04 14:16:42 -08:00
Tonis Tiigi 7979981cc5 Add test TestRestartPolicyWithLiveRestore
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 89f034093a771fc1d3d161d23e018c25ae4e2ee3
Component: engine
2017-01-04 14:12:49 -08:00
Brian Goff eb2f639fe6 Use vol plugin creator instead of inserting spec
This makes the test a bit more robust to change and is a bit cleaner.
As implemented before this commit, we have two named plugins pointing to
the same http service. If the daemon makes any unexpected calls to the
plugin (e.g. during startup) we'll get more counts on the event counter
than expected since the daemon sees 2 plugins.

Found this while working on #29877 which broke this test originally (but
is no longer using V1 plugins, so is this is no longer broken there) and
took some time to debug what was going on.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 4bd4d18e1164e1d0b9f22ddd54a88abdf167e8d7
Component: engine
2017-01-04 15:51:49 -05:00
Madhu Venugopal 6ff3e9dd6b 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>
Upstream-commit: 6aaa85f0b0dd030f68512ca9004823926419f5fd
Component: engine
2017-01-04 12:38:14 -08:00
John Howard 5bd9457743 Correct comment in vol driver interface
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c2246f28f6bd8f4ebc333cfdb8a9e8ab6d1b7845
Component: engine
2017-01-04 12:06:37 -08:00
Sebastiaan van Stijn 966dc7a8d7 Merge pull request #29867 from Microsoft/jjh/isolationwording
Docs: Tidy --isolation wording
Upstream-commit: f0a13eb620762fd6a9627de8498b2746586da8bd
Component: engine
2017-01-04 19:32:49 +01:00
Aaron Lehmann 8b3646ee75 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>
Upstream-commit: 428600108cce0a11e65ec4ebd9e439e947b55da7
Component: engine
2017-01-04 10:19:04 -08:00
Harald Albers 65432d04b8 Add bash completion for plugin names
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e7243a303a9fb982db535b9941b9a60df0be8de5
Component: engine
2017-01-04 09:53:14 -08:00
Vincent Demeester 22fd058892 Extract daemon statsCollector to its own package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 835971c6fdaf6ea35a0e7e45f6d9a09fd5f03ce1
Component: engine
2017-01-04 18:18:30 +01:00
John Howard 6fad25131b Tidy --isolation wording
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3c32916141f7678e3f0a87fc4de5cb03535a816c
Component: engine
2017-01-04 09:14:10 -08:00
allencloud a6c6e5f892 fix volume ls filter driver
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0fdab496108e8d0945af3dd0130dd9deb09c9b26
Component: engine
2017-01-04 23:29:12 +08:00
Vincent Demeester 8965c03605 Merge pull request #29861 from Microsoft/jjh/tidywinkv
Tidy kernel version in tests
Upstream-commit: 03c17ab66a3d1adc2e6c3e0ac436afe43bcfd3b1
Component: engine
2017-01-04 15:48:20 +01:00
Sebastiaan van Stijn 85a740c504 Merge pull request #29650 from allencloud/support-registry-mirror-config-reload
support registry mirror config reload
Upstream-commit: d3f30d6a67577a52162b36a1af13eb4167e48c6b
Component: engine
2017-01-04 13:46:19 +01:00
yuexiao-wang 47aebadce2 keep network option consistent between network connect and run
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 4f9b076e8eecb19083b3875b7cacbc3b660fde75
Component: engine
2017-01-04 19:54:03 +08:00