Commit graph

416 commits

Author SHA1 Message Date
Brian Goff
bcf0c8ca28 Merge pull request #23142 from Microsoft/ExtraCleanup
Windows: Remove a double free on hcs container handle
2016-06-01 11:09:06 -04:00
Kenfe-Mickael Laventure
ce160b37e1 Wait for containerd to die before restarting it
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-01 07:45:03 -07:00
Vincent Demeester
c7aba69cc1 Merge pull request #22989 from Microsoft/StartCleanup
Windows: Adding missing cleanup call when container start fails
2016-06-01 15:42:47 +02:00
Daniel Nephin
8b5e5c6195 Set --state-dir on containerd.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 11:48:05 -07:00
Darren Stahl
c8454394f7 Windows: Remove a double free on hcs container handle
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-05-31 10:25:38 -07:00
Darren Stahl
054992e291 Windows: Adding missing cleanup call when container start fails
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-05-31 10:19:05 -07:00
Darren Stahl
717209c9ff Fix a leaked process handle of the first container to start on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-05-25 21:33:50 -07:00
John Starks
6508c015fe 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>
2016-05-25 12:22:52 -07:00
John Howard
c7ee503082 Merge pull request #22958 from Microsoft/hcs_rpc
Windows: Use the new HCS RPC API
2016-05-25 09:25:22 -07:00
Darren Stahl
959c1a52bf Change Docker to use the new HCS RPC API
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-05-24 16:36:51 -07:00
Vincent Demeester
86a7632d63 Merge pull request #22091 from amitkris/build_solaris
Get the Docker Engine to build clean on Solaris
2016-05-24 21:41:36 +02:00
Alexander Morozov
d7dfe9103b Merge pull request #22541 from crosbymichael/graph-restore
Implement graph driver restore on reboot
2016-05-23 22:57:23 -07:00
Amit Krishnan
86d8758e2b Get the Docker Engine to build clean on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-05-23 16:37:12 -07:00
Michael Crosby
31e903b0e1 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>
2016-05-23 15:57:23 -07:00
Michael Crosby
009ee16bef Restore ref count
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-23 15:57:23 -07:00
John Starks
f124829c9b 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>
2016-05-20 19:04:20 -07:00
Stefan J. Wernli
a5b64f2847 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>
2016-05-12 17:45:53 -07:00
Alexander Morozov
e811e9784f Merge pull request #22544 from Microsoft/jjh/terminate
Windows: Terminate on failed shutdown, fixes dockerd deadlock
2016-05-12 14:46:56 -07:00
John Howard
feacb1205b Windows: Terminate on failed shutdown
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-10 10:09:50 -07:00
Michael Crosby
6889c3276c Fix containerd proto for connection
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-09 15:17:10 -07:00
Sebastiaan van Stijn
9a9ebc7f85 Merge pull request #22046 from cpuguy83/containerd_stdio
Set containerd pdeathsig
2016-05-06 09:26:16 +02:00
Brian Goff
d4559313d5
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>
2016-05-02 14:23:38 -04:00
Doug Davis
1e44bba4af Remain extra \n on INFO log msg
Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-04-27 05:19:40 -07:00
Stefan J. Wernli
da92dad59f 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>
2016-04-25 12:16:26 -07:00
Vincent Demeester
17d5c97c90 Merge pull request #22125 from crosbymichael/restart-timeout
Reset restart timeout if execution longer than 10s
2016-04-25 19:15:32 +02:00
Antonio Murdaca
885e5eb5f7 Merge pull request #22256 from mlaventure/use-abs-rootfs-path
Use absolute path for rootfs in OCI config.json
2016-04-23 13:21:21 +02:00
Michael Crosby
b6db56b5eb 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>
2016-04-22 10:37:34 -07:00
Kenfe-Mickael Laventure
3135874543 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>
2016-04-22 10:07:33 -07:00
Tonis Tiigi
7bf07737b9 Fix config cleanup on canceling restartmanager
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-04-21 15:33:09 -07:00
Sebastiaan van Stijn
ccf83c94d1 Merge pull request #22171 from mlaventure/always-disable-metrics
Always disable containerd metrics when started by docker
2016-04-21 01:38:07 +02:00
Kenfe-Mickael Laventure
42f9c25b51 Always disable containerd metrics when started by docker
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-04-19 13:37:18 -07:00
Brian Goff
ab6b82b856 Merge pull request #22123 from crosbymichael/restart-canceled
Remove restart canceled error
2016-04-19 16:28:33 -04:00
Michael Crosby
fc2e2234c6 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>
2016-04-19 10:46:21 -07:00
Alexander Morozov
2f7df8e5de Merge pull request #22121 from tonistiigi/fix-exec-cleanup
Clean up exec fifos on process exit
2016-04-19 09:45:54 -07:00
Tonis Tiigi
84d170129a Clean up exec fifos on process exit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-04-18 14:03:37 -07:00
Brian Goff
a4030787f5 Merge pull request #21993 from coolljt0725/quiet_restartmanger_cancel
Don't throw "restartmanager canceled" error for no restart policy container
2016-04-18 14:38:01 -04:00
Zhang Wei
a02ae66d36 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>
2016-04-16 16:53:33 +08:00
Lei Jitang
494297baf8 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>
2016-04-14 21:40:20 -04:00
John Howard
d691b4af18 Windows: Timeout TestContainerApiPostContainerStop
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-12 18:21:54 -07:00
John Starks
c70f153f52 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>
2016-04-11 17:16:17 -07:00
Zhang Wei
51e42e6ee0 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>
2016-04-10 15:44:47 +08:00
Zhang Wei
a705e166cf 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>
2016-04-08 22:02:30 +08:00
Zhang Wei
5fdbce3185 Fix typo
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-07 12:46:55 +08:00
John Howard
9d7f6bb921 Merge pull request #21733 from Microsoft/sjw/updatepending
Adding postRunProcessing infrastructure for hanlding Windows Update.
2016-04-06 15:36:39 -07:00
Stefan J. Wernli
818a5198e4 Adding postRunProcessing infrastructure for hanlding Windows Update.
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2016-04-06 14:03:05 -07:00
John Howard
331c8a86d4 Windows: Remove TP4 support from main code
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-06 12:12:20 -07:00
Michael Crosby
365401703d Clear nofity socket from containerd env
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-01 11:02:14 -07:00
David Calavera
00031c15b5 Merge pull request #21679 from tonistiigi/no-pivot-root
Bring back support for DOCKER_RAMDISK
2016-03-31 12:40:57 -07:00
Tonis Tiigi
8a4225cd5a Bring back support for DOCKER_RAMDISK
Fixes #21631

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-31 10:29:32 -07:00
Sebastiaan van Stijn
c7b63338f0 Merge pull request #21637 from tonistiigi/refactor-cleanup
Fix container mount cleanup issues
2016-03-30 23:25:23 -07:00
Tonis Tiigi
05cc737f54 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>
2016-03-30 17:25:49 -07:00
Anusha Ragunathan
d9c3b653c0 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>
2016-03-30 12:26:59 -07:00
David Calavera
99adcaebc0 Merge pull request #21592 from anusha-ragunathan/docker-systemd
When using systemd, pass expected cgroupsPath and cli options to runc.
2016-03-29 17:00:10 -07:00
Anusha Ragunathan
7ed3d265a4 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>
2016-03-29 14:20:10 -07:00
Alexander Morozov
a7851e2556 libcontainerd: reuse our pkg/locker
it fixes race with access to containerMutexes

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-03-29 09:43:12 -07:00
Alexander Morozov
d33480474f Merge pull request #21599 from tonistiigi/separate-daemon-exec-root
Use separate exec-root for test daemons
2016-03-29 07:52:18 -07:00
Tonis Tiigi
0d9b94c4c5 Use separate exec-root for test daemons
Fixes #21545

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-28 17:38:14 -07:00
Dmitri Logvinenko
6dede879fd Fix misspellings
Signed-off-by: Dmitri Logvinenko <dmitri.logvinenko@gmail.com>
2016-03-28 16:21:02 +03:00
Brian Goff
57575a2695 Merge pull request #21460 from tonistiigi/exec-ulimits
Add ulimit support to libcontainerd addprocess
2016-03-24 09:38:21 -04:00
Tonis Tiigi
8891afd838 Add ulimit support to libcontainerd addprocess
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-23 19:54:32 -07:00
Michael Crosby
b0280c37a0 Remove grpc logging to stderr
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-23 15:41:47 -07:00
Tibor Vass
009399dc8e Add docker- prefix to runc and containerd binaries
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-03-23 00:52:16 -04:00
John Howard
52237787fa Windows: Minimal docker top implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-03-20 16:45:53 -07:00
John Howard
e331df5aee Windows: libcontainerd cleanup
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-03-18 20:31:11 -07:00
John Howard
94d70d8355 Windows libcontainerd implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: John Starks <jostarks@microsoft.com>
Signed-off-by: Darren Stahl <darst@microsoft.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-18 13:38:41 -07:00
Tonis Tiigi
9c4570a958 Replace execdrivers with containerd implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-03-18 13:38:32 -07:00