Commit Graph

33718 Commits

Author SHA1 Message Date
c90eb48e09 Merge pull request #34960 from sterchelen/34953-Prune-Volume-lack-event-entry
Fix #34953 how volumes are pruned from daemon
Upstream-commit: 2a7388a6c47a58c402acfe0059fbe27a7a090c23
Component: engine
2017-10-12 09:24:26 -07:00
aeff250acf Merge pull request #35173 from tophj-ibm/fix-raft-quorum-test
[integration-cli] fix flaky raft test
Upstream-commit: dc74e31bb211faa189ef83469d7f58dfde0b052a
Component: engine
2017-10-11 22:23:18 -07:00
c077b5031b Merge pull request #35151 from thaJeztah/always-return-version-information
Always return version and server headers
Upstream-commit: 591b2eeeb37c285d637a2c4071a59302010128cc
Component: engine
2017-10-11 18:11:35 -07:00
594afcb5ff Merge pull request #35144 from Microsoft/jjh/fixdownlevel
Fix regression on inspect
Upstream-commit: 1ffa10ee2630917e4f2a88f5e4daf34d700eaa1f
Component: engine
2017-10-12 00:52:28 +02:00
4cde2a075b Merge pull request #35172 from cpuguy83/for_linux_126_dont_abort
Don't abort when setting may_detach_mounts
Upstream-commit: 02a2ba3e8b095f901d55020225a7300bf1eb04e1
Component: engine
2017-10-12 00:47:31 +02:00
f8ec7d1b83 Always return version and server headers
If a 400 error is returned due to an API version mismatch, no
version and server-identification headers were returned by the API.

All information in these headers is "static", so there is no
reason to omit the information in case of an error being
returned.

This patch updates the version middleware to always
return the headers.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e9dac5ef5e8a4b0ecce0c89d337fea90f2c6aef3
Component: engine
2017-10-11 22:06:43 +02:00
09a047bcdd Merge pull request #35171 from justincormack/update-roadmap
Update the Roadmap
Upstream-commit: 38c5af2c44f67b58b5bb33c1ab519f37f5263083
Component: engine
2017-10-11 12:02:43 -07:00
6bfc0ecd57 Don't abort when setting may_detach_mounts
83c2152de503012195bd26069fd8fbd2dea4b32f sets the kernel param for
fs.may_detach_mounts, but this is not neccessary for the daemon to
operate. Instead of erroring out (and thus aborting startup) just log
the error.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c6a2044497e0e1ff61350859c8572a2c31c17ced
Component: engine
2017-10-11 14:54:24 -04:00
2890f26aa9 Merge pull request #35150 from thaJeztah/fix-api-version-check
Return 400 error if API client is too new
Upstream-commit: 6f117e266f244b06c3e59fc6ab66c652b2e601ec
Component: engine
2017-10-11 11:26:12 -07:00
92d9dda9c1 [integration-cli] fix flaky raft test
Fixes previously flaky TestAPISwarmRaftQuorum.

In the test we are shutting down 2 of 3 nodes, all of which are managers.
When this happens the remaining node prepares to step down from being
a leader because there is no longer an active quorum. This test was
written before that change was implemented, and assumes that the
remaining node can still handle requests to create a service (it can't)

There was further flakiness depending on whether or not the node has
stepped down or was in the process of doing so. Fix this by waiting
for the node to completely step down and checking to see if it errors
out like it should.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: fd32d49c490126d830be6c1008ab20f6ffcee56c
Component: engine
2017-10-11 14:23:55 -04:00
e23a8c6c1c Update the Roadmap
As part of the Moby transition (see #35115), update the Roadmap to
reflect the new priorities. Also just update it as it was written
a while back, and we made some progress in areas such as `containerd`.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: de86d33b4a39d095e29b4857bc768363a70b3adc
Component: engine
2017-10-11 17:33:50 +01:00
c1fc769d9d Merge pull request #35113 from tych0/drop-useless-apparmor
drop useless apparmor denies
Upstream-commit: 9b9d00dd4b515918683e47fbb406d8a8f1c9cdbf
Component: engine
2017-10-11 18:12:51 +02:00
721e1b72bc Merge pull request #35170 from akimd/readme
API: minor fixes in the README
Upstream-commit: eee2df1083851f6c8e4365cd74a5997ad5f99624
Component: engine
2017-10-11 16:31:33 +02:00
68a51d42bd Merge pull request #34941 from dsheets/authz-tests-api-port
integration/plugin/authz: port tests from integration-cli
Upstream-commit: fe33ea9b0e5a295118feee0f46f45d92f8cc6103
Component: engine
2017-10-11 16:15:56 +02:00
9dcd903628 API: minor fixes in the README
The main point is to fix a non ASCII space character that wrecks the
markdown handling.

Signed-off-by: Akim Demaille <akim.demaille@docker.com>
Upstream-commit: ce58cd5a346d2ef02cd9b893e4a51f10382aaf11
Component: engine
2017-10-11 16:12:10 +02:00
cd4b6a83b5 Merge pull request #35165 from justincormack/no-logo
Remove Docker logo
Upstream-commit: 303aec061129a5e60706da6f0344018ad052eb6e
Component: engine
2017-10-11 15:05:08 +02:00
1d7efaf3d1 Remove Docker logo
No longer used as we are using the Moby logo.

Refer to #35115 for more details.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 9b87491729ad0b3e7bc2a97a1006ae43f5aef969
Component: engine
2017-10-11 13:17:59 +01:00
a5efd59e9b Merge pull request #35156 from yongtang/lego
Bring "Lego set" back in README.md
Upstream-commit: f762604fd099bc334525274138a796617c66659e
Component: engine
2017-10-11 12:05:42 +01:00
4d03b3fd97 Merge pull request #35128 from thaJeztah/fix-ContainerExecAttach-type
Use correct type for ContainerExecAttach
Upstream-commit: 8b24d2a96024d7aa35a26744ea7c7df577accc4b
Component: engine
2017-10-10 10:59:16 -07:00
41e90bb713 Merge pull request #33488 from raja-sami-10p/pkg/idtools
Increase Coverage of pkg/idtools
Upstream-commit: be4586fffd0f4eb095fd6d94ad067dbf220c1bd3
Component: engine
2017-10-10 18:37:49 +02:00
5a2940263e Merge pull request #35064 from LK4D4/replace_timer
Replace NewTimer().C with After
Upstream-commit: b6aa01570cd8d679afd716f648aeaeb35238fa79
Component: engine
2017-10-10 08:47:37 -07:00
b77f073e16 Merge pull request #35136 from ripcurld0/refactor_plugin_store_get
Refactor plugin store to reduce nested if's in Get
Upstream-commit: 34d502eb9e39847b170dc4f9d6598f6bc2627e9b
Component: engine
2017-10-10 08:07:36 -07:00
1ec5c9a00f Merge pull request #34758 from ghislainbourgeois/33495-add-tcp-to-gelf-log-driver
Add TCP support for GELF log driver
Upstream-commit: 3437f0f4e57453097c42088fcfc2ac6bf7c59170
Component: engine
2017-10-10 10:26:01 -04:00
1fb3125256 Add "Lego set" back in README.md
This PR adds the nice concept of "Lego set" back in README.md.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d3787d1fdabd1c01b1de1aa761d76f888a533a01
Component: engine
2017-10-10 14:10:39 +00:00
5c3deebf70 Merge pull request #35141 from justincormack/update-readme
Update README for Moby Project
Upstream-commit: 786311be7d011960801d713f0d01ea9d36f63170
Component: engine
2017-10-10 12:51:52 +02:00
efe89988fe Return 400 error if API client is too new
Commit e98e4a71110fd33852bb755a9b8b4ebc9df904db implemented API version
negotiation using the `/_ping` endpoint. In that change, URL validation for the
maximum supported API version was removed from the API server (validation for
the _minimum_ version was kept in place).

With this feature, clients that support version negotiation would negotiate the
maximum version supported by the daemon, and downgrade to an older API version
if the client's default API version is not supported.

However, clients that do _not_ support version negotiation can call API versions
that are higher than the maximum supported version. Due to the missing version
check, this is silently ignored, and the daemon's default API version is used.

This is a problem, because the actual API version in use is non-deterministic;
for example, calling `/v9999.9999/version` on a daemon that runs API v1.34 will
use API v1.34, but calling the same URL on an older daemon may use API version
v1.24.

This patch reverts the removal of the API check for maximum supported versions.
The documentation has been updated accordingly

Before this patch is applied, the daemon returns a 200 (success):

    $ curl -v --unix-socket /var/run/docker.sock http://localhost/v9999.9999/version
    *   Trying /var/run/docker.sock...
    * Connected to localhost (/Users/sebastiaan/Library/Containers/com.dock) port 80 (#0)
    > GET /v9999.9999/version HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.54.0
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Api-Version: 1.32
    < Content-Length: 240
    < Content-Type: application/json
    < Date: Tue, 10 Oct 2017 09:11:29 GMT
    < Docker-Experimental: true
    < Ostype: linux
    < Server: Docker/17.09.0-ce (linux)
    <
    {"Version":"17.09.0-ce","ApiVersion":"1.32","MinAPIVersion":"1.12","GitCommit":"afdb6d4","GoVersion":"go1.8.3","Os":"linux","Arch":"amd64","KernelVersion":"4.9.49-moby","Experimental":true,"BuildTime":"2017-09-26T22:45:38.000000000+00:00"}
    * Connection #0 to host localhost left intact

After this patch is applied, a 400 (Bad Request) is returned:

    $ curl -v --unix-socket /var/run/docker.sock http://localhost/v9999.9999/version
    *   Trying /var/run/docker.sock...
    * Connected to localhost (/var/run/docker.sock) port 80 (#0)
    > GET /v9999.9999/info HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.52.1
    > Accept: */*
    >
    < HTTP/1.1 400 Bad Request
    < Content-Type: application/json
    < Date: Tue, 10 Oct 2017 08:08:34 GMT
    < Content-Length: 89
    <
    {"message":"client version 9999.9999 is too new. Maximim supported API version is 1.34"}
    * Curl_http_done: called premature == 0
    * Connection #0 to host localhost left intact

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 01f9227ec9116b3969cb0725787e43a5fa26aac2
Component: engine
2017-10-10 11:17:48 +02:00
c4c23db3b4 Merge pull request #35117 from johnstep/fix-windows-manifest-lists
Stop filtering Windows manifest lists by version
Upstream-commit: 9ed0922683779a65bf729bcc2efef73d7536e543
Component: engine
2017-10-09 20:46:01 -07:00
388f100559 Merge pull request #35103 from abhi/master
Modifying integration test due to new ipam options in swarmkit
Upstream-commit: 9b8203c09678fd06aebb97e9418ca7f8ea0805ba
Component: engine
2017-10-09 19:32:41 -07:00
3730192eec Fix downlevel regression
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f9b2a20819e7b29ce4dee46d87e8c32ae7ca9899
Component: engine
2017-10-09 13:47:28 -07:00
6cafcfb61b Vendoring libnetwork and swarmkit
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Upstream-commit: 2083121b0923dd084fc92873648b7ce74f725da5
Component: engine
2017-10-09 13:08:03 -07:00
3547a4b45b Refactor plugin store to reduce nested if's in Get
This patch removes the nested if's  in the Get function
and makes the code more readable.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 36ebf9489c3c6c8422d8ff9bb6e2cb65a9a66698
Component: engine
2017-10-09 22:21:27 +03:00
0772688cf2 Merge pull request #35138 from vdemeester/foo
Carry 35078 : Fix TestErrorCases to run all tests
Upstream-commit: 513f0e6c26cfac31d41a1eb249758907950cb7be
Component: engine
2017-10-09 12:16:16 -07:00
f174f34034 Fix #34953 how volumes are pruned from daemon
- Call the function that create an event entry while volumes are
pruning.
- Pass volume.Volume type on volumeRm instead of a name. Volume lookup is done
on the exported VolumeRm function.
- Skip volume deletion when force option used and it does not exists.

Signed-off-by: Nicolas Sterchele <sterchele.nicolas@gmail.com>
Upstream-commit: 63864ad8c17f0119a38af3cb9b1bc64a8afd0584
Component: engine
2017-10-09 21:15:26 +02:00
db22136d30 Update README for Moby Project
As described in #35115 Completing the Moby Transition, we would like to complete the transition
stage that we began a while back. This tries to clarify what and who this project is for.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 737410d3f5f8579a26cfa009f4a654bbdf9ce485
Component: engine
2017-10-09 15:25:21 +01:00
9de8f7c5a8 Merge pull request #35129 from thaJeztah/add-content-length-headers
API docs: add information about Content-Length header
Upstream-commit: d9cd40d58bef2f607d4a798c99eb98cf56aab112
Component: engine
2017-10-09 06:42:54 -07:00
4d1cde4541 Fix TestErrorCases to run all tests
Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d2c41f06c36dc24b2170fef365563d64cc5bd8ec
Component: engine
2017-10-09 15:15:58 +02:00
9b23ae7d55 API docs: add information about Content-Length header
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a249ec36dd75df0fffa5d22f98422f778c60126e
Component: engine
2017-10-09 01:43:10 +02:00
016304f346 Use correct type for ContainerExecAttach
ContainerExecAttach used `types.ExecConfig` instead of `types.ExecStartCheck`,
which is the type that's expected by the `/exec/execid/start` API endpoint.

Investigating when this inconsistency was introduced, I found that the client has
sent the additional properties since its first imlpementation in
c786a8ee5e9db8f5f609cf8721bd1e1513fb0043.

The `postContainerExecStart()` at that time used the "jobs" package, which
only took the information from the body that was needed (`Detach` and `Tty`).

Commit 24425021d26f29a475702064181e6c99fb6bd1c5 refactored the Exec commands
to remove the "jobs", and introduced the `ExecStartCheck` type, but failed to
update the `cli.hijack()` call with the new type.

The change in this patch should not affect compatibility with older clients,
as the additional information from the `ExecConfig` type is not used (the
API server already decodes to the `ExecStartCheck` type).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5fee8bddfeb9b268f3e0b3c91e0932ee9a5eff83
Component: engine
2017-10-09 01:25:46 +02:00
0fea1e1271 Merge pull request #35086 from friederbluemle/fix-github-spelling
Fix GitHub spelling
Upstream-commit: 97575ecda9bce64b12ead7b588da7acebb01fa22
Component: engine
2017-10-08 23:21:26 +02:00
5fecfe49b1 Stop filtering Windows manifest lists by version
Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: 8ed8f4a71d7e1a936fa077b4348b7375c81746a6
Component: engine
2017-10-06 22:37:31 -07:00
a08850286d Merge pull request #34642 from Microsoft/jjh/add-platform-to-api
LCOW: API: Add `platform` to /images/create and /build
Upstream-commit: a3efe9722f34af5cf4443fe3a5c4e4e3e0457b54
Component: engine
2017-10-06 22:17:17 -07:00
3d973055bf LCOW: API change JSON header to string POST parameter
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d98ecf2d6cdad7dae65868398440cfdc855e5263
Component: engine
2017-10-06 15:26:48 -07:00
35db73fa01 LCOW: API: Add platform to /images/create and /build
Signed-off-by: John Howard <jhoward@microsoft.com>

This PR has the API changes described in https://github.com/moby/moby/issues/34617.
Specifically, it adds an HTTP header "X-Requested-Platform" which is a JSON-encoded
OCI Image-spec `Platform` structure.

In addition, it renames (almost all) uses of a string variable platform (and associated)
methods/functions to os. This makes it much clearer to disambiguate with the swarm
"platform" which is really os/arch. This is a stepping stone to getting the daemon towards
fully multi-platform/arch-aware, and makes it clear when "operating system" is being
referred to rather than "platform" which is misleadingly used - sometimes in the swarm
meaning, but more often as just the operating system.
Upstream-commit: 0380fbff37922cadf294851b1546f4c212c7f364
Component: engine
2017-10-06 11:44:18 -07:00
1bfeb65ddc Fix GitHub spelling
Signed-off-by: Frieder Bluemle <frieder.bluemle@gmail.com>
Upstream-commit: b80472cef449d900ca9496d97e1527556ff6a04f
Component: engine
2017-10-07 00:10:24 +08:00
70ad19f2e6 drop useless apparmor denies
These files don't exist under proc so this rule does nothing.

They are protected against by docker's default cgroup devices since they're
both character devices and not explicitly allowed.

Signed-off-by: Tycho Andersen <tycho@docker.com>
Upstream-commit: b4a6ccbc5fe695062111cad5a20bb3d0ac5a94db
Component: engine
2017-10-06 09:11:59 -06:00
f7a982fdaa Modifying swarm integration test
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Upstream-commit: 7e6b2165ef58e68ad4eafd457e8de89dd4c2c6b1
Component: engine
2017-10-05 18:20:00 -07:00
318e1046f2 Merge pull request #35090 from dmcgowan/windows-support-os-version
Add support for Windows version filtering on pull
Upstream-commit: b8571fd81c7d2223c9ecbf799c693e3ef1daaea9
Component: engine
2017-10-05 17:31:23 -07:00
dace19a103 Add support for Windows version filtering on pull
Update logic to choose manifest from manifest list to check
for os version on Windows. Separate the logic for windows
and unix to keep unix logic the same.


Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 38aef56e1fcb8ea318df98c89cf002267b88a136
Component: engine
2017-10-05 13:31:58 -07:00
8a57c20de6 Merge pull request #35088 from thaJeztah/bump-golang-to-1.8.4
Bump Go to 1.8.4
Upstream-commit: 2bc9bff86707737ff5df5f23b613d16281f9d223
Component: engine
2017-10-05 21:46:55 +02:00
6464eb5e89 Merge pull request #35022 from thaJeztah/fix-conflict-status-code
Fix conflicting container name producing 400 error instead of 409
Upstream-commit: f8806b18b4b92c5e1980f6e11c917fad201cd73c
Component: engine
2017-10-05 11:18:06 -07:00