Commit Graph

2397 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
04894a8f04 Merge pull request #27596 from aaronlehmann/rolling-restart
Add force option to service update
Upstream-commit: 9058ec3be5edaa313caa02371ebe7d7ac64f2faa
Component: engine
2016-10-22 13:37:12 +02: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
39b84d5fbe Add force option to service update
Currently, there's no way to restart the tasks of a service without
making an actual change to the service. This leads to us giving awkward
workarounds as in
https://github.com/docker/docker.github.io/pull/178/files, where we tell
people to scale a service up and down to restore balance, or make
unnecessary changes to trigger a restart.

This change adds a --force option to "docker service update", which
forces the service to be updated even if no changes require that.

Since rolling update parameters are respected, the user can use
"docker service --force" to do a rolling restart. For example, the
following is supported:

   docker service update --force --update-parallelism 2 \
   --update-delay 5s myservice

Since the default value of --update-parallelism is 1, the default
behavior is to restart the service one task at a time.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c9fdf9abf8d6443598808809b900d96e04adfcb1
Component: engine
2016-10-21 17:43:27 -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
8db7952fdf Update volume type and regenerate types
generation fixed some comments.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7e7d0ab5e60ed680b8ef0461403eb2eea35cb448
Component: engine
2016-10-20 13:31:32 -07:00
0220fa6540 Generate plugin types from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6f7b69b63f172e9c687416ac1445b2c016f39ff6
Component: engine
2016-10-20 13:24:23 -07:00
3f110de0ac Add whitespace and create a script to run generation
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 02e1ffd76c517f8b9832fada9ba31445f90f2d7f
Component: engine
2016-10-20 13:24:23 -07: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
247fb589b6 Generate api/types:Port from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f06d8d6db991199ea5e5fcf527ff96f0d00c3a45
Component: engine
2016-10-20 13:24:23 -07:00
07a14ff9a8 Add swagger.yaml
Generate Volume type from the swagger.yaml
Add makefile target for generating the models

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0243936d92ea57f48c6a32beac797ee3b388ba28
Component: engine
2016-10-20 13:24:23 -07:00
dd35c23542 record pid of exec'd process
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 18083481361a4053d1081a201120a916239fc0ed
Component: engine
2016-10-20 17:06:11 +02:00
6b3066953c Show volume options for docker volume inspect
This fix tries to address the issue raised in 25545 where
volume options at the creation time is not showed up
in `docker volume inspect`.

This fix adds the field `Options` in `Volume` type and
persist the options in volume db so that `volume inspect`
could display the options.

This fix adds a couple of test cases to cover the changes.

This fix fixes 25545.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9ce8aac55e6df65bbf49c682374871a94d379bf3
Component: engine
2016-10-20 05:14:27 -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
8fcdc8e325 API changes for service rollback and failure threshold
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 67bebd6d819ef46c78092441732fe2afde04fd5b
Component: engine
2016-10-18 10:09:30 -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
b1d937a58f Merge pull request #27365 from morelena/remove_nil_check
all: remove nil check for slices
Upstream-commit: 245bd4c3d2594fae3fd5099f29eef528a4c4accd
Component: engine
2016-10-13 15:27:37 -07:00
17191e6609 all: remove nil check for slices
Signed-off-by: Elena Morozova <lelenanam@gmail.com>
Upstream-commit: ace53bbe65d1384893027d046a5d4eae83bd60af
Component: engine
2016-10-13 13:55:38 -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
fa70234a33 Merge pull request #27294 from mlaventure/hide-unused-volume-fields
Move types.Volumes optional fields under a new type
Upstream-commit: a7db0a8402c5e770501adb7a1efb82adff65e3f8
Component: engine
2016-10-11 23:55:25 +02:00
3dd231fb94 Move types.Volumes optional fields under a new type
This allows us to hide those fields when they are not filled.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: d36952749d7db1a7dac40f7ddf3ed485f23b33fc
Component: engine
2016-10-11 11:49:26 -07:00
5f64850ff1 better prune and system df
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: fd62b6c9505451670b926216648ab7f6a3f9f586
Component: engine
2016-10-11 00:42:21 +08:00
dca3d10db4 Merge pull request #26996 from Microsoft/jjh/imageinspectosversion
(Windows) Inspect image populate OSVersion
Upstream-commit: febf53d91a43fe13fbb802d9e6b7b6732183cf21
Component: engine
2016-10-07 18:33:01 +02:00
e61236d868 Inspect populate image OSVersion
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b7f537e811d40244c76da93319e3f6f30c4c88e3
Component: engine
2016-10-06 11:46:24 -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
f0f455579a Add Size and RefCount fields to types.Volume
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: c6db1e9c1b1c015a69a37e4efc570cb44d801168
Component: engine
2016-09-29 07:42:53 -07:00
8a19fb43a4 Merge pull request #26941 from runcom/docker-init-path-1
configure docker-init binary path
Upstream-commit: 9f0593990f6d8ac95a5dde312e0b7401b472cfb9
Component: engine
2016-09-28 13:12:59 +02:00
be83d1256c Merge pull request #26074 from allencloud/return-err-when-remove-container-in-progress
make client side know container removal in progress
Upstream-commit: 97d4b9c46528c2d263a448658a6cf78ffd943075
Component: engine
2016-09-27 18:48:03 +02:00
4ab44ced86 Merge pull request #26255 from Microsoft/jjh/xenon-test-infrastructure
Add isolation to info - enables Hyper-V containers CI bring-up
Upstream-commit: b881148385685f3c538a3a085207bfdf30ae9213
Component: engine
2016-09-27 18:46:51 +02:00
195692ee1c configure docker-init binary path
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 6a12685bb7eaa5744c5a115ffe12f3a4d80093bb
Component: engine
2016-09-27 14:49:17 +02:00
562ec15f92 Let swarmkit handle cluster defaults in swarm init if not specified
This fix tries to address the issue raised in 24958 where previously
`docker swarm init` will automatically fill in all the default value
(instead of letting swarmkit to handle the default).

This fix update the `swarm init` so that initial value are passed only
when a flag change has been detected.

This fix fixes 24958.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: eb19c2f080f624d8b0186f8037cdc1f7d8ada402
Component: engine
2016-09-27 04:19:38 -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
67175b8b48 Merge pull request #24634 from thaJeztah/make-network-name-required
API return network-list if no network-name or id is provided
Upstream-commit: b826bebda0cff2cc2d3083b954c810d2889eefe5
Component: engine
2016-09-27 10:20:38 +02:00
f6a08edcd6 Merge pull request #26885 from allencloud/add-swarm-types-comments-and-fix-nits
add swarm type comments and fix nits
Upstream-commit: 373d3200c257fe80ec4da1f260dc69297b31e87c
Component: engine
2016-09-26 22:33:24 +01: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
d4b8261601 add swarm type comments and fix nits
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: c1925ce34606d45f9d3b1433867a697414124d14
Component: engine
2016-09-26 17:17:52 +08: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
a034d841ce Add isolation to info
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c4e169727474f24cb0eddea15b94aaa2bfbb3281
Component: engine
2016-09-23 12:13:29 -07:00