Commit Graph

2430 Commits

Author SHA1 Message Date
3e5ee94d25 node rm can be applied on not only active node
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 002262d6f5d9d88b690124b3743db6856fe4f599
Component: engine
2016-11-02 17:22:04 +08:00
50046511ff Merge pull request #27948 from WeiZhang555/consistent-filters
Replace all "Filter" field with "Filters" for consistency
Upstream-commit: f96d45dc8ac21db1f082230e2f828a86e15cad46
Component: engine
2016-11-02 00:53:15 -07:00
6e6aed1482 Merge pull request #27908 from Microsoft/jjh/fix27601APIVersion
Windows: Require REST 1.25 or later
Upstream-commit: 70459d6f1ec98fa0aa0bf0d873838a9c4b5d3236
Component: engine
2016-11-01 14:32:32 -07:00
c7c95dc226 Adds ability to squash image after build
Allow built images to be squash to scratch.
Squashing does not destroy any images or layers, and preserves the
build cache.

Introduce a new CLI argument --squash to docker build
Introduce a new param to the build API endpoint `squash`

Once the build is complete, docker creates a new image loading the diffs
from each layer into a single new layer and references all the parent's
layers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 362369b4bbea38881402d281ee2015d16e8b10ce
Component: engine
2016-11-01 13:41:59 -04:00
9cb45952e0 Replace all "Filter" field with "Filters" for consistency
In file `api/types/client.go`, some of the "*Options{}" structs own a
`Filters` field while some else have the name of `Filter`, this commit
will rename all `Filter` to `Filters` for consistency. Also `Filters`
is consistent with API with format `/xxx?filters=xxx`, that's why
`Filters` is the right name.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 89a6966726941b4b7f0431ab214013cf9c655c25
Component: engine
2016-11-01 23:09:30 +08:00
b55dfc1ac1 Windows: Require REST 1.25 or later
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f811d5b1288583b4bb4b978e58ca0466236a9a30
Component: engine
2016-10-31 14:33:59 -07:00
2c5782817e Generate ContainerWait response from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 181562c2e54225d6ce737d98b03d3157451a5dbc
Component: engine
2016-10-31 11:19:53 -04:00
bc7bcb9601 generate AuthResponse type from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2732b8a9bb3edb92121d0b0dcc144e5f557e2fbf
Component: engine
2016-10-31 11:16:03 -04:00
1b85879c03 Generate container update response from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f196cf6a090556ccb42198043a71d133482b510d
Component: engine
2016-10-31 11:16:02 -04:00
1759ab5e8b Use IDResponse for container create response.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c8d5e7203e1ae140a5cca312b6699063b521cf83
Component: engine
2016-10-31 11:16:02 -04:00
01541139a5 Add an IDResponse type
Generated from a swagger spec and use it for container exec response

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 01883c136d9ef06962d80aa81e27d1d90eb6d199
Component: engine
2016-10-31 11:16:02 -04:00
913e9a48c1 Generate container create response from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: bad849fc826b410c3aeb753a8c7f6b38f7ae12b0
Component: engine
2016-10-31 11:16:02 -04:00
dc10e9a664 Use a config to generate swagger api types
Moves the resposne types to a package under api/types

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 29df3bdb117a058ae040686dd0f2565ae9ad743a
Component: engine
2016-10-31 11:13:41 -04:00
52c74e2725 Update to inline comments.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8f81bb92a3e528d0b5facadd55738aefc279caf8
Component: engine
2016-10-31 11:13:41 -04:00
b705a36179 Cleanup network swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 52a4737319b4008a0b636319905e2bfc7b3225ad
Component: engine
2016-10-31 11:13:41 -04:00
d19255532a Generate VolumesCreateRequest from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5c2498fd3c41f4badb1788665886d30772537f73
Component: engine
2016-10-31 11:13:41 -04:00
fa3a1f0666 Generate ErrorResponse struct from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: bc757385455dee272ca563031afece05c935320b
Component: engine
2016-10-31 11:13:41 -04:00
914619c6f3 Cleanup volume swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 84a39c0830a3c9fa91d65db201ed9a925af7bfe6
Component: engine
2016-10-31 11:13:41 -04:00
31c5c30bb3 Generate VolumeList response from the swagger spec
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d459e83b1c993d63d5f94b85a7f8ddf3ac01beae
Component: engine
2016-10-31 11:13:41 -04:00
34bac6f06e Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: e6866492c4492db3bb9546afa2fbaed20f4c1883
Component: engine
2016-10-29 15:03:26 +08:00
0be42defbd Merge pull request #24698 from jhorwit2/jah/clist-health-filter-format
Fixes #24022 - Adds container health support to docker ps filter/format
Upstream-commit: 515e5dade7a006dbd2c42880f1af695da22ece60
Component: engine
2016-10-29 06:56:06 +02:00
86df94b9ba Merge pull request #27369 from cezarsa/hc
Add --health-* flags to service create and update
Upstream-commit: f860289131e36ad2dde5ebe60d15a86fd97934b5
Component: engine
2016-10-28 21:59:52 +02:00
5b866e7f54 Adds container health support to docker ps filter
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: 1a149a0ea59b6653e0ba14599476bfe19c4c33f3
Component: engine
2016-10-28 15:43:04 -04:00
3ea22f139e Merge pull request #26709 from boucher/checkpoint-dir
Allow providing a custom storage directory for docker checkpoints
Upstream-commit: b57f321a4a6ee3e14079b2913d5f90df0be49689
Component: engine
2016-10-28 11:12:44 -07:00
c05d99582c Add --health-* commands to service create and update
A HealthConfig entry was added to the ContainerSpec associated with the
service being created or updated.

Signed-off-by: Cezar Sa Espinola <cezarsa@gmail.com>
Upstream-commit: 7bd2611789e6898576f7229255c238f7c1129293
Component: engine
2016-10-28 15:19:08 -02:00
0e3402d520 Allow providing a custom storage directory for docker checkpoints
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: bd7d51292c399edba5f339e6be55fac6c0811ff5
Component: engine
2016-10-28 07:56:05 -04:00
ecffd5b73a api: add TypeTmpfs to api/types/mount
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 18768fdc2e76ec6c600c8ab57d2d487ee7877794
Component: engine
2016-10-28 08:38:32 +00:00
47fed3161f Merge pull request #26718 from ncdc/add-logs-to-container-attach-options
Add Logs to ContainerAttachOptions
Upstream-commit: 4d2e258531a4c3f2e042c6dda79463b46f1b5880
Component: engine
2016-10-27 13:32:50 -07:00
3affb6aba8 Implementing support for --cpu-rt-period and --cpu-rt-runtime so that
containers may specify these cgroup values at runtime. This will allow
processes to change their priority to real-time within the container
when CONFIG_RT_GROUP_SCHED is enabled in the kernel. See #22380.

Also added sanity checks for the new --cpu-rt-runtime and --cpu-rt-period
flags to ensure that that the kernel supports these features and that
runtime is not greater than period.

Daemon will support a --cpu-rt-runtime flag to initialize the parent
cgroup on startup, this prevents the administrator from alotting runtime
to docker after each restart.

There are additional checks that could be added but maybe too far? Check
parent cgroups to ensure values are <= parent, inspecting rtprio ulimit
and issuing a warning.

Signed-off-by: Erik St. Martin <alakriti@gmail.com>
Upstream-commit: 56f77d5ade945b3b8816a6c8acb328b7c6dce9a7
Component: engine
2016-10-26 11:33:06 -04:00
b63aa05761 Merge pull request #27702 from tonistiigi/net-builder0
add --network option for docker build
Upstream-commit: 62ff3e90835c3c572051afbbbac53303e57a5c89
Component: engine
2016-10-25 21:50:33 -07:00
29210e7b5b add --network option for docker build
Signed-off-by: sandyskies <chenmingjie0828@163.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 60813af7aeea819ca228b6b1d6f4888969b95da3
Component: engine
2016-10-25 10:25:36 -07:00
4fb550ce0f add docker network prune
`docker network prune` prunes unused networks, including overlay ones.
`docker system prune` also prunes unused networks.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 7e24c16086a9a4f38e241e51837f2be4877c04a6
Component: engine
2016-10-25 06:43:54 +00:00
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
3c2827770b Add Logs to ContainerAttachOptions
Signed-off-by: Andy Goldstein <agoldste@redhat.com>
Upstream-commit: fc8097f957ec7ae990f84faf54bce85a399c96af
Component: engine
2016-10-19 11:39:00 -04: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