Commit Graph

24 Commits

Author SHA1 Message Date
c1636749f7 libcontainerd: mark container exited after failed restart
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 9be0fb45c25e4d8d3cf0aa444da5ae41dd18f435
Component: engine
2016-08-03 17:44:30 -07:00
3eeb6b8c6e libcontainerd: wait for restart after state change
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 495448b2903c1a765cc17dff05afebe16a466917
Component: engine
2016-08-03 15:28:07 -07:00
1dd4a36c0e Prepend libcontainerd log message with "libcontainerd:"
This will make it easier to pinpoint error messages in the daemon
logs.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 5231c5534679206e20672ca16bbee5c10d699319
Component: engine
2016-07-22 15:20:14 -07:00
ebb89af810 Merge pull request #23776 from Microsoft/ShutdownError
Windows: Prevent logging errors when shutting down an already shut down container
Upstream-commit: 138f9538f3a740ef56b1a6cd43ae537a78f4d896
Component: engine
2016-06-22 12:11:00 -07:00
34ef68e15d Added stateinfo to WaitExit info to aid debugging daemon hangs
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 9aa9bda1780b68946582e36892703fbb4f5f892d
Component: engine
2016-06-21 12:41:08 -07:00
da68531167 Windows: Prevent logging errors when shutting down an already shut down container
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 79060e821228b9e86bbd9e9212756a61b0901c11
Component: engine
2016-06-20 16:57:08 -07:00
b47fcaaeab Fixing exit code return on error case in Windows.
Right now, if we hit an error retrieving the exit code in HCS process.ExitCode, we return that 0 and that error.  Golang convention says that if an error is returned the other values should not be used, but the caller of ExitCode in libcontainerd has to fall through if an error is received.  Rather than return a success exit code in that failure case, we should return -1 to indicate a generic failure.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: 17c1b9c061139a2655252f6fb5e36f616a8c5f5e
Component: engine
2016-06-14 10:19:55 -07:00
28d7534bc7 Updating call sequence for servicing Windows containers
This change adjusts the calling pattern for servcing containers to use waiting on the process instead of expecting start to block.  This is safer, as it avoids timeouts in the start code path for the potentially expensive update operation.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: f2ad7be2c4aa13413d539887e8c13fb47bea7254
Component: engine
2016-06-10 15:19:10 -07:00
e66ae89f7b Merge pull request #23142 from Microsoft/ExtraCleanup
Windows: Remove a double free on hcs container handle
Upstream-commit: bcf0c8ca2883867ba7dcec4824a64359ee7cab12
Component: engine
2016-06-01 11:09:06 -04:00
9c661aedc4 Merge pull request #22989 from Microsoft/StartCleanup
Windows: Adding missing cleanup call when container start fails
Upstream-commit: c7aba69cc10faee84ba877ad4a94e4e150cb0932
Component: engine
2016-06-01 15:42:47 +02:00
1ed90a29aa Windows: Remove a double free on hcs container handle
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: c8454394f76865777d4cd013c606d17dcd0f9600
Component: engine
2016-05-31 10:25:38 -07:00
7a3282f5c8 Windows: Adding missing cleanup call when container start fails
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 054992e2913cf10171eecb5f41e5c19158cf04bc
Component: engine
2016-05-31 10:19:05 -07:00
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
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
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
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
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
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
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
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
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
a76e16e99f 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>
Upstream-commit: 94d70d835500bec3b171425271916d3e40f29635
Component: engine
2016-03-18 13:38:41 -07:00