Commit Graph

355 Commits

Author SHA1 Message Date
13125ff6b4 Merge pull request #17700 from calavera/remove_lxc
Remove LXC support.
Upstream-commit: 2519f465501657c24ecd13b8e53964b6c2f1a78d
Component: engine
2015-11-05 15:22:37 -08:00
f427a47755 Remove exec-driver global daemon option.
Each platform has only a driver now.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 157b66ad390902ef6f5b51b3f76d5177eacac81b
Component: engine
2015-11-05 17:09:58 -05:00
ef88e7ace2 Remove LXC support.
The LXC driver was deprecated in Docker 1.8.
Following the deprecation rules, we can remove a deprecated feature
after two major releases. LXC won't be supported anymore starting on Docker 1.10.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3b5fac462d21ca164b3778647420016315289034
Component: engine
2015-11-05 17:09:57 -05:00
b37ddbaf2b Move errcode handling for resize upper
It'll allow to separate daemon layer more cleanly later.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: bb0e7eb196c65972ea66154461b7e654d776f92a
Component: engine
2015-11-05 13:42:33 -08:00
1820467533 Remove further references to the daemon within containers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 63efc12070b2aff0f062ad62cc577cf2ffb66ef6
Component: engine
2015-11-04 12:28:54 -05:00
2b73c2cc80 Remove daemon field from container.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 444c82d19d3c8ee51f313c879d434ac5b8be6a6f
Component: engine
2015-11-04 12:27:49 -05:00
c61aec7054 Decouple daemon and container from the stats collector.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 5dc3a9a6da6ce6e3eee791251293cf045a4754f9
Component: engine
2015-11-04 12:27:49 -05:00
0e98961ec3 Decouple daemon and container to configure logging drivers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: c412300dd9f85301e2922ccc7c954eaa37fadcab
Component: engine
2015-11-04 12:27:49 -05:00
ae0ea71e8c Decouple daemon and container to cleanup containers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 019c337b93d5e068fa7c701d8b70750052503188
Component: engine
2015-11-04 12:27:48 -05:00
cf2d677f4e Decouple daemon and container to log events.
Create a supervisor interface to let the container monitor to emit events.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: ca5ede2d0a23cb84cac3b863c363d0269e6438df
Component: engine
2015-11-04 12:27:48 -05:00
8678b0dd0d Decouple daemon and container to manage volumes.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 2c72015ce3b78b45e33529368fb1c5a724415d87
Component: engine
2015-11-04 12:27:48 -05:00
ad803b2d26 Decouple daemon and container to execute processes.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: c1c42db060362e400a475dfb2884f89b86fce317
Component: engine
2015-11-04 12:27:48 -05:00
28971757bb Move Daemon.containerCopy to daemon/archive.go
It's the only place where it's used.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: ebf707ec5fc9e942b89f6405df35cd6c0fabb15b
Component: engine
2015-11-04 12:27:48 -05:00
c4c84fb5f6 Remove unused function Container.getImage.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 89decc4446ad01a5595de1b93c17c37232f8a9aa
Component: engine
2015-11-04 12:27:48 -05:00
6943fc8dc1 Remove unnecessary Container.changes function.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 6ea9a880dc434446c072ac23b1cab89ec3652140
Component: engine
2015-11-04 12:27:48 -05:00
b52340d649 Decouple daemon and container to mount and unmount filesystems.
Side effects:
- Decouple daemon and container to start containers.
- Decouple daemon and container to copy files.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3a497650464b40191bd2cde348e676acf4efe270
Component: engine
2015-11-04 12:27:47 -05:00
57930f801e Decouple daemon and container to export containers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1c94f5f53a47997f76cafb633092fce9dbdab3ea
Component: engine
2015-11-04 12:27:47 -05:00
d721eb8e53 Decouple daemon and container to pause and unpause containers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9f79cfdb2f1f6aeb64c84e7cb877fc38d052d187
Component: engine
2015-11-04 12:27:47 -05:00
41d5167da1 Decouple daemon and container to stop and kill containers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 4f2a5ba360d0b00213d31f50a5be074c89124c52
Component: engine
2015-11-04 12:27:47 -05:00
aecf79764a Move exportContainerRw to the daemon.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 581380cc6cd26f43fe5e69965873769d8dc739ef
Component: engine
2015-11-04 12:27:47 -05:00
014aae9963 Merge pull request #17630 from LK4D4/syscall_umount_warn
Do not ignore error from syscall.Unmount
Upstream-commit: c9208953fac6174bb205bd1b3705f81a602869c2
Component: engine
2015-11-03 19:58:19 -05:00
56e28325cd Merge pull request #17629 from tonistiigi/kill-autorestart-fix
Fix race causing autorestart turning off on restart
Upstream-commit: 8d5695470ae909d0abb62e10f41c6e5f342520cd
Component: engine
2015-11-03 08:24:11 -08:00
0c95e3cdf7 Fix race causing autorestart turning off on restart
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b8aaa4b07c100a338136be82292289a37b09b5e7
Component: engine
2015-11-02 18:37:55 -08:00
2f6185bd11 Merge pull request #17628 from LK4D4/umount_log_err
Log error from unmountVolumes on cleanup
Upstream-commit: 79d47c5b96c18c4497c0669c343fa05517ea3caa
Component: engine
2015-11-02 15:38:32 -08:00
8388c2e10b Do not ignore error from syscall.Unmount
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 3f10bdf100067580c35e27524b10ad06fadd0527
Component: engine
2015-11-02 14:40:29 -08:00
9400b9a7bc Merge pull request #17554 from calavera/warm_ipc_unmounts
Turn IPC unmount errors into warnings.
Upstream-commit: 944ea3134d6fd68ff33f9bdd2f5b87d458824079
Component: engine
2015-11-02 14:25:39 -08:00
74bc9966e0 Log error from unmountVolumes on cleanup
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a20fea1823ccfb40d235607e8f7ce7ceff1b5afe
Component: engine
2015-11-02 14:11:42 -08:00
7e5c1a1c97 Merge pull request #17545 from LK4D4/writehs_encode
Use json.Encoder for container.writeHostConfig
Upstream-commit: f87082f08e6b91a33e251215040350faa0d78d71
Component: engine
2015-10-30 21:11:15 -04:00
9be4647b0f Turn IPC unmount errors into warnings.
And do not try to unmount empty paths.

Because nobody should be woken up in the middle of the night for them.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: a54d5932e3a644317c77d59bc5aee562841d5c20
Component: engine
2015-10-30 19:13:52 -04:00
2631995b0b Remove unnecessary Stat check from readHostConfig
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 36a69bbc6050c5916f7267679ff7d61b5dfc5b8e
Component: engine
2015-10-30 14:54:09 -07:00
7823447431 Use json.Encoder for container.writeHostConfig
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: cf1a6c08fa03aa7020f8f5b414bb9349a9c8371a
Component: engine
2015-10-30 14:45:35 -07:00
ed2cf39b31 Merge pull request #17539 from cpuguy83/cleaner_ipc_unmount_handling
Force IPC mount to unmount on daemon shutdown/init
Upstream-commit: 23a0fe9627e6056826c7c3bf55cb0c1bfdde52bc
Component: engine
2015-10-30 14:40:42 -07:00
08c7b5a9fb Merge pull request #17528 from LK4D4/todisk_encode
Use json.Encoder for container.toDisk
Upstream-commit: 85d7bbf7aab301026741693f034b799b01f58394
Component: engine
2015-10-30 14:36:42 -07:00
aaae8eab38 Force IPC mount to unmount on daemon shutdown/init
Instead of using `MNT_DETACH` to unmount the container's mqueue/shm
mounts, force it... but only on daemon init and shutdown.

This makes sure that these IPC mounts are cleaned up even when the
daemon is killed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 78bd17e805b7514505455b10f2fd90962505a3ff
Component: engine
2015-10-30 15:41:48 -04:00
f17dd37fef Use json.Encoder for container.toDisk
* for simmetry with fromDisk
* it might be slightly better for GC because of internal sync.Pool

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: cf02b369e077022335f01b2f78ebd759129de82a
Component: engine
2015-10-30 09:29:53 -07:00
2bf3bcdc0a Windows: Adds support for Hyper-V Containers
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 15e35c447058851850155f90292e51decb482956
Component: engine
2015-10-29 16:18:52 -07:00
6c30abdc61 Extract network settings types for inspect.
Keeping backwards compatibility.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 25682577c9d29b325b4b615c4b88c132a4640082
Component: engine
2015-10-27 19:16:21 -04:00
16f288f74f Windows: Volumes PR fix one of Tibors nits
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 853f2e9952b94c52101d69003161b654a7cd4384
Component: engine
2015-10-26 13:34:49 -07:00
f7f7ce4926 Windows: Add volume support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a7e686a779523100a092acb2683b849126953931
Component: engine
2015-10-22 10:42:53 -07:00
bc80b0014f add env and labels to log context
Signed-off-by: Daniel Dao <dqminh@cloudflare.com>
Upstream-commit: 656cdbb0e96a1f8531b118caedd8e9b3d281c201
Component: engine
2015-10-12 21:12:46 +02:00
93c2a19d83 Add user namespace (mapping) support to the Docker engine
Adds support for the daemon to handle user namespace maps as a
per-daemon setting.

Support for handling uid/gid mapping is added to the builder,
archive/unarchive packages and functions, all graphdrivers (except
Windows), and the test suite is updated to handle user namespace daemon
rootgraph changes.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 442b45628ee12ebd8e8bd08497896d5fa8eec4bd
Component: engine
2015-10-09 17:47:37 -04:00
aa4d367db2 Merge pull request #16803 from tiborvass/pkg-broadcaster
Move types from progressreader and broadcastwriter to broadcaster
Upstream-commit: bea2257f926ad8e49973d695254669c159987d19
Component: engine
2015-10-08 13:51:08 -07:00
1f889ca641 Move types from progressreader and broadcastwriter to broadcaster
progressreader.Broadcaster becomes broadcaster.Buffered and
broadcastwriter.Writer becomes broadcaster.Unbuffered.

The package broadcastwriter is thus renamed to broadcaster.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 2391233404e2e6892c79a24f31cc99715c086b21
Component: engine
2015-10-06 22:20:07 -04:00
cb460a3ef9 Cleanup some issues with exec
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 561005e5ca00a8c24e83294e7005bdaf32f19d5a
Component: engine
2015-10-06 15:22:20 -04:00
69db6279aa Revert "Merge pull request #16228 from duglin/ContextualizeEvents"
Although having a request ID available throughout the codebase is very
valuable, the impact of requiring a Context as an argument to every
function in the codepath of an API request, is too significant and was
not properly understood at the time of the review.

Furthermore, mixing API-layer code with non-API-layer code makes the
latter usable only by API-layer code (one that has a notion of Context).

This reverts commit de4164043546d2b9ee3bf323dbc41f4979c84480, reversing
changes made to 7daeecd42d7bb112bfe01532c8c9a962bb0c7967.

Signed-off-by: Tibor Vass <tibor@docker.com>

Conflicts:
	api/server/container.go
	builder/internals.go
	daemon/container_unix.go
	daemon/create.go
Upstream-commit: b08f071e18043abe8ce15f56826d38dd26bedb78
Component: engine
2015-09-29 14:26:51 -04:00
bf44c732da Add context.RequestID to event stream
This PR adds a "request ID" to each event generated, the 'docker events'
stream now looks like this:

```
2015-09-10T15:02:50.000000000-07:00 [reqid: c01e3534ddca] de7c5d4ca927253cf4e978ee9c4545161e406e9b5a14617efb52c658b249174a: (from ubuntu) create
```
Note the `[reqID: c01e3534ddca]` part, that's new.

Each HTTP request will generate its own unique ID. So, if you do a
`docker build` you'll see a series of events all with the same reqID.
This allow for log processing tools to determine which events are all related
to the same http request.

I didn't propigate the context to all possible funcs in the daemon,
I decided to just do the ones that needed it in order to get the reqID
into the events. I'd like to have people review this direction first, and
if we're ok with it then I'll make sure we're consistent about when
we pass around the context - IOW, make sure that all funcs at the same level
have a context passed in even if they don't call the log funcs - this will
ensure we're consistent w/o passing it around for all calls unnecessarily.

ping @icecrime @calavera @crosbymichael

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 26b1064967d9fcefd4c35f60e96bf6d7c9a3b5f8
Component: engine
2015-09-24 11:56:37 -07:00
65bd47ac3a Merge pull request #15862 from calavera/share_shm_and_mqueue
Share shm and mqueue between containers.
Upstream-commit: 23750fb80280e6770590b0ea30781c43f42e430d
Component: engine
2015-09-24 11:23:59 -07:00
d75894fcf6 Improvements to the original sharing implementation.
- Print the mount table as in /proc/self/mountinfo
- Do not exit prematurely when one of the ipc mounts doesn't exist.
- Do not exit prematurely when one of the ipc mounts cannot be unmounted.
- Add a unit test to see if the cleanup really works.
- Use syscall.MNT_DETACH to cleanup mounts after a crash.
- Unmount IPC mounts when the daemon unregisters an old running container.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: b1d2f52bb2bb900cddb526320b13da18634fe518
Component: engine
2015-09-23 12:07:24 -04:00
99072d662d Events for OOM needs to be shift to an earlier time
It's worth to warn user as soon as possilbe when OOM happend.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: f05bacbe509823e2ca65583f35188ca09d01db80
Component: engine
2015-09-21 10:18:08 +08:00
3904dd3167 Move api/errors/ to errors/
Per @calavera's suggestion: https://github.com/docker/docker/pull/16355#issuecomment-141139220

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: a283a30fb026aad4434a9f2e34f7ce955d27a957
Component: engine
2015-09-17 11:54:14 -07:00