Commit graph

34413 commits

Author SHA1 Message Date
Anusha Ragunathan
6e5c2d639f
Merge pull request #36119 from cpuguy83/fix_plugin_scanner
Fix issue with plugin scanner going to deep
2018-02-02 20:19:01 -08:00
Yong Tang
39fe587540
Merge pull request #36193 from dnephin/debug-swagger-gen-failures
Make it easier to debug swagger-gen flakes
2018-02-02 19:54:30 -08:00
Brian Goff
c2b27d5752
Merge pull request #36137 from fcrisciani/libnetwork-vendoring
Libnetwork revendoring
2018-02-02 21:27:27 -05:00
Yong Tang
a5f15c738a
Merge pull request #36190 from dnephin/fix-vendor-check
Fix vendor validation
2018-02-02 16:24:57 -08:00
Flavio Crisciani
ec86547244
Libnetwork revendoring
Diff:
5ab4ab8300...20dd462e0a

- Memberlist revendor (fix for deadlock on exit)
- Network diagnostic client
- Fix for ndots configuration

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-02-02 14:36:32 -08:00
Brian Goff
b27f70d45a Fix issue with plugin scanner going to deep
The plugin spec says that plugins can live in one of:

- /var/run/docker/plugins/<name>.sock
- /var/run/docker/plugins/<name>/<name>.sock
- /etc/docker/plugins/<name>.[json,spec]
- /etc/docker/plugins/<name>/<name>.<json,spec>
- /usr/lib/docker/plugins/<name>.<json,spec>
- /usr/lib/docker/plugins/<name>/<name>.<json,spec>

However, the plugin scanner which is used by the volume list API was
doing `filepath.Walk`, which will walk the entire tree for each of the
supported paths.
This means that even v2 plugins in
`/var/run/docker/plugins/<id>/<name>.sock` were being detected as a v1
plugin.
When the v1 plugin loader tried to load such a plugin it would log an
error that it couldn't find it because it doesn't match one of the
supported patterns... e.g. when in a subdir, the subdir name must match
the plugin name for the socket.

There is no behavior change as the error is only on the `Scan()` call,
which is passing names to the plugin registry when someone calls the
volume list API.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-02-02 16:49:14 -05:00
Yong Tang
3a6f8cfd51
Merge pull request #36146 from yongtang/36142-TaskState
Add `REMOVE` and `ORPHANED` to TaskState
2018-02-02 11:33:25 -08:00
Daniel Nephin
d80f25d079 Make it easier to debug swgger-gen flakes
Sometimes this check fails, but git status doesn't give us enough information
to debug the failure.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2018-02-02 11:07:40 -08:00
Daniel Nephin
075fd7a9be Fix vendor validation
Previously adding files to vendor/ without adding to vendor.conf would not fail the
validation.

Also be consistent with indentation and use tabs.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2018-02-02 10:49:57 -08:00
Yong Tang
81e651c6d2
Merge pull request #36177 from yongtang/02012018-docker_api_resize_test
Migrate several resize tests from integration-cli to integration
2018-02-02 10:27:24 -08:00
Yong Tang
8f800c9415 Migrate several resize tests from integration-cli to integration
This fix migrates several resize tests from integration-cli to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-02 15:21:47 +00:00
Yong Tang
fd87db3769
Merge pull request #36178 from yongtang/01302018-TestAPIStatsContainerGetMemoryLimit
Migrate TestAPIStatsContainerGetMemoryLimit from integration-cli to api tests
2018-02-01 22:01:05 -08:00
Yong Tang
d5cbde514f Migrate TestAPIStatsContainerGetMemoryLimit from integration-cli to api tests
This fix migrates TestAPIStatsContainerGetMemoryLimit from
integration-cli to api test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-01 22:07:06 +00:00
Yong Tang
e8d1f35718 Remove integration-cli/docker_api_resize_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-01 16:37:01 +00:00
Tibor Vass
53a58da551
Merge pull request #36160 from kolyshkin/layer-not-retained
daemon.cleanupContainer: nullify container RWLayer upon release
2018-01-31 15:13:00 -08:00
Vincent Demeester
5772c4b8a2
Merge pull request #36166 from yongtang/01312018-TestAPIUpdateContainer
Migrate TestAPIUpdateContainer from integration-cli to api tests
2018-01-31 15:02:00 -08:00
Yong Tang
490edd3582 Migrate TestAPIUpdateContainer from integration-cli to api tests
This fix migrates TestAPIUpdateContainer from integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-31 20:02:55 +00:00
Daniel Nephin
231a4408f2
Merge pull request #36150 from yongtang/36139-ContainerStatus
Fix issue of ExitCode and PID not show up in Task.Status.ContainerStatus
2018-01-31 11:59:53 -08:00
Yong Tang
e1f98e8ab3
Merge pull request #36163 from thaJeztah/bump-go-connections
bump docker/go-connections to 98e7d807e5d804e4e42a98d74d1dd695321224ef
2018-01-31 09:20:10 -08:00
Yong Tang
8786b09c81 Remove docker_api_update_unix_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-31 16:10:34 +00:00
Yong Tang
9247e09944 Fix issue of ExitCode and PID not show up in Task.Status.ContainerStatus
This fix tries to address the issue raised in 36139 where
ExitCode and PID does not show up in Task.Status.ContainerStatus

The issue was caused by `json:",omitempty"` in PID and ExitCode
which interprate 0 as null.

This is confusion as ExitCode 0 does have a meaning.

This fix removes  `json:",omitempty"` in ExitCode and PID,
but changes ContainerStatus to pointer so that ContainerStatus
does not show up at all if no content. If ContainerStatus
does have a content, then ExitCode and PID will show up (even if
they are 0).

This fix fixes 36139.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-31 15:35:19 +00:00
Sebastiaan van Stijn
a6d35a822e
bump docker/go-connections to 98e7d807e5d804e4e42a98d74d1dd695321224ef
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-01-31 01:30:56 -08:00
Akihiro Suda
421664aba1
Merge pull request #36156 from r2d4/move-shell-parser
Move dockerfile ENV shell parser functions into subpackage
2018-01-31 14:48:01 +09:00
Kir Kolyshkin
e9b9e4ace2 daemon.cleanupContainer: nullify container RWLayer upon release
ReleaseRWLayer can and should only be called once (unless it returns
an error), but might be called twice in case of a failure from
`system.EnsureRemoveAll(container.Root)`. This results in the
following error:

> Error response from daemon: driver "XXX" failed to remove root filesystem for YYY: layer not retained

The obvious fix is to set container.RWLayer to nil as soon as
ReleaseRWLayer() succeeds.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-01-30 18:50:59 -08:00
Matt Rickard
a634526d14 Move builder shell parser into subpackage
Moves builder/shell_parser and into its own subpackage at builder/shell since it
has no dependencies other than the standard library. This will make it
much easier to vendor for downstream libraries, without pulling all the
dependencies of builder/.

Fixes #36154

Signed-off-by: Matt Rickard <mrick@google.com>
2018-01-30 17:54:39 -08:00
Sebastiaan van Stijn
a80cd04eb5
Merge pull request #36125 from thaJeztah/fix-plural-singular-node-generic-resources
Fix "--node-generic-resource" singular/plural
2018-01-30 14:38:50 -08:00
Yong Tang
5e7a245c3f
Merge pull request #36148 from yongtang/01302018-TestLinksEtcHostsContentMatch
Migrate some integration-cli test to api tests
2018-01-30 13:38:15 -08:00
Yong Tang
11ccbeb5c5
Merge pull request #36152 from yongtang/01302018-TestAuthAPI
Migrate TestAuthAPI from integration-cli to integration
2018-01-30 13:37:56 -08:00
Yong Tang
d924755789 Migrate TestAuthAPI from integration-cli to integration
This fix migrates TestAuthAPI from integration-cli to integration

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-30 19:15:06 +00:00
Yong Tang
e6bd20edcb Migrate some integration-cli test to api tests
This fix migrate  TestLinksEtcHostsContentMatch
to api test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-30 18:52:48 +00:00
Yong Tang
a40687f5ac Add REMOVE and ORPHANED to TaskState
This fix tries to address the issue raised in 36142 where
there are discrepancies between Swarm API and swagger.yaml.

This fix adds two recently added state `REMOVE` and `ORPHANED` to TaskState.

This fix fixes 36142.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-30 16:46:05 +00:00
Sebastiaan van Stijn
40a9d5d24c
Merge pull request #35946 from joelwurtz/patch-2
Fix Volumes property definition in ContainerConfig
2018-01-29 20:57:09 -08:00
Yong Tang
d98cdc490c
Merge pull request #36141 from yongtang/01292018-stop_test
Migrate docker_cli_stop_test.go to api test
2018-01-29 19:31:01 -08:00
Yong Tang
4f378124ff Migrate docker_cli_stop_test.go to api test
This fix migrate docker_cli_stop_test.go to api test

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-30 00:55:18 +00:00
Yong Tang
9d61e5c8c1
Merge pull request #36124 from crosbymichael/exec
Use proc/exe for reexec
2018-01-29 11:41:08 -08:00
Brian Goff
9c5686fbd0
Merge pull request #36131 from yongtang/01282018-swarmkit
Update swarmkit to 68a376dc30d8c4001767c39456b990dbd821371b
2018-01-29 11:07:13 -08:00
Vincent Demeester
d093aa0ec3
Merge pull request #36130 from yongtang/36042-secret-config-mode
Fix secret and config mode issue
2018-01-29 10:37:24 -08:00
Yong Tang
03a1df9536
Merge pull request #36114 from Microsoft/jjh/fixdeadlock-lcowdriver-hotremove
LCOW: Graphdriver fix deadlock in hotRemoveVHDs
2018-01-29 09:57:43 -08:00
Akihiro Suda
cd3c0057ac
Merge pull request #34369 from cyphar/build-buildmode-pie
*: switch to -buildmode=pie
2018-01-29 23:54:03 +09:00
Sebastiaan van Stijn
4219df22fc
Merge pull request #36132 from yongtang/01282018-typo
Fix a typo in CONTRIBUTING.md
2018-01-28 12:21:46 -08:00
Yong Tang
65ee7fff02 Add test cases for file mode with secret and config.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-28 16:48:10 +00:00
Yong Tang
958200970f
Merge pull request #36074 from shutefan/master
Update API docs to show that /containers/{id}/kill returns HTTP 409
2018-01-28 08:32:35 -08:00
Yong Tang
3305221eef Fix secret and config mode issue
This fix tries to address the issue raised in 36042
where secret and config are not configured with the
specified file mode.

This fix update the file mode so that it is not impacted
with umask.

Additional tests have been added.

This fix fixes 36042.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-28 16:21:41 +00:00
Yong Tang
b9923d8530 Update swarmkit to 68a376dc30d8c4001767c39456b990dbd821371b
This fix updates swarmkit to 68a376dc30d8c4001767c39456b990dbd821371b:
```
-github.com/docker/swarmkit 713d79dc8799b33465c58ed120b870c52eb5eb4f
+github.com/docker/swarmkit 68a376dc30d8c4001767c39456b990dbd821371b
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-28 16:20:17 +00:00
Yong Tang
cce360c7b0 Fix a typo in CONTRIBUTING.md
`seperate` -> `separate`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-28 16:19:51 +00:00
Yong Tang
9368e9dac3
Merge pull request #36099 from thaJeztah/bump-libnetwork3
bump libnetwork to 5ab4ab830062fe8a30a44b75b0bda6b1f4f166a4
2018-01-27 21:47:29 -08:00
Yong Tang
c9f1807abb
Merge pull request #34992 from allencloud/simplify-shutdowntimeout
simplify codes on calculating shutdown timeout
2018-01-27 18:26:54 -08:00
Sebastiaan van Stijn
924fb0e843
Merge pull request #36095 from yongtang/36083-network-inspect-created-time
Fix issue where network inspect does not show Created time for networks in swarm scope
2018-01-26 17:18:30 -08:00
Sebastiaan van Stijn
c41c80026b
Merge pull request #35911 from ASMfreaK/Russian-Scientsists-addition-to-names-generator
Add more russian scientists in names-generator.go
2018-01-26 15:48:58 -08:00
Sebastiaan van Stijn
6e7715d65b
Fix "--node-generic-resource" singular/plural
Daemon flags that can be specified multiple times use
singlar names for flags, but plural names for the configuration
file.

To make the daemon configuration know how to correlate
the flag with the corresponding configuration option,
`opt.NewNamedListOptsRef()` should be used instead of
`opt.NewListOptsRef()`.

Commit 6702ac590e attempted
to fix the daemon not corresponding the flag with the configuration
file option, but did so by changing the name of the flag
to plural.

This patch reverts that change, and uses `opt.NewNamedListOptsRef()`
instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-01-26 13:53:13 -08:00