Commit Graph

64 Commits

Author SHA1 Message Date
3c8d35d9dd Deprecate "daemon" subcommand
The daemon is in a separate (dockerd) binary
since docker 1.12, so should no longer be
used.

This marks the command as deprecated, and
adds it to the deprecated features list.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bf58dd82c31bb3a71916eec743d0560e360c6e08
Component: engine
2016-09-23 00:26:27 +02: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
d8acc366ce Move api/client -> cli/command
Using
  gomvpkg
     -from github.com/docker/docker/api/client
     -to github.com/docker/docker/cli/command
     -vcs_mv_cmd 'git mv {{.Src}} {{.Dst}}'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0640a14b4fcba3715f7cc3bc9444f3c7f4827edd
Component: engine
2016-09-08 15:46:29 -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
93e5c65732 Fix daemon command proxy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a594cd89919ab3e1aacefb4368c620e308ad0b5d
Component: engine
2016-08-26 12:19:02 -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
8c3fcf2de5 Convert docker root command to use pflag and cobra
Fix the daemon proxy for cobra commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0452ff5a4dd1b8fba707235d6f12a4038208f34b
Component: engine
2016-08-25 13:09:03 -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
0633dc391e Remove use of exec-root in plugins due to socket pathname limits.
Unix sockets are limited to 108 bytes. As a result, we need to be
careful in not using exec-root as the parent directory for pluginID
(which is already 64 bytes), since it can result in socket path names
longer than 108 bytes. Use /tmp instead. Before this change, setting:
- dockerd --exec-root=/go/src/github.com/do passes
- dockerd --exec-root=/go/src/github.com/doc fails
After this change, there's no failure.

Also, write a volume plugins test to verify that the plugins socket
responds.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 21ecd5a93db34288c0c579d5738030716d7bef2d
Component: engine
2016-07-15 09:17:29 -07:00
c47515a372 remove the second repeated line cli.api = api since api is a pointer
Signed-off-by: yuzou <zouyu7@huawei.com>
Upstream-commit: cb31d03b58e51a8ff56a04e8e0b5e17693b03f78
Component: engine
2016-07-15 11:45:30 +08:00
53c33cc1be Add --oom-score-adjust to daemon
This adds an `--oom-score-adjust` flag to the daemon so that the value
provided can be set for the docker daemon's process.  The default value
for the flag is -500.  This will allow the docker daemon to have a
less chance of being killed before containers do.  The default value for
processes is 0 with a min/max of -1000/1000.

-500 is a good middle ground because it is less than the default for
most processes and still not -1000 which basically means never kill this
process in an OOM condition on the host machine.  The only processes on
my machine that have a score less than -500 are dbus at -900 and sshd
and xfce( my window manager ) at -1000.  I don't think docker should be
set lower, by default, than dbus or sshd so that is why I chose -500.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: a894aec8d81de5484152a76d76b80809df9edd71
Component: engine
2016-07-12 15:53:15 -07:00
f06eb442e7 Implement plugin restore after daemon restart
This ensures that:

- The in-memory plugin store is populated with all the plugins
- Plugins which were active before daemon restart are active after.
  This utilizes the liverestore feature when available, otherwise it
  manually starts the plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: dfd91873056c172ffc061d882da0cd18204b521a
Component: engine
2016-06-15 13:39:33 -04:00
848e510213 plugins: experimental support for new plugin management
This patch introduces a new experimental engine-level plugin management
with a new API and command line. Plugins can be distributed via a Docker
registry, and their lifecycle is managed by the engine.
This makes plugins a first-class construct.

For more background, have a look at issue #20363.

Documentation is in a separate commit. If you want to understand how the
new plugin system works, you can start by reading the documentation.

Note: backwards compatibility with existing plugins is maintained,
albeit they won't benefit from the advantages of the new system.

Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: f37117045c5398fd3dca8016ea8ca0cb47e7312b
Component: engine
2016-06-14 14:20:27 -07:00
811cef6ca3 Add support for multiples runtimes
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 7b2e5216b89b4c454d67473f1fa06c52a4624680
Component: engine
2016-06-14 07:47:31 -07:00
be63983b3a Add Swarm management backend
As described in our ROADMAP.md, introduce new Swarm management API
endpoints relying on swarmkit to deploy services. It currently vendors
docker/engine-api changes.

This PR is fully backward compatible (joining a Swarm is an optional
feature of the Engine, and existing commands are not impacted).

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 534a90a99367af6f6bba1ddcc7eb07506e41f774
Component: engine
2016-06-13 22:16:18 -07:00
9ada0cfc5f Merge pull request #23213 from crosbymichael/restore-option
Add --live-restore flag
Upstream-commit: 3020081e94277410984c62d12f88de3d4f258681
Component: engine
2016-06-13 20:57:19 -07:00
7af900395b Add --live-restore flag
This flags enables full support of daemonless containers in docker.  It
ensures that docker does not stop containers on shutdown or restore and
properly reconnects to the container when restarted.

This is not the default because of backwards compat but should be the
desired outcome for people running containers in prod.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: d705dab1b1bd0a946d647374325d61fac57736db
Component: engine
2016-06-13 19:16:26 -07:00
5751f65265 Merge pull request #23473 from coolljt0725/fix_stop_crash
Fix shutdown daemon during daemon staring casue crash
Upstream-commit: d169f057d9007580aa7ddb3ca7fca8de1e481081
Component: engine
2016-06-13 20:08:12 +02:00
1770a37dc6 Merge pull request #23416 from dnephin/fix-daemon-help
Support running 'docker help daemon' with split binaries
Upstream-commit: 0b879b993df3332814da3c2ae3ba470df84226d2
Component: engine
2016-06-13 15:46:12 +02:00
5fe11026e0 Fix shutdown daemon during starting causes daemon crash
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 3c25656efa812a4c969c833623f3b96f86116e77
Component: engine
2016-06-13 02:10:37 -04:00
4484af9ebf Fix typo in error message
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4ace1811b4a0c0a48f1aeeba996b8096a3a4bb2d
Component: engine
2016-06-12 23:22:26 +02:00
04ae4edf2f 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.

This fix fixes #23459.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a72b45dbec3caeb3237d1af5aedd04adeb083571
Component: engine
2016-06-11 13:16:55 -07:00
89c35812ee Support running 'docker help daemon'
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2777f884f6c1cea1efa6ec2e7b6270194e425c4c
Component: engine
2016-06-09 13:22:03 -04:00
27d26eeb56 Convert 'docker create' to use cobra and pflag
Return the correct status code on flag parsins errors.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5ab24342258c70438ab8edf708ebc466b1677f38
Component: engine
2016-06-04 13:57:30 +02:00
bd8dbcc1e8 Merge pull request #22460 from jwhonce/wip/sigpipe
Ignore SIGPIPE events
Upstream-commit: 171af5493121bada5c0e8167ade44da52648d0e2
Component: engine
2016-06-02 16:05:22 +02:00
fdda20f059 Migrate volume commands to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 69264beb4093c56e8c5b256a70e1a0150294c81c
Component: engine
2016-05-31 14:41:37 -07:00
5742c6afc6 Merge pull request #23046 from mountkin/fix-23045
fix flaky test TestImportFileWithMessage
Upstream-commit: 0b5e84cc8d190520e55a80530d29c455805974af
Component: engine
2016-05-31 09:39:38 -07:00
847b3a490c fix flaky test TestImportFileWithMessage
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 9d6989bbb61cc009262ed6cf2ada92e7350a58af
Component: engine
2016-05-27 23:19:29 +08:00
9b06540d32 Merge pull request #22840 from runcom/go1.6
Upgrade to golang 1.6.2
Upstream-commit: 9b0d385975c80359b4cab2c75e4834fe803e12d5
Component: engine
2016-05-27 06:54:57 -07:00
d77d575d98 Merge pull request #22888 from ibuildthecloud/host-compat
Remove DOCKER_HTTP_HOST_COMPAT env var
Upstream-commit: ef89891855e132d3d0e4c92fa041f590c8e8198c
Component: engine
2016-05-26 14:41:22 -07:00
d552c414d4 Windows: work around Go 1.6.2/Nano Server TP5 issue
This works around golang/go#15286 by explicitly loading shell32.dll at
load time, ensuring that syscall can load it dynamically during process
startup.

Signed-off-by: John Starks <jostarks@microsoft.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: fa82c0aa10cfac8c6d5e2446876dc79b2b0c1bf9
Component: engine
2016-05-25 11:59:28 +02:00
12513175c8 Merge pull request #22091 from amitkris/build_solaris
Get the Docker Engine to build clean on Solaris
Upstream-commit: 86a7632d63bdddb95aaf1472648056a4fb737d38
Component: engine
2016-05-24 21:41:36 +02:00