Commit Graph

65 Commits

Author SHA1 Message Date
7994679b80 update status code for network api
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 56dca8b676cee2781021cb1138f48d42ace415a4
Component: engine
2017-04-14 10:11:17 +08:00
8df974860d Update docs of label filter for docker system prune
This fix updates docs of `label` filter for `docker system prune`.

This fix is related to #30740 and #29999, and specifically to comment
https://github.com/docker/docker/pull/30740#issuecomment-293012957.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 5b0ab45a1ef2ce52e78851f49a8390263e642263
Component: engine
2017-04-11 12:08:55 -07:00
e5fb241134 bump API and version
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: b507158c0f0c6cbee52d3ff7e0278004d3486c9d
Component: engine
2017-04-11 11:21:55 -07:00
26e209c931 Fix typo in version-history.md
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 269df77be24b0644a267f693a89ef4a794c62dd9
Component: engine
2017-04-11 15:39:01 +02:00
ba4f1c70ab Add --cpus support for docker update
This fix tries to address the issue raised in 31032 where it was
not possible to specify `--cpus` for `docker update`.

This fix adds `--cpus` support for `docker update`. In case both
`--cpus` and `--cpu-period/--cpu-quota` have been specified,
an error will be returned.

Related docs has been updated.

Integration tests have been added.

This fix fixes 31032.

This fix is related to 27921, 27958.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 61022436926a8d0c92068e8116a2ad77f43eb6d6
Component: engine
2017-04-06 15:40:12 -07:00
e25f6c5a1b Added start period option to health check.
Signed-off-by: Elias Faxö <elias.faxo@gmail.com>
Upstream-commit: e401f63735d8ebcff387c571d1f61ce52bdea86e
Component: engine
2017-04-06 12:35:34 +02:00
d79afa43f8 Allow user to modify ingress network
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: d59d19c32818ed73cc6b4d153f2858c4fe97f50e
Component: engine
2017-03-26 15:46:18 -07:00
d918c4ba81 Add --filter scope=swarm|local for docker network ls
This fix tries to address the request in 31324 by adding
`--filter scope=swarm|local` for `docker network ls`.

As `docker network ls` has a `SCOPE` column by default,
it is natural to add the support of `--filter scope=swarm|local`.

This fix adds the `scope=swarm|local` support for
`docker network ls --filter`.

Related docs has been updated.

Additional unit test cases have been added.

This fix fixes 31324.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 704ea8f6b4ad6f43c348affe357994d440aaf3de
Component: engine
2017-03-23 18:48:11 -07:00
260796fd5f Documentation for bind mount consistency flags.
Signed-off-by: Jeremy Yallop <yallop@docker.com>
Upstream-commit: 1a710c16600c76ec62ff468f99534e3779efa4a7
Component: engine
2017-03-21 11:55:33 +00:00
f6bac49560 Support --filter mode=global|replicated for docker service ls
This fix tries to address the request in 31325 by adding
`--filter mode=global|replicated` to `docker service ls`.

As `docker service ls` has a `MODE` column by default, it is natural
to support `--filter mode=global|replicated` for `docker service ls`.

There are multiple ways to address the issue. One way is to pass
the filter of mode to SwarmKit, another way is to process the filter
of mode in the daemon.

This fix process the filter in the daemon.

Related docs has been updated.

An integration test has been added.

This fix fixes 31325.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 43a1bd564b5dbd835631cda102f68286c0d533e9
Component: engine
2017-03-15 11:06:57 -07:00
61fa674abb Merge pull request #31790 from mlaventure/devicecgrouprules-api-swagger
Update swagger.yaml and api/version-history.md for DeviceCgrouprules
Upstream-commit: cec9594947c3666162e322252e4e69fbbcea096d
Component: engine
2017-03-14 16:51:09 -07:00
9aea8ad976 bump API to 1.28
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: cd173a603003f3b15f4bae13e2e27b7ee1a46942
Component: engine
2017-03-14 09:32:50 -07:00
713d7a3829 Update swagger.yaml and api/version-history.md for DeviceCgrouprules
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 6e97f11df9fa695ee1739bf55ab7166934746523
Component: engine
2017-03-14 07:24:29 -07:00
95794e3edc Merge pull request #31710 from sanimej/drillerrr
Add verbose flag to network inspect to show all services & tasks in swarm mode
Upstream-commit: cdf66ba715c573f85338a2b2a432db6cb9a48e6d
Component: engine
2017-03-13 21:12:32 -07:00
ff11389227 Enhance network inspect to show all tasks, local & non-local, in swarm mode
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Upstream-commit: 14f76a21db71c5a817cb4d1e27f9940cefd5c820
Component: engine
2017-03-13 17:52:08 -07:00
6f5f3ec34f Correct CPU usage calculation in presence of offline CPUs and newer Linux
In https://github.com/torvalds/linux/commit/5ca3726 (released in v4.7-rc1) the
content of the `cpuacct.usage_percpu` file in sysfs was changed to include both
online and offline cpus. This broke the arithmetic in the stats helpers used by
`docker stats`, since it was using the length of the PerCPUUsage array as a
proxy for the number of online CPUs.

Add current number of online CPUs to types.StatsJSON and use it in the
calculation.

Keep a fallback to `len(v.CPUStats.CPUUsage.PercpuUsage)` so this code
continues to work when talking to an older daemon. An old client talking to a
new daemon will ignore the new field and behave as before.

Fixes #28941.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Upstream-commit: 115f91d7575d6de6c7781a96a082f144fd17e400
Component: engine
2017-03-10 10:24:33 +00:00
ac66308e6c Add support for rollback flags
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 3a88a24d23e6eb1ca521cd9ab6e306d4ba1c1464
Component: engine
2017-03-03 16:33:34 -08:00
0c390668f1 Add support for the "rollback" failure action
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: cc9d04647a68cf49e66bf26f10908387b99dae1a
Component: engine
2017-03-03 16:33:34 -08:00
c09eedcd69 Merge pull request #30265 from allencloud/add-CheckDuplicate-details-and-logic
add CheckDuplicate docs and logics in network
Upstream-commit: e1da516598e6f4e8f58964fce62ff13be1d8cc09
Component: engine
2017-03-03 14:18:52 +01:00
12aa0347d6 Merge pull request #30383 from TDAbboud/30096-add-host-docker-build
Add --add-host for docker build
Upstream-commit: a64ea37753fd9a94dfa3ab81f67f46df7bd641f8
Component: engine
2017-02-27 12:42:18 +01:00
301cc805aa Merge pull request #30814 from YuPengZTE/devSwarmCliExplain
fix the type
Upstream-commit: 25500d56a5f3a94456bd8172a64bf119cc36dd7f
Component: engine
2017-02-21 00:59:58 +01:00
7dba33b4e7 Add --add-host for docker build
Signed-off-by: Tony Abboud <tdabboud@hotmail.com>
Upstream-commit: 7a962e4577628c357f96153eca07e527813fb42b
Component: engine
2017-02-20 17:32:28 -05:00
adced63586 Merge pull request #30898 from allencloud/add-link-query-in-container-rm-api-doc
add link query in container rm api doc
Upstream-commit: b89aff1afa1f61993ab2ba18fd62d9375a195f5d
Component: engine
2017-02-18 09:53:51 -08:00
043ff88c00 Update version-history.md for ReadOnly parameter
This fix updates the `docs/api/version-history.md`
for `ReadOnly` parameter, which is now available in
`POST /services/create` and `POST /services/(id or name)/update`.

This fix is a follow up to 30162.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 097b38c15d420cc467e4bc3587dfe505a4748b47
Component: engine
2017-02-17 19:18:37 -08:00
a532e48c46 fix the type
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: d735972d3150fa4e286ce468f033156fa22fddb7
Component: engine
2017-02-14 09:54:27 +08:00
6aa42ecc9e add CheckDuplicate docs and logics in network
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 94b880f919937b3995a3424a284d1f6769e60f4b
Component: engine
2017-02-13 00:34:40 +08:00
439a3c18ed add link query in container rm api doc
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 2972b99f1b0c615d5a6e3ee1645ed104cfb8fe94
Component: engine
2017-02-11 00:17:37 +08:00
388cfd9d1a bump engine API to 1.27
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 6bad3fc9fbcdef48b3b0b2fbb5cbaf530cc4db56
Component: engine
2017-02-08 16:14:58 -08:00
49889e6daa Update API history and man page for --filter expose/publish
This fix updates API history and man page for
`docker ps --filter expose/publish`, from the feedback:
https://github.com/docker/docker/pull/27557#issuecomment-276832876

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9fc393615f6aae1a70ba282123ee15afc23a6297
Component: engine
2017-02-07 08:24:46 -08:00
3f7730c74a Merge pull request #30734 from allencloud/add-400-status-code-for-events-endpoint
add status code 400 for api endpoint /events
Upstream-commit: f3da980a459c11a35248daa8a6be9919bf65fda2
Component: engine
2017-02-07 17:02:50 +01:00
8b439bbd93 Merge pull request #30701 from allencloud/add-status-code-404-for-plugin-in-api-doc
add status code 404 for plugin api endpoint enable and disable
Upstream-commit: 0113128b2a79a9cef9950e71e0681380b240faf4
Component: engine
2017-02-06 11:53:17 -08:00
8dc7e39e0a add status code 400 for api endpoint /events
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 323f575087d7e2068d74598283ec485b1f115226
Component: engine
2017-02-04 13:40:24 +08:00
cbb944b4cd add status code 404 for plugin api endpoint enable and disable
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 75f73058888347261edc4668c9d65f9ca161338d
Component: engine
2017-02-03 15:13:10 +08:00
5c3503d315 List Networks need not pull all the endpoints
Pulling all the endpoints is a very resource heavy operation especially
for Global-scoped networks with a backing KVStore. Such heavy operations
can be fetched for individual network inspect. These are unneccessary
for a simple network list operation.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: f388b7aa8af84e39347cde70691130c9417377b8
Component: engine
2017-02-02 20:19:58 -08:00
9447ebbb9d Merge pull request #30460 from yongtang/28176-attach-binary-frame-websocket
Use binary frame for websocket attach endpoint
Upstream-commit: f0089a85ecba6a31c6e00b038b18096080e516ea
Component: engine
2017-02-01 20:02:46 -08:00
38bc957cc1 Merge pull request #30203 from allencloud/validate-healthcheck-params-in-daemon-side
validate healthcheck params in daemon side
Upstream-commit: bb0a532fc21cb6b9390fb7e5eb0054bdc8045bbc
Component: engine
2017-02-01 21:19:30 -05:00
11a6f80b8b Implement optional ring buffer for container logs
This allows the user to set a logging mode to "blocking" (default), or
"non-blocking", which uses the ring buffer as a proxy to the real log
driver.

This allows a container to never be blocked on stdio at the cost of
dropping log messages.

Introduces 2 new log-opts that works for all drivers, `log-mode` and
`log-size`. `log-mode` takes a  value of "blocking", or "non-blocking"
I chose not to implement this as a bool since it is difficult to
determine if the mode was set to false vs just not set... especially
difficult when merging the default daemon config with the container config.
`log-size` takes a size string, e.g. `2MB`, which sets the max size
of the ring buffer. When the max size is reached, it will start
dropping log messages.

```
BenchmarkRingLoggerThroughputNoReceiver-8           	2000000000	        36.2 ns/op	 856.35 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputWithReceiverDelay0-8   	300000000	       156 ns/op	 198.48 MB/s	      32 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay1-8        	2000000000	        36.1 ns/op	 857.80 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay10-8       	1000000000	        36.2 ns/op	 856.53 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay50-8       	2000000000	        34.7 ns/op	 894.65 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay100-8      	2000000000	        35.1 ns/op	 883.91 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay300-8      	1000000000	        35.9 ns/op	 863.90 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay500-8      	2000000000	        35.8 ns/op	 866.88 MB/s	       0 B/op	       0 allocs/op
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 054abff3b67bb5d66323e5418a43c845a3eac8a1
Component: engine
2017-02-01 13:52:37 -05:00
b0eb082cb1 Use binary frame for websocket attach endpoint
This fix tries to address the issue raised in 28176 where
text frame was used in websocket attach endpoint. In case
the data send out contains non utf8 data, the connection
will be closed in certain browsers, e.g., Safari.

This fix address the issue by change `PayloadType` to `BinaryFrame`.

This fix is tested manually with Safari. The docker daemon is inside a Linux Virtual Machine.

Create a container with:
```
docker run -itd --name websocket busybox sh -c "while true; do echo -e 'he\\xc3\\x28o'; sleep 5; done"
```

Use the following url (172.16.66.128:2375 is the tcp address of the daemon):
```
file:///websocket.html?url=ws://172.16.66.128:2375/v1.25/containers/websocket/attach/ws?logs=1&stderr=1&stdout=1&stream=1&stdin=1
```

and the following html:
```
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Websocket</title>
  <script type="text/javascript">
    function DockerWebSocket() {
      if ("WebSocket" in window) {
        console.log("WebSocket is supported by Browser...")
        // Remove '?url=' prefix
        url = window.location.search.replace(/^(\?url=)/,"");
        console.log("URL ["+url+"]...");
        var ws = new WebSocket(url);
        ws.onopen = function() {
          console.log("Connection is opened...");
        };
        ws.onclose = function() {
          console.log("Connection is closed...");
        };
        ws.onmessage = function (e) {
          if (typeof e.data === "string") {
            alert("WebSocket received text message ["+e.data+"]!")
          } else {
            console.log("Message is received...")
            var blobReader = new FileReader();
            blobReader.onload = function(event) {
              console.log(JSON.stringify(blobReader.result))
            };
            blobReader.readAsText(e.data)
            console.log("Message complete...")
          }
        };
      } else {
        alert("WebSocket is not supported by Browser!");
      }
    }
  </script>
</head>
<body>
  <div>
    <a href="javascript:DockerWebSocket()">Run DockerWebSocket</a>
  </div>
</body>
</html>
```

This fix fixes 28176.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e82dcaab520cb5676091f31d90614d3988a725e4
Component: engine
2017-01-31 14:04:32 -08:00
5c27e35fbb validate healthcheck params in daemon side
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: e399c558e6eeef519a84a2e0bb11dade5a345014
Component: engine
2017-01-29 13:35:32 +08:00
58a26ce2d7 Merge pull request #30478 from mstanleyjones/fix_broken_links
Fix broken relative links in old API docs
Upstream-commit: 05d4c1314efd6b2ce408734aeece0e73f5d278f0
Component: engine
2017-01-27 09:45:52 -08:00
41ea58b118 Fix broken relative links in old API docs
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 37b13201c41753574942e567562f7ad098b827bf
Component: engine
2017-01-26 10:15:47 -08:00
cab1925d86 update api docs on Placement.Constraints for services
Signed-off-by: Lars-Magnus Skog <ralphtheninja@riseup.net>
Upstream-commit: 9c98bffc2b92625f113b390442b6dca245cb4be5
Component: engine
2017-01-26 15:01:21 +01:00
2b0805b53f typo: fix typo in api documents
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 2f0d4946823019d2b41a0aac7eaa6b84f8e96e49
Component: engine
2017-01-23 22:05:44 -05:00
8f27f74ad0 Update docs and code to use application/x-tar in the build API
At the "Build image from Dockerfile" section in the API docs
the Content-Type header is missing.
In addition, some parts in the code are still setting the
Content-Type header to application/tar while it was changed
to application/x-tar since 16th September 2015.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: b1996728aaeaa147c2045c8be79373d59ce7117a
Component: engine
2017-01-10 06:40:06 +02:00
a688a9fc84 Attempts -> MaxAttempts in /services/create
Signed-off-by: Lars-Magnus Skog <ralphtheninja@riseup.net>
Upstream-commit: 778eeaea2089eed1f0f113bdc73f427b4e68c572
Component: engine
2017-01-09 16:04:34 +01:00
5c56c3f06a Fix typo in docs
s/BlkioDeviceWiiteIOps/BlkioDeviceWriteIOps/g

Signed-off-by: David Xia <dxia@spotify.com>
Upstream-commit: f394b1d77614d33e85c93ecb10f0a6676538b2e7
Component: engine
2016-12-25 11:48:11 -05:00
1e12b9ad9a Merge pull request #29600 from allencloud/update-docs-about-service-update
update service update in docs
Upstream-commit: 524704143b1f27650db9debe22adb9cf1e583930
Component: engine
2016-12-22 15:17:51 +01:00
1173e9c692 Merge pull request #29637 from wxb0521/bo-docker-0.5
some punctuation errors and a verb form error
Upstream-commit: 584485abca124d45e08b618e23b7cbf7b947895f
Component: engine
2016-12-21 12:18:04 -05:00
5f8f7eaafe update service update in docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: b44efead25a1d2600f0950e5e2800c17e7489a43
Component: engine
2016-12-22 00:11:08 +08:00
b238e8e00f some punctuation errors and a verb form error
Signed-off-by: Xinbo Weng <xihuanbo_0521@zju.edu.cn>
Upstream-commit: 32996d6016a9f109a44301279d52d881651790e9
Component: engine
2016-12-21 20:05:19 +08:00