Commit Graph

60 Commits

Author SHA1 Message Date
c9cc850112 Fix a leaked process handle of the first container to start on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 717209c9ffc5caa4782dfda39e7be9a7b581a42c
Component: engine
2016-05-25 21:33:50 -07:00
37e80ffc41 Windows: Use image version, not OS version for TTY fixup
A previous change added a TTY fixup for stdin on older Windows versions to
work around a Windows issue with backspace/delete behavior. This change
used the OS version to determine whether to activate the behavior.
However, the Windows bug is actually in the image, not the OS, so it
should have used the image's OS version.

This ensures that a Server TP5 container running on Windows 10 will have
reasonable console behavior.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 6508c015fe764fd59438cabffcbc6102c9cf04ef
Component: engine
2016-05-25 12:22:52 -07:00
ecdb255cd3 Merge pull request #22958 from Microsoft/hcs_rpc
Windows: Use the new HCS RPC API
Upstream-commit: c7ee50308290d56b70933dfd83bd70e3a9df93d5
Component: engine
2016-05-25 09:25:22 -07:00
d8cc018311 Change Docker to use the new HCS RPC API
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 959c1a52bf11dd6b3e65f10bbaa867bfabba6838
Component: engine
2016-05-24 16:36:51 -07: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
d6f4430048 Merge pull request #22541 from crosbymichael/graph-restore
Implement graph driver restore on reboot
Upstream-commit: d7dfe9103bfc275494d936a5d89f3067b0aedbc9
Component: engine
2016-05-23 22:57:23 -07: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
e6822e5504 Remove restart test
This test is not applicable anymore now that containers are not stopped
when the daemon is restored.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 31e903b0e17d01a4240f7890218a80088d32658c
Component: engine
2016-05-23 15:57:23 -07:00
2b52cbdf3e Restore ref count
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 009ee16beff4f6d3607fa251019908cc72ce0a34
Component: engine
2016-05-23 15:57:23 -07:00
fc3bf55518 Windows: Work around Windows BS/DEL behavior
In Windows containers in TP5, DEL is interpreted as the delete key, but
Linux generally interprets it as backspace. This prevents backspace from
working when using a Linux terminal or the native console terminal
emulation in Windows.

To work around this, translate DEL to BS in Windows containers stdin when
TTY is enabled. Do this only for builds that do not have the fix in
Windows itself.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: f124829c9b35377de2a8316b7e23aa7a8c5d7b23
Component: engine
2016-05-20 19:04:20 -07:00
58e7931a34 Fixing Windows update logic.
Removing the call to Shutdown from within Signal in order to rely on waitExit handling the exit of the process.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: a5b64f2847501bc377c77a989df060646f2d87f8
Component: engine
2016-05-12 17:45:53 -07:00
e7146eaec9 Merge pull request #22544 from Microsoft/jjh/terminate
Windows: Terminate on failed shutdown, fixes dockerd deadlock
Upstream-commit: e811e9784fd95069e9d5e14960e04cb0499ccd1d
Component: engine
2016-05-12 14:46:56 -07:00
3f5fe19aa9 Windows: Terminate on failed shutdown
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: feacb1205b2cf9166e75e707d7b5fa2d09e80e03
Component: engine
2016-05-10 10:09:50 -07:00
dbf25e32d6 Fix containerd proto for connection
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 6889c3276c6895a8440dc8883b8cd608793199f3
Component: engine
2016-05-09 15:17:10 -07:00
cf5ef9f29e Merge pull request #22046 from cpuguy83/containerd_stdio
Set containerd pdeathsig
Upstream-commit: 9a9ebc7f85319fabbdcc98cfed10d77ac896f0f1
Component: engine
2016-05-06 09:26:16 +02:00
591507ba0c Set Pdeathsig for containerd on SIGKILL
Makes sure containerd exits (when started by docker) if docker gets
SIGKILL'd.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d4559313d5b0284bf2544d83e6431873c06f8349
Component: engine
2016-05-02 14:23:38 -04:00
f770cdfb66 Remain extra \n on INFO log msg
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 1e44bba4af6c417e10cbf7aa459a8225dfb89d6c
Component: engine
2016-04-27 05:19:40 -07:00
452a7d0ba9 Adding servicing update to postRunProcessing for Windows containers.
This change enables the workflow of finishing installing Windows OS updates in the container after it has completed running, via a special servicing container.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: da92dad59f76421a22a955d2aed25bfeb4562385
Component: engine
2016-04-25 12:16:26 -07:00
e49ce8b3dd Merge pull request #22125 from crosbymichael/restart-timeout
Reset restart timeout if execution longer than 10s
Upstream-commit: 17d5c97c900d90bee7a1ba4182bf9ea51e5c386d
Component: engine
2016-04-25 19:15:32 +02:00
423557cc6f Merge pull request #22256 from mlaventure/use-abs-rootfs-path
Use absolute path for rootfs in OCI config.json
Upstream-commit: 885e5eb5f7784f9e5d218d4446595609f83304a8
Component: engine
2016-04-23 13:21:21 +02:00
c197f20a8a Reset restart timeout if execution longer than 10s
Restore the 1.10 logic that will reset the restart manager's timeout or
backoff delay if a container executes longer than 10s reguardless of
exit status or policy.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: b6db56b5eba00c4e8ad7a6f6c5b018e15dc883eb
Component: engine
2016-04-22 10:37:34 -07:00
cab428e780 Use absolute path for rootfs in OCI config.json
This avoid an extra bind mount within /var/run/docker/libcontainerd

This should resolve situations where a container having the host
/var/run bound prevents other containers from being cleanly removed
(e.g. #21969).

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 313587454334f455334dac8d32cfb96f949a29a0
Component: engine
2016-04-22 10:07:33 -07:00
50fc6aee46 Fix config cleanup on canceling restartmanager
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 7bf07737b90f087271b5a9a3a1c8d262c154554f
Component: engine
2016-04-21 15:33:09 -07:00
aeb44b5505 Merge pull request #22171 from mlaventure/always-disable-metrics
Always disable containerd metrics when started by docker
Upstream-commit: ccf83c94d18df4b27ca3d46ffbe008df76aa3275
Component: engine
2016-04-21 01:38:07 +02:00
a950119eaf Always disable containerd metrics when started by docker
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 42f9c25b5168e3bc8e19003cd8bfd4eabbad654c
Component: engine
2016-04-19 13:37:18 -07:00
0a813c13d3 Merge pull request #22123 from crosbymichael/restart-canceled
Remove restart canceled error
Upstream-commit: ab6b82b85668eaa5be5ee1ba04febfae5fcec433
Component: engine
2016-04-19 16:28:33 -04:00
ba66548e04 Remove restart canceled error
It should not be an error to call a common option to cancel restarts.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: fc2e2234c614379d21c16e32c1b82e7819fc3eac
Component: engine
2016-04-19 10:46:21 -07:00
089a9530bf Merge pull request #22121 from tonistiigi/fix-exec-cleanup
Clean up exec fifos on process exit
Upstream-commit: 2f7df8e5dec7c4ab121d0ea0d337b5cc4c3d5c77
Component: engine
2016-04-19 09:45:54 -07:00
b394d53e14 Clean up exec fifos on process exit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 84d170129a19855829d282e5416ce08ddb2edbd6
Component: engine
2016-04-18 14:03:37 -07:00
93eb6e71f1 Merge pull request #21993 from coolljt0725/quiet_restartmanger_cancel
Don't throw "restartmanager canceled" error for no restart policy container
Upstream-commit: a4030787f537e79242888cc3fd8b5f3f51ce357f
Component: engine
2016-04-18 14:38:01 -04:00
f63a31e0b9 Remove rpc error when shut down daemon
RPC connection closing error will be reported every time we shutdown
daemon, this error is expected, so we should remove this error to avoid
confusion to user.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: a02ae66d361464cc24bec4fb6aa5778c9d5b8cda
Component: engine
2016-04-16 16:53:33 +08:00
d060054c87 Don't throw "restartmanager canceled" error for no restart policy container
Don't throw "restartmanager canceled" error for no restart policy container
and add the container id to the warning message if a container has restart policy
and has been canceled.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 494297baf8f391ce73cdc2e885a335a266261970
Component: engine
2016-04-14 21:40:20 -04:00
312476d137 Windows: Timeout TestContainerApiPostContainerStop
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d691b4af18ffbab68fb1aab3939e65b59c3e4c2a
Component: engine
2016-04-12 18:21:54 -07:00
78ecc63dec Windows: Support embedded utility VM images
For TP5, the utility VM for Hyper-V containers is embedded in the base
layer's contents.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: c70f153f52c8ca75a395d4dc1c4a5759871ada19
Component: engine
2016-04-11 17:16:17 -07:00
c018129666 Fix ShouldRestart for on-failure handle
Currently if you restart docker daemon, all the containers with restart
policy `on-failure` regardless of its `RestartCount` will be started,
this will make daemon cost more extra time for restart.

This commit will stop these containers to do unnecessary start on
daemon's restart.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 51e42e6ee01eb4b5c8c7678e2fc7be0f13ef6a68
Component: engine
2016-04-10 15:44:47 +08:00
1a5ffe3e32 Fix critical bug: can't restart a restarting container
When user try to restart a restarting container, docker client report
error: "container is already active", and container will be stopped
instead be restarted which is seriously wrong.

What's more critical is that when user try to start this container
again, it will always fail.

This error can also be reproduced with a `docker stop`+`docker start`.

And this commit will fix the bug.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: a705e166cf3bcca62543150c2b3f9bfeae45ecfa
Component: engine
2016-04-08 22:02:30 +08:00
6a3a5e1d71 Fix typo
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 5fdbce3185913b82f516938deedb954c612d7d5d
Component: engine
2016-04-07 12:46:55 +08:00
86db45237f Merge pull request #21733 from Microsoft/sjw/updatepending
Adding postRunProcessing infrastructure for hanlding Windows Update.
Upstream-commit: 9d7f6bb921d7ea9a0954fe0e4e7612742935a540
Component: engine
2016-04-06 15:36:39 -07:00
a1edae7884 Adding postRunProcessing infrastructure for hanlding Windows Update.
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: 818a5198e4a76cd63ff84a7796ff3b0b91302552
Component: engine
2016-04-06 14:03:05 -07:00
9f10b4351a Windows: Remove TP4 support from main code
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 331c8a86d489e573fcbf1df3c4f813bbc3168624
Component: engine
2016-04-06 12:12:20 -07:00
8f70026df5 Clear nofity socket from containerd env
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 365401703d382861e86072d2813c2eacae56000f
Component: engine
2016-04-01 11:02:14 -07:00
087b91dfb7 Merge pull request #21679 from tonistiigi/no-pivot-root
Bring back support for DOCKER_RAMDISK
Upstream-commit: 00031c15b5b2226292eb9575bc3b390bdcd83a56
Component: engine
2016-03-31 12:40:57 -07:00
1917da0dad Bring back support for DOCKER_RAMDISK
Fixes #21631

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8a4225cd5ad3ad56a7e896f675080c0ed38982a3
Component: engine
2016-03-31 10:29:32 -07:00
dc5103ac67 Merge pull request #21637 from tonistiigi/refactor-cleanup
Fix container mount cleanup issues
Upstream-commit: c7b63338f0c46b2ca0efee3b8a590c2e2033ea14
Component: engine
2016-03-30 23:25:23 -07:00
2da8076367 Fix container mount cleanup issues
- Refactor generic and path based cleanup functions into a single function.
- Include aufs and zfs mounts in the mounts cleanup.
- Containers that receive exit event on restore don't require manual cleanup.
- Make missing sandbox id message a warning because currently sandboxes are always cleared on startup. libnetwork#975
- Don't unmount volumes for containers that don't have base path. Shouldn't be needed after #21372

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 05cc737f5411a0effd299429140d031c4ad8dd05
Component: engine
2016-03-30 17:25:49 -07:00
210579a75f Redirect containerd stdout/stderr to the docker stream.
Its useful to have containerd logs as part of docker.
Containerd metrics are too chatty, so set interval to 0.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: d9c3b653c0776bdfc4af9129ebbf41160a793cf3
Component: engine
2016-03-30 12:26:59 -07:00
5888c28b47 Merge pull request #21592 from anusha-ragunathan/docker-systemd
When using systemd, pass expected cgroupsPath and cli options to runc.
Upstream-commit: 99adcaebc0aca57f2665f356e4a9b4218aa5d5f7
Component: engine
2016-03-29 17:00:10 -07:00
3b9321568d When using systemd, pass expected cgroupsPath and cli options to runc.
runc expects a systemd cgroupsPath to be in slice:scopePrefix:containerName
format and the "--systemd-cgroup" option to be set. Update docker accordingly.

Fixes 21475

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 7ed3d265a4499ec03f10537fea0aac3ebaa0cec6
Component: engine
2016-03-29 14:20:10 -07:00
c23ab72e75 libcontainerd: reuse our pkg/locker
it fixes race with access to containerMutexes

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a7851e2556edb3e5333b6fe53160755fb5b7d616
Component: engine
2016-03-29 09:43:12 -07:00
ff692d79a4 Merge pull request #21599 from tonistiigi/separate-daemon-exec-root
Use separate exec-root for test daemons
Upstream-commit: d33480474f33523743ae49c1b96737fbfbeb1a6f
Component: engine
2016-03-29 07:52:18 -07:00