Commit Graph

35 Commits

Author SHA1 Message Date
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
bda8efbc36 Fix a race in cmd/dockerd/hack.TestHeaderOverrideHack
Fix #22940

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 1670914b8a56ab8e6ead38739fddb416b61e444f
Component: engine
2016-05-24 11:29:55 +00:00
3a35464d9d Get the Docker Engine to build clean on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
Upstream-commit: 86d8758e2bb5e9d21d454ceda90b33feb8e74771
Component: engine
2016-05-23 16:37:12 -07:00
e97c8e38c0 Ignore SIGPIPE events, resolves #19728
Using golang 1.6, is it now possible to ignore SIGPIPE events on
stdout/stderr.  Previous versions of the golang library cached 10
events and then killed the process receiving the events.

systemd-journald sends SIGPIPE events when jounald is restarted and
the target of the unit file writes to stdout/stderr. Docker logs to stdout/stderr.

This patch silently ignores all SIGPIPE events.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
Upstream-commit: 55a367d2fe2feecf7b95fbddcdcb3ed179c197fe
Component: engine
2016-05-23 15:26:41 -07:00
d17ab45ce6 Remove DOCKER_HTTP_HOST_COMPAT env var
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: 989f6f852f639404f8e86e179ce5389e2d29c5d2
Component: engine
2016-05-21 21:32:00 -07:00
6b7262967f Ignore invalid host header between go1.6 and old docker clients
BenchmarkWithHack-4	   50000	     37082 ns/op	  44.50
MB/s	    1920 B/op	      30 allocs/op
BenchmarkNoHack-4  	   50000	     30829 ns/op	  53.52
MB/s	       0 B/op	       0 allocs/op

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 3d6f5984f52802fe2f4af0dd2296c9e2e4a1e003
Component: engine
2016-05-19 21:07:45 +02:00
86a8cdbb4b Raise a more relevant error when dockerd is not available on the platform.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8983d42988ad59f1a19a0f4e9e88dfec8b1be690
Component: engine
2016-05-02 11:59:25 -04:00
56c66fb13e When exec'ing dockerd, look for it in the same directory as the docker binary first, before checking path.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9db86a38cdc183cefade48103b9ddb44ce3032fe
Component: engine
2016-05-02 11:52:50 -04:00
9d2d2e1d41 Merge pull request #22372 from dnephin/cli_cleanup
Reorganize client and cli packages
Upstream-commit: 90dfb3dacc56d789b70f5b5f3da6791465706c6c
Component: engine
2016-04-29 17:31:39 -07:00
3f31ac2b65 Merge pull request #22340 from Microsoft/jstarks/split-service
Windows: Support running dockerd as a service
Upstream-commit: f114ab21de33062c8b1db83ecd772691b9ec05c4
Component: engine
2016-04-29 10:47:20 -07:00
b5a44200d5 Remove reflection on CLI init
before:
```
$ time docker --help
real  0m0.177s
user  0m0.000s
sys 0m0.040s
```

after:
```
$ time docker --help
real  0m0.010s
user  0m0.000s
sys 0m0.000s
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5c8950e84d2384919f45209f8cc4cbf00ff29015
Component: engine
2016-04-29 11:57:46 -04:00
77424ecdbc Consolidate the files in client/
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 01a34e43b3f7a701ee1112b960740a5aaa6bdb93
Component: engine
2016-04-27 14:53:36 -04:00
63df8770d3 Cleanup the structure of the cli package.
Move all flags into cli/flags
Move usage help into cli/usage.go

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 33c9edaf6c5401fc1891713d1ad8d861e6cea51f
Component: engine
2016-04-27 14:25:47 -04:00
4fa4d37ded Windows: Support running dockerd as a service
This adds support for Windows dockerd to run as a Windows service, managed
by the service control manager. The log is written to the Windows event
log (and can be viewed in the event viewer or in PowerShell). If there is
a Go panic, the stack is written to a file panic.log in the Docker root.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 57aef3b49025aac6bb084491478eb461b14b9109
Component: engine
2016-04-26 14:04:47 -07:00
7882678c17 Make dockerd debuggable
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0c7eab31577d65f0d33766af533144e358ffe651
Component: engine
2016-04-26 09:35:22 -07:00