Commit Graph

79 Commits

Author SHA1 Message Date
478844dff8 Implement content addressability for plugins
Move plugins to shared distribution stack with images.

Create immutable plugin config that matches schema2 requirements.

Ensure data being pushed is same as pulled/created.

Store distribution artifacts in a blobstore.

Run init layer setup for every plugin start.

Fix breakouts from unsafe file accesses.

Add support for `docker plugin install --alias`

Uses normalized references for default names to avoid collisions when using default hosts/tags.

Some refactoring of the plugin manager to support the change, like removing the singleton manager and adding manager config struct.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 3d86b0c79b16334ce5836c0315e4c310b84c2e17
Component: engine
2016-12-23 13:29:58 -08:00
433a6ae35a Merge pull request #29314 from vdemeester/no-more-utils
Remove the utils package
Upstream-commit: b9ee31ae027bbd62477fea3f58023c90f051db00
Component: engine
2016-12-22 15:21:05 +01:00
8534bae85a Change -tlsverify to --tlsverify (Bug Fix: #29521)
Signed-off-by: Jaivish Kothari <janonymous.codevulture@gmail.com>
Upstream-commit: f25e5ceeca74107f7860556a94f05ed61a5442f2
Component: engine
2016-12-19 18:03:57 +05:30
d363742779 return directly without ifs in remaining packages
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 2c187a24e0003f2f0ab90b85876e668f2b6210d4
Component: engine
2016-12-14 23:28:27 +02:00
38517bb088 Move debug functions to cli/debug package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ce375503477c82a76ce8530e73655fbbf5046834
Component: engine
2016-12-12 09:33:58 +01:00
4d1ac89cc0 Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 22c83c567f379dfd475ecd35665e1cc9e5b9c314
Component: engine
2016-11-22 14:57:11 -08:00
84fb1a0844 router: Return explicit error rather than 404 for experimental.
Instead of not adding experimental routes at all, fail with an explicit
message if the daemon is not running in experimental mode.

Added the `router.Experimental` which does this automatically.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 3976a33c1a578827da3726bec3927cc058fe326a
Component: engine
2016-11-17 15:51:47 -08:00
29d6547bdb Windows: create daemon root with ACL
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 46ec4c1ae2700ed638072fd7fb326afc10eded20
Component: engine
2016-11-10 17:51:28 -08:00
fadae43674 move plugins out of experimental
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: c410222e42fb9195909390337bc129c6481e2453
Component: engine
2016-11-10 15:51:32 -08:00
4d22d82151 api: Service Logs support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 819d0159bbda1b3ae53bdaa9a3e62ac98497e24c
Component: engine
2016-11-10 13:46:02 -08:00
d0ebaa81e8 always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: e98e4a71110fd33852bb755a9b8b4ebc9df904db
Component: engine
2016-11-08 04:55:27 -08:00
6fb90ed484 Add functional support for Docker sub commands on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 934328d8ea650bf8a9c3c719999ce2a1f5dd5df6
Component: engine
2016-11-07 09:06:34 -08:00
3b23b168fa Check authz plugins are valid on daemon startup, add integration tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 2b045027ce32a8f938c83adcf5960f1bffdb3f8f
Component: engine
2016-11-02 11:20:54 -07:00
929d4f87ec Merge pull request #27700 from Microsoft/jjh/servicerestart
Windows: Set service recovery options
Upstream-commit: f81c538fec66e1dc63fd74054b9a7245d5c00e3a
Component: engine
2016-10-28 12:06: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
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
45d81820a1 Windows: Set service recovery options
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: eea679fbcc0aff9ce99e37b2251866800de0deae
Component: engine
2016-10-24 16:24:27 -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
b33468451a Merge pull request #27460 from Microsoft/jjh/dockerpid
Windows: Calculate PID file after root
Upstream-commit: ce6cfef36d6fa52df6ebdd3dd996d6bebe0f308d
Component: engine
2016-10-22 13:41:42 +02: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
4a60903d29 Merge pull request #27463 from Microsoft/jjh/runservice
Windows: Mark run-service flag as hidden
Upstream-commit: 15ea28f6db7339f8a44078f3ef70484c96eebce7
Component: engine
2016-10-18 15:51:10 +02: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
d1476e7d2c Windows: Mark run-service flag as hidden
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 102a38ceb13478351e32c9c40e31e5b3f3298e76
Component: engine
2016-10-17 12:21:31 -07:00
874ddf88be Windows: Calculate PID file after root
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 7453d028daaba786b7eaa55ce739e24becd09a33
Component: engine
2016-10-17 11:48:51 -07:00
3f0929f048 Merge pull request #27276 from yuexiao-wang/func-name
Modify function name from SetDaemonLogLevel to SetLogLevel
Upstream-commit: 62503f245f808a6847fe98a84bacfe5ed3bf5c18
Component: engine
2016-10-13 12:10:59 -07:00
d71f1080b9 Make authorization plugins use pluginv2.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: c5393ee147e981ded8fdf12c8da790abd1130175
Component: engine
2016-10-11 13:09:28 -07:00
a44c26a0a1 Modify function name from SetDaemonLogLevel to SetLogLevel
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: fe3ff54c7a87d475d5b2a799c5c85e6300c371db
Component: engine
2016-10-11 19:35:12 +08:00
d99e04e924 Write fatal error to event log if running as service
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
Upstream-commit: 40868e263d7a239aa10acd922bd69ba5a943781e
Component: engine
2016-09-19 22:36:33 +02:00
293cb24e33 Fix autostart for swarm scope connected containers
The swarm scope network connected containers with autostart enabled
there was a dependency problem with the cluster to be initialized before
we can autostart them. With the current container restart code happening
before cluster init, these containers were not getting autostarted
properly. Added a fix to delay the container start of those containers
which has atleast one swarm scope endpoint to until after the cluster is
initialized.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: c9fb551d60584ac4ad01561e2f56b7b7cc9483b9
Component: engine
2016-09-13 14:21:58 -07: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
3528fc09b1 Fix readme doc for dockerd
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 00dcbd0693482a103b0de1ae2d1cd6e9d5c84339
Component: engine
2016-09-01 14:47:51 +08:00
6e19944380 Merge pull request #25890 from cpuguy83/fix_swarm_control_sock_path
Use daemon exec root for swarm control socket
Upstream-commit: edafc642b2b12d7428e72f922a2b44c3b62ffc31
Component: engine
2016-08-30 08:51:52 -04:00
8ad0a6fe8f Fix tests and windows service.
Support args to RunCommand
Fix docker help text test.
Fix for ipv6 tests.
Fix TLSverify option.
Fix TestDaemonDiscoveryBackendConfigReload
Use tempfile for another test.
Restore missing flag.
Fix tests for removal of shlex.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6e7405ebd4df360bc84f651c977ece31283eb3ee
Component: engine
2016-08-25 13:09:36 -04:00
e263ef28d9 Remove old cli framework.
Also consolidate the leftover packages under cli.
Remove pkg/mflag.
Make manpage generation work with new cobra layout.
Remove remaining mflag and fix tests after rebase with master.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 14712f9ff0d20a3b64a60103608b8cc998909242
Component: engine
2016-08-25 13:09:04 -04:00
9d7fdddb73 Update unit tests for new cobra root command.
Cleanup cobra integration
Update windows files for cobra and pflags
Cleanup SetupRootcmd, and remove unnecessary SetFlagErrorFunc.
Use cobra command traversal

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 31bf9ca0c8cf29c1ba6cdc044e81c574161a0392
Component: engine
2016-08-25 13:09:04 -04:00
894a7b4b95 Convert dockerd to use cobra and pflag
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fb83394714a9797f8ca5a08023a89560ce6c4aa3
Component: engine
2016-08-25 13:09:03 -04:00
6a8e5f14f6 Use daemon exec root for swarm control socket
Right now docker puts swarm's control socket into the docker root dir
(e.g. /var/lib/docker).
This can cause some nasty issues with path length being > 108
characters, especially in our CI environment.

Since we already have some other state going in the daemon's exec root
(libcontainerd and libnetwork), I think it makes sense to move the
control socket to this location, especially since there are other unix
sockets being created here by docker so it must always be at a path that
works.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 4d95ea319c4905827fb66fc8da09a6a8ac558004
Component: engine
2016-08-19 16:43:57 -04:00
3fbb0152cb Merge pull request #25406 from pwzgorilla/master
use `proto` and `addr` replace `protoAddrParts[0]` and `protoAddrPart…
Upstream-commit: 3b1f82b52d53814e5ab60928de052ae2dba63f28
Component: engine
2016-08-10 14:07:30 +02:00
6e6c038441 use proto and addr replace protoAddrParts[0] and protoAddrParts[1]
Signed-off-by: mgniu <mgniu@dataman-inc.com>
Upstream-commit: dc4dcf89d885bc9bbd936337318236768dea478b
Component: engine
2016-08-10 16:03:00 +08:00
565fab494f Enable to dynamically reload authorization plugins via daemon.config
Following #22729, enable to dynamically reload/remove the daemon
authorization plugins (via standard reloading mechanism).
https://docs.docker.com/engine/reference/commandline/daemon/#daemon-
configuration-file

Daemon must store a reference to the authorization middleware to refresh
the plugin on configuration changes.

Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: 4192fe9c06d150fadfe18f228a6f9c3875227b8a
Component: engine
2016-07-30 14:59:07 +03:00
bac80b795e Merge pull request #24822 from swernli/skipV1push
Fixing v2 registry restriction for non-linux platforms.
Upstream-commit: 0eb1323fba5a46209e4aa99282129b0673c491e3
Component: engine
2016-07-29 14:18:47 -07:00
eec8319268 Rename config LiveRestore to LiveRestoreEnabled
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: b94542239313bbf960e6718c6b54bbbcbacdfffa
Component: engine
2016-07-28 17:10:40 -07:00
c6812e2679 Merge pull request #24663 from hopkings2008/repeated_api
remove the second repeated line cli.api = api since api is a pointer
Upstream-commit: d8a2568e6b3aeab8d7d11a05d3ec98cf0245211d
Component: engine
2016-07-28 16:45:30 -07:00
062b507351 Make daemon events listen for plugin lifecycle events.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 42abccb841b5bc0d420044e69165852b0054c38f
Component: engine
2016-07-26 10:51:47 -07:00
2150ea40b1 Split advertised address from listen address
There are currently problems with "swarm init" and "swarm join" when an
explicit --listen-addr flag is not provided. swarmkit defaults to
finding the IP address associated with the default route, and in cloud
setups this is often the wrong choice.

Introduce a notion of "advertised address", with the client flag
--advertise-addr, and the daemon flag --swarm-default-advertise-addr to
provide a default. The default listening address is now 0.0.0.0, but a
valid advertised address must be detected or specified.

If no explicit advertised address is specified, error out if there is
more than one usable candidate IP address on the system. This requires a
user to explicitly choose instead of letting swarmkit make the wrong
choice. For the purposes of this autodetection, we ignore certain
interfaces that are unlikely to be relevant (currently docker*).

The user is also required to choose a listen address on swarm init if
they specify an explicit advertise address that is a hostname or an IP
address that's not local to the system. This is a requirement for
overlay networking.

Also support specifying interface names to --listen-addr,
--advertise-addr, and the daemon flag --swarm-default-advertise-addr.
This will fail if the interface has multiple IP addresses (unless it has
a single IPv4 address and a single IPv6 address - then we resolve the
tie in favor of IPv4).

This change also exposes the node's externally-reachable address in
docker info, as requested by #24017.

Make corresponding API and CLI docs changes.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: a0ccd0d42fdb0dd2005f67604cb81a5a6b26787e
Component: engine
2016-07-24 09:23:07 -07:00
51a6c88912 Fixing v2 registry restriction for non-linux platforms.
This fixes the hard coded restriction for non-linux platforms to v2 registries.  Previously, the check was above the flag parsing, which would overwrite the hard coded value and prevent correct operation.  This change also removes the related daemon flag from Windows to avoid confusion, as it has no meaning when the value is going to always be hard coded to true.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: adee28458c23581ac9afb163b7cce8c6bb1d2dee
Component: engine
2016-07-20 16:14:40 -07:00
00a715516e Merge pull request #24646 from anusha-ragunathan/use-volume-plugins
Remove use of exec-root in plugins due to socket pathname limits.
Upstream-commit: ba6adc5f46ae1e979551998a02e16e3396a77402
Component: engine
2016-07-18 16:28:22 +00:00
c4e34ed5c5 Improve flag help consistency, and update docs
This adds the `--live-restore` option to the documentation.

Also synched usage description in the documentation
with the actual description, and re-phrased some
flag descriptions to be a bit more consistent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 64a8317a5a306dffd0ec080d9ec5b4ceb2479a01
Component: engine
2016-07-16 01:58:01 +02:00