Commit Graph

767 Commits

Author SHA1 Message Date
9a299b360f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 7781a1bf0fef748877326632b88e92fbf3c90daa
Component: engine
2016-10-24 15:20:01 -07:00
0e42edc6fd Merge pull request #27630 from runcom/fix-info-route
api/server/router/system: fix info versioning
Upstream-commit: b54a1d83fa9ea3c1d2903138b7f9cd04f8557c20
Component: engine
2016-10-21 18:58:10 -07:00
32b1cab2c4 api/server/router/system: fix info versioning
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 63b5a372037081175ab4ea8f3c7a7bef2195ec0b
Component: engine
2016-10-21 12:32:23 +02:00
b8b81c7fa0 Generate api/types:Image from the swagger spec
and rename it to a more appropriate name ImageSummary.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b06c3527831a585ac7e44d0b3ea060cc2092e6ef
Component: engine
2016-10-20 13:24:23 -07:00
a9ca455bda add creation timestamp to docker network inspect
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: b5bb7de5d26a49c8a3789cfcaeb8ff3e6153e708
Component: engine
2016-10-19 06:38:39 +00:00
c0eebabe70 Service update failure thresholds and rollback
This adds support for two enhancements to swarm service rolling updates:

- Failure thresholds: In Docker 1.12, a service update could be set up
  to either pause or continue after a single failure occurs. This adds
  an --update-max-failure-ratio flag that controls how many tasks need to
  fail to update for the update as a whole to be considered a failure. A
  counterpart flag, --update-monitor, controls how long to monitor each
  task for a failure after starting it during the update.

- Rollback flag: service update --rollback reverts the service to its
  previous version. If a service update encounters task failures, or
  fails to function properly for some other reason, the user can roll back
  the update.

SwarmKit also has the ability to roll back updates automatically after
hitting the failure thresholds, but we've decided not to expose this in
the Docker API/CLI for now, favoring a workflow where the decision to
roll back is always made by an admin. Depending on user feedback, we may
add a "rollback" option to --update-failure-action in the future.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 6d4b527699b3e95d21d79f6b327252a6cdaca5b0
Component: engine
2016-10-18 10:09:50 -07:00
15c4940651 Update docker stop and docker restart to allow not specifying timeout and use the one specified at container creation time.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cc703784f39fb3f585ec685cf7aeda6410648446
Component: engine
2016-10-17 12:53:35 -07:00
4b9781e130 all: replace loop with single append
Signed-off-by: Elena Morozova <lelenanam@gmail.com>
Upstream-commit: 64238fef8c7b739a2ae5648386cf594eb3a162e5
Component: engine
2016-10-13 13:31:52 -07:00
75a301f015 Windows: Support credential specs
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e85867cb68cc28208c91bb43fc5cdcff824c468e
Component: engine
2016-10-06 09:32:22 -07:00
ad7e3acff8 Merge pull request #27154 from pwzgorilla/master
typo: modified `Server` as `Serve`
Upstream-commit: ed72c65a2a608957f8fe0b978755b705209c6a73
Component: engine
2016-10-05 07:03:18 -04:00
6ee0f7a61c typo: modified Server as Serve
Signed-off-by: mgniu <mgniu@dataman-inc.com>
Upstream-commit: 97a4548bb3ff45f5f965e2b92f4eea426c01bd5b
Component: engine
2016-10-05 12:20:31 +08:00
aaee5183a9 api/server/httputils: compile with go < 1.7
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: d1d505fa701bfe28a59afee8158994cf33ef043c
Component: engine
2016-10-04 12:01:49 +02:00
f4148f6920 Merge pull request #26960 from allencloud/make-remove-cloudprovider-network-return-204
make remove cloudprovider network return 204
Upstream-commit: 8b416fb0256c619c0ea6ac5c8efd94187f446cdd
Component: engine
2016-10-03 14:46:11 -04:00
3d025590b1 Merge pull request #27060 from yongtang/27021-inspect-show-env
Disable HTML escaping for JSON strings in `docker inspect`
Upstream-commit: 420e22fad4dcdff3b8025666216cc85fc9358f69
Component: engine
2016-10-02 14:32:56 +02:00
9a44b50701 make remove network return 204
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: ea07ef7a7c3a221d6167cc2e36806ed9615ac973
Component: engine
2016-10-01 19:50:40 +08:00
e6c766802a Disable HTML escaping for JSON strings in docker inspect
This fix tries to address the issue raised in 27021 where
HTML strings like (`&, >, <, etc`) in environmental variables
are escaped for JSON output for `docker inspect`. For example,
`TEST_ENV="soanni&rtr"` has been escaped to `TEST_ENV="soanni\u0026rtr"`

This fix disabled HTML escaping with `SetEscapeHTML`, which is available
since golang 1.7.0. This changes will be applied to all JSON output
that utilize `httputils.WriteJSON`.

An integration test has been added to cover the changes.

This fix fixes 27021.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0fa20ad13b0b5c6d1bf8a8285717c07697d079ba
Component: engine
2016-09-29 18:16:36 -07:00
2850aab072 Add /{containers,volumes,images}/prune API endpoint
These new endpoints request the daemon to delete all resources
considered "unused" in their respective category:
  - all stopped containers
  - all volumes not attached to any containers
  - images with no associated containers

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 33f4d68f4dc0506382c31b908905480ab0e559fa
Component: engine
2016-09-29 07:42:53 -07:00
04e5c4c974 Add /system/df API endpoint
This endpoint return data regarding the space used by docker on disk

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: f2e11fb8d1284626d40bb916ad6a21a316e5ab9c
Component: engine
2016-09-29 07:42:53 -07:00
8c08789756 Update Images() to allow retrieving specific image size data
Those data include:
 - size of data shared with other images
 - size of data unique to a given image
 - how many containers are using a given image

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: b717de5153db503fae61c11e30f04f400f66a6fd
Component: engine
2016-09-29 07:42:53 -07:00
672761b64e make client side know container removal in progress
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 9a58f298d182945eb2b820e5e3539b754fdaa751
Component: engine
2016-09-27 18:06:54 +08:00
6352e3e776 API return network-list if no network-name or id is provided
When calling the /networks/ endpoint with a trailing
slash, the default network was returned.

This changes the endpoint to return the list of networks
instead (same response as `/networks` without trailing
slash).

Also updated the description for GetNetworkByName to
explain that the "default" network is returned if
no name or id is provided.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6ad4bf0a533f8851b0ddccb56fe3b457819f6146
Component: engine
2016-09-26 21:44:34 +02:00
356aff7cd8 Merge pull request #26839 from tonistiigi/build-cache
Implement build cache based on history array
Upstream-commit: 7944480dd0dfb00323f960d37c31d0ddad5f6cf2
Component: engine
2016-09-26 17:31:49 +00:00
d8e01f6cf0 display no id in log when service creating fails
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6ae8c83ebe253104e9471aaa6e80c5acf24b1d9e
Component: engine
2016-09-26 16:23:28 +08:00
cc3c0d322a Implement build cache based on history array
Based on work by KJ Tsanaktsidis

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: KJ Tsanaktsidis <kjtsanaktsidis@gmail.com>
Upstream-commit: 690882c2e79c3f3742c709cf158584e61594ba00
Component: engine
2016-09-23 11:30:06 -07:00
f557e61a5e change-code-and-fix-docs-about-checkpoint
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 9b4ba34d046fc9fd65fc060af016d2b2b9b95957
Component: engine
2016-09-23 19:37:43 +08:00
e90292dd20 Use apiError in server version middleware.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: bcb0405239e0c820516b05ccc2bb7e8d4a1599f9
Component: engine
2016-09-16 12:27:14 -04:00
d47b1c8a71 Move errors/ to api/errors
Using:
        gomvpkg -from github.com/docker/docker/errors
                -to github.com/docker/docker/api/errors
                -vcs_mv_cmd "git mv {{.Src}} {{.Dst}}"

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c452e1bfe6b19d44bf2ed2a1eb8aef7e23d6bafb
Component: engine
2016-09-16 12:27:13 -04:00
982e83123e Fix the clashing route syntax for checkpoint/container delete.
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: 0dfbf960d72fc3f7deec02cc3f36385361216794
Component: engine
2016-09-08 21:31:56 -04:00
7bef93723c Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: d8fef66b03c1ea8715470690efbd950033f7f628
Component: engine
2016-09-08 21:31:52 -04:00
f0d30a4b26 Add support for docker run in swarm mode overlay
This PR adds support for running regular containers to be connected to
swarm mode multi-host network so that:
    - containers connected to the same network across the cluster can
      discover and connect to each other.
    - Get access to services(and their associated loadbalancers)
      connected to the same network

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: 99a98ccc14a9427be47c8006e130750710db0a16
Component: engine
2016-09-07 21:20:41 -07:00
60a22c207c Move engine-api client package
This moves the engine-api client package to `/docker/docker/client`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 7c36a1af031b510cd990cf488ee5998a3efb450f
Component: engine
2016-09-07 11:05:58 -07:00
45ddc4bfcb Add engine-api types to docker
This moves the types for the `engine-api` repo to the existing types
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 91e197d614547f0202e6ae9b8a24d88ee131d950
Component: engine
2016-09-07 11:05:58 -07:00
d354343b40 delete a function which isn't used in the project
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: 81849600fc1d7335f1ddc3ca5aa1cb5625bd2d30
Component: engine
2016-09-02 22:54:19 +08:00
1965814a4e vendor docker/engine-api@f9cef59044
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 8f7a8c75ae251f1260299892c5de7c83224b110e
Component: engine
2016-08-31 22:39:13 +02:00
75a4cd19f2 Fix golint errors in api
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c8ce0856b752cecb2f2a2149b79e6e96a63f03dc
Component: engine
2016-08-29 13:36:16 -07:00
63926fbdf3 Merge pull request #26055 from mavenugo/ndn
Support container disconnect for non-existing network
Upstream-commit: 9ea28ea8944744d9dc8f50bdc1733868fda6ce7f
Component: engine
2016-08-28 01:48:02 +00:00
8bee71dfee Support container disconnect for non-existing network
There are cases such as migrating from classic overlay network to the
swarm-mode networking (without kv-store), such a mechanism to allow
disconnecting a container even when a network isnt available will be
useful.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 05a3f2666ee34c2dfa04663bbdda3c7763b001d8
Component: engine
2016-08-26 16:48:52 -07:00
a2fd7a06e8 Merge pull request #25650 from pwzgorilla/master
replace `handleWithGlobalMiddlewares` with `handlerWithGlobalMiddlewa…
Upstream-commit: e875370af81474d9df09433404ef79e403ba1b2f
Component: engine
2016-08-26 09:51:51 -07:00
7f172d7bce change comment
Signed-off-by: mgniu <mgniu@dataman-inc.com>
Upstream-commit: c5ecf1e6fe98cbf9a20d59f9ca5eb69f9c72210b
Component: engine
2016-08-26 18:30:41 +08:00
a603b90d7f Add --force in docker volume rm to fix out-of-band volume driver deletion
This fix tries to address the issue in raised #23367 where an out-of-band
volume driver deletion leaves some data in docker. This prevent the
reuse of deleted volume names (by out-of-band volume driver like flocker).

This fix adds a `--force` field in `docker volume rm` to forcefully purge
the data of the volume that has already been deleted.

Related documentations have been updated.

This fix is tested manually with flocker, as is specified in #23367.
An integration test has also been added for the scenario described.

This fix fixes #23367.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6c5c34d50d377d1c5318a255240fb2dc9c23cf92
Component: engine
2016-08-18 18:01:25 -07:00
294f10b578 Don't confuse with empty body
It fails with any (even empty) json request body.

Signed-off-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
Upstream-commit: 57db05cb1031f6a01e1568ceb16434e5809aef81
Component: engine
2016-08-17 02:01:04 +03:00
a0933c7d27 Merge pull request #25721 from cpuguy83/revendor_engine-api
revendor engine-api
Upstream-commit: 37302bbb3f4889e9de2a95d5ea018acdab9e4447
Component: engine
2016-08-16 17:18:43 -04:00
3dcc0abf19 revendor engine-api
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 6d98e344c7702a8a713cb9e02a19d83a79d3f930
Component: engine
2016-08-16 14:16:12 -04:00
720eb363bf Merge pull request #25564 from coolljt0725/fix_inspect_network
Fix inspect network show gateway with mask
Upstream-commit: d8240c8e27b625c6c2b7982e2473cce46e2a9ddc
Component: engine
2016-08-12 11:11:09 +02:00
c3fa308195 replace handleWithGlobalMiddlewares with handlerWithGlobalMiddlewares
Signed-off-by: mgniu <mgniu@dataman-inc.com>
Upstream-commit: e743ab088289756979e2971b41cf1de9bf320643
Component: engine
2016-08-12 10:53:11 +08:00
8eacfa50f9 Fix inspect network show gateway with mask
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 096bb5fb0740656b91b3e35f8df23c79270f7f90
Component: engine
2016-08-11 21:08:54 -04:00
139163d715 Return application/json for image/load API (quite=1)
This fix tries to address the issue raised in 25529 wehre the
image/load API returns `application/json` for quiet=0 and
`text/plain` for quite=1.

This fix makes the change so that `application/json` is returned
for both quiet=0 and quite=1.

This fix has been tested manually.

This fix fixes 25529.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 2f27632cde2f0e514bd3a8de77cc1934e5193a83
Component: engine
2016-08-09 17:55:42 -07:00
d5f439ee89 Add --force to docker plugin remove
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 0016b331dac94661678fd7676c7b6ccc9ec2d147
Component: engine
2016-08-04 15:55:45 -07:00
86ea274c7e Mask join tokens in daemon logs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e3917c76ce6f75e6c12cd2099d403fdaba8ab218
Component: engine
2016-08-02 15:15:23 -07:00
0e5400a423 Add --force to node removal
Signed-off-by: Diogo Monica <diogo.monica@gmail.com>
Upstream-commit: a327c231b5c68c13b7dcde2fdc83b8e4cec59c43
Component: engine
2016-08-01 18:55:58 -07:00