Commit Graph

123 Commits

Author SHA1 Message Date
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
cf0e8d8d85 Merge pull request #24533 from yongtang/24392-docker-info-label-duplicate-keys
Remove duplicate keys in labels of `docker info`
Upstream-commit: 411e7b4416fbac0601db1fa28b5152c23fcaf7bb
Component: engine
2016-10-24 18:12:28 -07:00
b9b1cc3362 Merge pull request #27697 from amitkris/fix_units_import
Correct go-units import in cli/command/formatter/stats.go
Upstream-commit: ec30cf4f14d8f8536b1b7b81e2992eb5c7021b1c
Component: engine
2016-10-24 16:59:15 -07: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
cd0bcedad7 Correct go-units import in cli/command/formatter/stats.go
from src/github.com/docker/go-units -> github.com/docker/go-units

Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
Upstream-commit: cf8a667b8d84a596a27c51608a529115b68647cc
Component: engine
2016-10-24 15:06:58 -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
36c938c12b Merge pull request #27117 from dnephin/swagger-gen
Add swagger.yaml and generate a few types from the spec
Upstream-commit: 3c385b9f6b820ae3badfbdcca589377e9a75e7fb
Component: engine
2016-10-21 18:15:28 -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
593f92302a Merge pull request #27564 from mlaventure/add-networks-format-to-ps
Add Networks placeholder to ps --format
Upstream-commit: d98f995d7d191f8ae7ab0c442eed92f67faa305b
Component: engine
2016-10-20 18:43:46 -07:00
2d76ea3864 Merge pull request #27530 from allencloud/change-join-role-display-judge
change join node role judge
Upstream-commit: 392b816199836c6cd0fe214b157d70c77b72105b
Component: engine
2016-10-20 17:46:08 -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
f52344ca81 Merge pull request #27516 from allencloud/change-remove-multi-nodes
make every node and plugin removal call api
Upstream-commit: a67a9773055b757b8b5b7b6937a6983d023688bf
Component: engine
2016-10-20 10:10:52 -07:00
10784ca4ce Add Networks placeholder to ps --format
Passing {{.Networks}} to the format parameter will prompt ps to
display all the networks the container is connected to.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: a43d9bb9c399958e64deb5e827e6716ad1ef0e41
Component: engine
2016-10-20 07:41:56 -07:00
bf1e1cd730 Exec: Add ability to set environment variables
Keeping the current behavior for exec, i.e., inheriting
variables from main process. New variables will be added
to current ones. If there's already a variable with that
name it will be overwritten.

Example of usage: docker exec -it -e TERM=vt100 <container> top

Closes #24355.

Signed-off-by: Jonh Wendell <jonh.wendell@redhat.com>
Upstream-commit: e03bf1221ee2c863f25a57af4d415e2d8ff4f26c
Component: engine
2016-10-19 12:39:25 -02:00
486047481e change join node role judge
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: e41c0370b4714892201728e0544b007e5e9f1b27
Component: engine
2016-10-19 19:47:42 +08:00
8b5b6bf896 make every node and plugin removal call api
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: c6d57ca0768fc1e89f6fe63e535c7d92610b3773
Component: engine
2016-10-19 06:40:30 +08: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
b898bdd8c2 Remove duplicate keys in labels of docker info
This fix tries to address the issue raised in 24392 where
labels with duplicate keys exist in `docker info`, which
contradicts with the specifications in the docs.

The reason for duplicate keys is that labels are stored as
slice of strings in the format of `A=B` (and the input/output).

This fix tries to address this issue by checking conflict
labels when daemon started, and remove duplicate labels (K-V).

The existing `/info` API has not been changed.

An additional integration test has been added to cover the
changes in this fix.

This fix fixes 24392.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e4c9079d091a2eeac8a74a0356e3f348db873b87
Component: engine
2016-10-18 07:45:27 -07:00
a35c353d0b Merge pull request #27476 from yuexiao-wang/fix-typos-volume
Fix some typos
Upstream-commit: 1feaeac65c8968ba2f88a1d2d17e7e775ac2ae18
Component: engine
2016-10-18 13:50:20 +01:00
e13e181560 Merge pull request #27478 from allencloud/wrap-line-in-deleted-containers
wrap line in deleted containers when pruning
Upstream-commit: 1643110ef48e6a7c0cf149d9d0ccf05a52026d10
Component: engine
2016-10-18 13:48:44 +01:00
621e0c851d Merge pull request #22566 from yongtang/22471-daemon-shutdown-timeout
Add config parameter to change per-container stop timeout during daemon shutdown
Upstream-commit: dad8cbfc2d6db45331be2cbd8f9997ab0851fccf
Component: engine
2016-10-18 14:33:09 +02:00
77c700603f Fix typs from go to Go
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 7dad9d5ce45f25750f339642d3b84a81cc2ba98e
Component: engine
2016-10-18 19:40:16 +08:00
b9c927e281 wrap line in deleted containers when pruning
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: dcb4d68092ebca6658923fa4b130ca79e121c760
Component: engine
2016-10-18 14:20:12 +08:00
fb34a38625 Merge pull request #26519 from AkihiroSuda/fix-cli-command-formatter-json-support
Fix broken JSON support in cli/command/formatter
Upstream-commit: c028a88158f0f993bc7789883be1208e94a1a6b7
Component: engine
2016-10-17 22:44:04 +01: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
e12b8f5ae9 Revert docker volume column name to VOLUME_NAME
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 862db3f191b9f1e2426b10d433270bd414ba5a48
Component: engine
2016-10-17 20:03:31 +02:00
5e0a03849e Merge pull request #27074 from cyli/bump-notary-version
Bump notary version to 0.4.2
Upstream-commit: a7c883fb04412174dfa2c31d030c643e0c20ca1d
Component: engine
2016-10-17 16:35:57 +02:00
6d715e3038 Fix broken JSON support in cli/command/formatter
How to test:

    $ docker ps --format '{{json .}}'
    $ docker network ls --format '{{json .}}'
    $ docker volume ls --format '{{json .}}'

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 3a32b587922eca87d1ab23689f407b75a8603ccb
Component: engine
2016-10-17 08:07:17 +00:00
5c9492231e Merge pull request #27236 from allencloud/return-nil-when-no-node-or-service
return nil when no node or service to avoid additional api call
Upstream-commit: 9f5ffa2a81c7490eca44a473f77cad03a1267808
Component: engine
2016-10-16 18:41:31 +02:00
3962433600 Fix API incompatibilities between notary v0.3.0 and v0.4.2:
- some function signatures have changed - use the new ones
- re-generate the notary delegation key certs, since notary doesn't allow SHA1
- fix some error message mapping because now if a root rotation fails to validate trusted operations will fail

Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 0797af39c2abb681a0e291651686872539a9e187
Component: engine
2016-10-14 17:53:34 -07:00
6f9659dfb5 Allow docker deploy command accept filename with/without extension
This fix tries to address the issue raised in 25855 where the command
`docker deploy` can only accept a STACK without extension of `.dab`.
In other words, `docker deploy hellojavaee.dab` gives an error:
```
Bundle hellojavaee.dab.dab not found. Specify the path with --file
```

This fix updates the way namespace STACK is taken so that in case
`STACK.dab` is provided with `docker deploy`:
```
$ docker deploy STACK.dab
```
The `STACK` is used as namespace (instead of `STACK.dab`).

NOTE: This fix will only allows `.dab` extension in namespace, because
it is not possible to have a namespace with `.` in the middle. In other
words, a namespace `hello.java.ee` will not work anyway (whether the file
`hello.java.ee` exists or not).

An additional integration test has been added to cover the changes.

This fix fixes 25855.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1e9d04c458e90f38c970c7937830504d2e919066
Component: engine
2016-10-14 11:44:15 -07:00
a5bfdba8fe Merge pull request #27333 from yongtang/27049-ListOpt
Use ListOpt for `docker network create --label` and `docker volume create --label`
Upstream-commit: 66177532b6aad9f127c89f21176c9dc28d0ba8d8
Component: engine
2016-10-14 00:31:09 -07:00
128dd03e48 Merge pull request #26819 from ripcurld00d/fix_stats_mutex
Hide the mutex lock in formatter.ContainerStats
Upstream-commit: ba2c13fcf55a69a67a861be6fa39a7def803f631
Component: engine
2016-10-13 17:38:22 -07:00
a29a28104a Fix the incorrect description for NewInStream
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 90bddb4243d29e11b2add2f25849fcfce7ee17ec
Component: engine
2016-10-13 22:33:09 +08:00
f1acbf81f2 Use ListOpt for docker network create --label and docker volume create --label
This fix is related to 27049 and 27047. For `--label` flag, if string slice is
used (like 27047), then quote can not be used in command and will result in
an error :
```
line 1, column 14: bare " in non-quoted-field
```

The issue 27047 has been fixed by 27049.

Recently I found out that both `docker network create --label` and `docker volume create --label`
still use string slice and will return the same error when quotes are used.

This fix fixes `docker network create --label` and `docker volume create --label`
by using `ListOpt` (as 27049) as well.

This fix has been tested and verified manually.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e3f484241dc6eebf1c36eea6ae5ff0e5a7aaadff
Component: engine
2016-10-12 16:06:34 -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
9525b615e5 return nil when no node or service to avoid additional api call
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 3af743bb329df9e044d3807cde4200ff6da7bf7c
Component: engine
2016-10-11 10:59:16 +08:00
3cabe08abe Hide the mutex in formatter.ContainerStats
The formatter.ContainerStats struct exposes its Mutex.
This is a bad design and should be fixed.

To fix that, I separated the statistics
attributes from ContainerStats to StatsEntry and
hid the mutex. Notice that the mutex protects both
the `err` field and the statistics attributes.

Then, implemented SetStatistics, SetError, GetStatistics
and GetError to avoid races.

Moreover, to make this less granular, I decided to
replace the read-write mutex with the regular mutex and
to pass a StatsEntry slice to formatter.ContainerStatsWrite

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 929a77b814dfe9ab7a11bffc2d16eebd27bd903a
Component: engine
2016-10-10 21:52:53 +03: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
1c78e3518f Merge pull request #26778 from WeiZhang555/parallel-operations
Support parallel kill,rm
Upstream-commit: 2f12d2808464dcfdf45e0920fd508ce0ff12bd29
Component: engine
2016-10-10 18:31:10 +02:00
216da195bc Add the OPTIONS and Fix the links for contain prune
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 6396c62fdc5355ff097da6a131cb176a5f521470
Component: engine
2016-10-11 00:13:33 +08: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
2e8039dc97 Merge pull request #25837 from reaperhulk/support-compressing-build-context
Add support for compressing build context during image build
Upstream-commit: f08a450ad35706900766e7766d30a90d688e410b
Component: engine
2016-10-05 12:57:46 -07:00
dcd98584e4 Merge pull request #26108 from mlaventure/data-mngt
New Data Management commands
Upstream-commit: 86de7c000f5d854051369754ad1769194e8dd5e1
Component: engine
2016-10-01 03:17:18 +00:00
02efb59787 Add support for compressing build context during image build
When sending a build context to a remote server it may be
(significantly) advantageous to compress the build context. This commit
adds support for gz compression when constructing a build context
using a command like "docker build --compress ."

Signed-off-by: Paul Kehrer <paul.l.kehrer@gmail.com>
Upstream-commit: 4825e58a96188e6a9c739c31966c8ac5a2bbd1d7
Component: engine
2016-09-30 17:46:08 -05:00
465b6ed553 Merge pull request #27049 from dnephin/fix-label-flag-type
Use ListOpt for build labels
Upstream-commit: 1b944a3025ba1eb1bfb86ed6393b7fe33de40eb6
Component: engine
2016-09-30 23:40:08 +02:00