Commit Graph

99 Commits

Author SHA1 Message Date
5d994cf1a3 Merge pull request #32244 from Microsoft/jjh/panicfix
Windows - fix panic and stderr output when service
Upstream-commit: a96de091d644db1c31b699a7a22d9ef63b376560
Component: engine
2017-04-01 20:00:59 +02:00
75453ad8e7 Windows - fix panic and stderr
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 141a83b820140fac130840b2a0ea9df75ab4e55d
Component: engine
2017-03-31 09:51:50 -07:00
f66bd50c2b Merge pull request #28696 from jlhawn/deprecate_graph_flag
Deprecate --graph flag; Replace with --data-root
Upstream-commit: 1ecaed0a99331ff6140e0a714e1b50d466597775
Component: engine
2017-03-31 10:51:15 +02:00
890e256320 Merge pull request #32174 from KarthikNayak/32113
Dockerd: enable CORS when only `--api-cors-header` is used
Upstream-commit: 59aed5ab36b1b5b360aa230effbefd757e889329
Component: engine
2017-03-30 11:13:52 -04:00
719f2c6960 Add conflict check for flags, and update deprecation versions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: df7a72cffa7f28c67fb25eecd113dc21822afcc0
Component: engine
2017-03-30 12:21:05 +02:00
dcff175aff Remove constant for "config-file" flag
None of the daemon flags use a constant for the
flag name.

This patch removes the constant for consistency

Also removes a FIXME, that was now in the wrong
location, and added a long time ago in
353b7c8ec77b30fa83dac5ec0778193f6de8b437,
without a lot of context (and probably no longer really relevant).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9894576fb7e11d9536e09ca04193b845a33b9dec
Component: engine
2017-03-30 12:01:00 +02:00
fd940e1e8e Deprecate --graph flag; Replace with --data-root
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 261ef1fa27c4dfefa5f686b0a4ef354a43040e58
Component: engine
2017-03-30 11:24:56 +02:00
2b108da4a1 Dockerd: enable CORS when only --api-cors-header is used
Even though the flag `--api-enable-cors` is deprecated in favor of
`--api-cors-header`. Using only `--api-cors-header` does not enable
CORS.

Make changes to 'cmd/dockerd/daemon.go' to enable cors if either of
the above flags is set.

Signed-off-by: Karthik Nayak <Karthik.188@gmail.com>
Upstream-commit: f0f673f4d50ac072e4c7a236d2a318632c4fa89c
Component: engine
2017-03-28 18:09:14 +05:30
1faeba234d Merge pull request #31668 from Microsoft/jjh/nopidfileasservice
Windows: no pidfile when service
Upstream-commit: b47c50cf11a48c068e8794af1cd2bfebdae90995
Component: engine
2017-03-23 17:10:35 -04:00
2034662b7a When authz plugin is disabled, remove from authz middleware chain.
When the daemon is configured to run with an authorization-plugin and if
the plugin is disabled, the daemon continues to send API requests to the
plugin and expect it to respond. But the plugin has been disabled. As a
result, all API requests are blocked. Fix this behavior by removing the
disabled plugin from the authz middleware chain.

Tested using riyaz/authz-no-volume-plugin and observed that after
disabling the plugin, API request/response is functional.

Fixes #31836

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 38de272bd4dfea945985b7031cd353ac5f6507c5
Component: engine
2017-03-22 12:07:39 -07:00
5f9634b1f6 Windows: no pidfile when service
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a8e144dab4ec12eb5111df26abc87f7939faa1c3
Component: engine
2017-03-08 15:18:30 -08:00
31865190c5 'docker daemon' deprecation message doesn't use the new versioning scheme
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 5a9cee7bb57e7da7f2793fbb290498bba0531105
Component: engine
2017-03-03 17:26:49 +08:00
19d262d100 Merge pull request #31054 from darrenstahlmsft/WaitOOBE
Windows: Wait for OOBE to prevent crashing during host update
Upstream-commit: 7f0b833621f61072d3176d224be02ea5089761f9
Component: engine
2017-02-16 11:18:25 -05:00
d0f9d01ec6 Windows: Wait for OOBE to prevent crashing during host update
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: e128a65685dafd640e32118eb1903581489f7e31
Component: engine
2017-02-15 14:01:54 -08:00
6affde1e32 Merge pull request #29673 from vdemeester/extract-daemon-config
Extract daemon configuration and discovery to their own package
Upstream-commit: f3a8886d8890d6797a568ab316baf9400ee2e1e1
Component: engine
2017-02-13 09:11:13 -08:00
b0ef747023 review code about cmd/* and fix some easy typos :D
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: 437e81cd69bf1649d45650a335e121d9dfb2ddf7
Component: engine
2017-02-10 15:52:33 +08:00
dd8010e320 Extract daemon configuration and discovery to their own package
This also moves some cli specific in `cmd/dockerd` as it does not
really belong to the `daemon/config` package.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: db63f9370e26d725357c703cbaf9ab63cc7b6d0a
Component: engine
2017-02-08 09:53:38 +01:00
401f8d10fa Windows: Add service dependency ConDrv
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: b2a7f6abb379e96eb611c27a5bec10c3be854a75
Component: engine
2017-01-17 10:55:25 -08:00
8b3646ee75 plugingetter: Avoid all caps for constant declarations
Go style calls for mixed caps instead of all caps:
https://golang.org/doc/effective_go.html#mixed-caps

Change LOOKUP, ACQUIRE, and RELEASE to Lookup, Acquire, and Release.

This vendors a fork of libnetwork for now, to deal with a cyclic
dependency issue. The change will be upstream to libnetwork once this is
merged.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 428600108cce0a11e65ec4ebd9e439e947b55da7
Component: engine
2017-01-04 10:19:04 -08:00
72d129024d Move package cliconfig to cli/config
I felt it made more sence 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ce964a607ad7395af7b74a0ba1efc5ab3cb15790
Component: engine
2016-12-25 20:31:52 +01:00
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