Commit Graph

4274 Commits

Author SHA1 Message Date
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
c731e1c51c Merge pull request #27953 from thaJeztah/fix-deprecation-version
Update deprecation versions for "email" and colon in "security options"
Upstream-commit: 74bdacb908e0a49447bf81700162de4a29c4b2b6
Component: engine
2016-11-01 14:31:32 -07:00
9e9fd11160 Merge pull request #22641 from cpuguy83/build_finalization
Adds ability to flatten image after build
Upstream-commit: 22f3e43e9a35711bb63108f1714840a92a4b138e
Component: engine
2016-11-01 14:30:18 -07:00
437925ef82 Merge pull request #27929 from daehyeok/logrus_refactoring
Fix logrus formatting
Upstream-commit: bf16fa47b7fcf5133818cd12bab1c2f60ba8d363
Component: engine
2016-11-01 11:12:46 -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
a2538f5356 Update deprecation versions for "email" and colon in "security options"
These features were originally scheduled
for removal in docker 1.13, but we changed
our deprecation policy to keep features
for three releases instead of two.

This updates the deprecation version
to match the deprecation policy.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e41a39dbae007b04e12504e75ef69fb1ae6ab7c9
Component: engine
2016-11-01 09:12:27 -07: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
07a831dfc2 Fix logrus formatting
This fix tries to fix logrus formatting by removing `f` from
`logrus.[Error|Warn|Debug|Fatal|Panic|Info]f` when formatting string
is not present.

Fixed issue #23459

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: fa710e504b0e3e51d4031790c18621b02dcd2600
Component: engine
2016-10-31 22:05:01 -06:00
d5eeee5956 Optimized the indentation of codes and fix two typos
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: a9b6319e67bc4485df7210e3226d8940ab44962f
Component: engine
2016-11-01 10:35:18 +08:00
39c0d0f084 Merge pull request #27648 from dnephin/swagger-gen-operations
Generated more api types from swagger spec
Upstream-commit: 2fc760496b24cc1d42d5527ec593b0e1b1701d54
Component: engine
2016-10-31 15:33:16 -04:00
d674b1fc4d Merge pull request #27884 from Microsoft/jjh/copyfiletodot
Windows: Fix COPY file . after WORKDIR
Upstream-commit: a0629eab7302bef57c9ce9930b24f59f751303d7
Component: engine
2016-10-31 17:54:44 +01:00
cc1e62247e Merge pull request #27782 from tombooth/27779-decouple-watcher-close
Decouple removing the fileWatcher from reading
Upstream-commit: 0cdcb9ea7350b1e0a024bf40c8cf60e541f2c69f
Component: engine
2016-10-31 11:50:26 -04: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
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
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
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
27e4d0d0fb Windows: Fix COPY file . after WORKDIR
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f0b93b6ed8b4c0776065be972b4d5b4611f25fbf
Component: engine
2016-10-30 13:12:27 -07: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
4e9b278e51 Merge pull request #27840 from estesp/add-userns-status-to-info
Add "userns" to `docker info` security options output
Upstream-commit: 1fb9c4e89188f48c79889f6128fdec865bed467d
Component: engine
2016-10-29 02:58:34 +02:00
68b003581b Add "userns" to docker info security options output
If user namespaces is enabled on the daemon, reveal that via docker info
by adding "userns" to the list of security options reported by the
info endpoint.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: ae74092e450f1f2665b90257b65513cc0c19702f
Component: engine
2016-10-28 19:16:57 -04: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
c8cb7f1f85 Merge pull request #27842 from Microsoft/jjh/supportdiff
Windows: support docker diff
Upstream-commit: 9aa75016967ef36753f7e270bed03d9805b84ad8
Component: engine
2016-10-28 12:41:08 -07: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
3b745bdb00 Merge pull request #26464 from vdemeester/11065-stop-signal-and-restart-policies
Taking stop-signal into account when docker kill
Upstream-commit: 9e436c9aad389de27f008cbf404fd907b23baa25
Component: engine
2016-10-28 11:08:55 -07:00
22458c8162 Windows: support docker diff
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4fac603682747476a12dba0df79c10e919eddefb
Component: engine
2016-10-28 11:06:54 -07:00
28336d95ca Merge pull request #26659 from yongtang/26341-fixed-cidr-multiple-addresses-bridge
Fix issue for `--fixed-cidr` when bridge has multiple addresses
Upstream-commit: 1e989abefba1a424b95d3fc1474e489ace747598
Component: engine
2016-10-28 11:05:01 -07:00
bf7ee1cb20 Merge pull request #26837 from AkihiroSuda/newtmpfs
api: add TypeTmpfs to api/types/mount
Upstream-commit: 87ddc8b0a51248da4f9ab60b92901425c888282f
Component: engine
2016-10-28 19:21:26 +02: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
5355683d26 Decouple removing the fileWatcher from reading
Fixes #27779

Currently `followLogs` can get into a deadlock if we receive an inotify
IN_MODIFY event while we are trying to close the `fileWatcher`. This is
due to the fact that closing the `fileWatcher` happens in the same block
as consumes events from the `fileWatcher`. We are trying to run
`fileWatcher.Close`, which is waiting for an IN_IGNORE event to come in
over inotify to confirm the watch was been removed. But, because an
IN_MODIFY event has appeared after `Close` was entered but before the
IN_IGNORE, the broadcast never comes. The IN_MODIFY cannot be consumed
as the events channel is unbuffered and the only `select` that reads
from it is busy waiting for the IN_IGNORE event.

In order to try and fix this race condition I've moved the removal of
the `fileWatcher` out to a separate go block that waits for a signal to
close, removes the watcher and then signals to the previous selects on
the close signal.

This has introduced a `fileWatcher.Remove` in the final case, but if we
try and remove a watcher that does not exist it will just return an
error saying so. We are not doing any checking on the return of `Remove`
so this shouldn't cause any side-effects.

Signed-off-by: Tom Booth <tombooth@gmail.com>
Upstream-commit: a69a59ffc7e3d028a72d1195c2c1535f447eaa84
Component: engine
2016-10-28 10:53:38 +01: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
0b8e22519c Merge pull request #27845 from cpuguy83/experimental_checks_daemon
error out if checkpoint specified on non-experimental
Upstream-commit: 0aaef963a880476d6637ad798c30520193ee04e3
Component: engine
2016-10-27 20:42:09 -07:00
dad340cfb8 Merge pull request #25800 from vdemeester/25798-fix-event-actions
Fix 25798 : Allow "partial/prefix" filter for health_status, exec_create and exec_start events
Upstream-commit: 10d77b878c473d5e85318aa889a74f1a31559bea
Component: engine
2016-10-28 05:20:49 +02:00
e39e12ad3b Merge pull request #27839 from vdemeester/lets-clise-this
Small log formatting fixes
Upstream-commit: 5945ba64b28a371d9f82232890c8b92e8355971d
Component: engine
2016-10-28 05:20:24 +02:00
4168a25419 error out if checkpoint specified on non-experimental
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 3c0a2bb289994b190356a9753658e4cbe81a25bb
Component: engine
2016-10-27 17:43:57 -07:00
fede704b07 Merge pull request #25820 from crosbymichael/prom
Add metrics output to docker
Upstream-commit: 33474a11fea50d50c1d365b29b94b978b2b6fff7
Component: engine
2016-10-27 16:44:26 -07:00
781e5170af Fix some event filtering
Make it possible to use health_status, exec_start and exec_create as
is in event filter. This way, using `health_status` as filter will allow
to get all health_status events (healthy, unhealthy, …) instead of
having to us all combination (`health_status: healthy`, `health_status:
unhealthy`, …). Same goes for `exec_start` and `exec_create`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 71d8313ad415b8ec6efff3e88f48b5465f30c9a9
Component: engine
2016-10-27 16:14:13 -07:00
eac48da2d6 Small log formatting fixes
… and clise to close 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2f7e9078466f0d1b3a6a83cc269bce4e0a3b05f0
Component: engine
2016-10-27 15:29:24 -07:00
2a9003b823 Add basic prometheus support
This adds a metrics packages that creates additional metrics.  Add the
metrics endpoint to the docker api server under `/metrics`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add metrics to daemon package

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

api: use standard way for metrics route

Also add "type" query parameter

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Convert timers to ms

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 3343d234f3b131d4be1d4ca84385e184633a79bd
Component: engine
2016-10-27 10:34:38 -07:00
72db6e475a Fix issue for --fixed-cidr when bridge has multiple addresses
This fix tries to address the issue raised in 26341
where multiple addresses in a bridge may cause `--fixed-cidr`
to not have the correct addresses.

The issue is that `netutils.ElectInterfaceAddresses(bridgeName)`
only returns the first IPv4 address.

This fix (together with the PR created in libnetwork )
changes `ElectInterfaceAddresses()` and `addresses()`
so that all IPv4 addresses are returned. This will allow the
possibility of selectively choose the address needed.

In `daemon_unix.go`, bridge address is chosen by comparing with
the `--fixed-cidr` first, thus resolve the issue in 26341.

This fix is tested manually, as is described in 26341:
```
brctl addbr cbr0
ip addr add 10.111.111.111/20 dev cbr0 label cbr0:main
ip addr add 10.222.222.222/12 dev cbr0 label cbr0:docker
ip link set cbr0 up
docker daemon --bridge=cbr0 --iptables=false --ip-masq=false --fixed-cidr=10.222.222.222/24
docker run --rm busybox ip route get 8.8.8.8 | grep -Po 'src.*'
src 10.222.222.0
```

This fix fixes 26341.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e9c4c513d11e6c3986f8858b9a11535d61cfdf74
Component: engine
2016-10-26 20:11:29 -07:00
3b33d2d580 Do not directly cast io.ReadSeeker to io.Reader
`golint` had the following issue when linting this file:

```
daemon/logger/jsonfilelog/read.go:116:10: should omit type io.Reader
from declaration of var rdr; it will be inferred from the right-hand
side
```

In order to keep it happy changing it to an indirect assignment will
still maintain the same functionality.

Signed-off-by: Tom Booth <tombooth@gmail.com>
Upstream-commit: 6314bec641b473571c0160d85bdc70250342185a
Component: engine
2016-10-26 17:37:48 +01: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
ad6d3e7a11 cluster/container: correctly name swarm tasks
Even after a slew of PRs, this still wasn't quite right. Now, we ensure
the task name is calculared in one place in the executor, as least.

We'll have to follow this up once the `api/naming` package from SwarmKit
lands.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 3b1af1751897680d32f4685e86d5dd1d9f3720b1
Component: engine
2016-10-25 14:17:57 -07:00
c0eb6c852a Merge pull request #27747 from Microsoft/jjh/clientisolationcomment
Windows: Add comment for containers on client SKUs
Upstream-commit: ff6db320f8a411d4a8b36a89ac28a85c453905ea
Component: engine
2016-10-25 13:37:25 -07:00
5572f883e7 Merge pull request #27698 from tonistiigi/cluster-config-refactor
Refactor swarm node config to struct
Upstream-commit: 844a3166e5c8ea5037a658f1e8f0628f5abc8dce
Component: engine
2016-10-25 13:29:55 -07:00
f83bc80e97 Windows: Add comment re client containers
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 87ab13add40ef616dbfc1cd00742f650343869cc
Component: engine
2016-10-25 10:30:00 -07:00
a3de26010f Merge pull request #27525 from AkihiroSuda/prune-network-cluster
add `docker network prune`
Upstream-commit: 11cd64f0dce35ad897ede7eb29babdc487e99617
Component: engine
2016-10-25 09:02:28 -07:00