Commit Graph

118 Commits

Author SHA1 Message Date
99577ad8e2 libcontainerd: use healthcheck to track containerd conn
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: e4ddcb37c1326e8eef7abbcc84effb016c7a3336
Component: engine
2016-09-12 14:22:38 -07:00
7bef93723c Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: d8fef66b03c1ea8715470690efbd950033f7f628
Component: engine
2016-09-08 21:31:52 -04:00
cc5c9f50ef Merge pull request #25777 from swernli/servicing_race
Fixing race in Windows container servicing
Upstream-commit: 4219c0018f129bf50d1c7f8b7ab05c2659d88dfa
Component: engine
2016-09-08 10:42:15 -04:00
29459f6822 Windows: docker top implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 52f0474851298e7ba70b1a7ea16e3421d5926c98
Component: engine
2016-09-07 16:29:02 -07:00
f5573135ab Allow windows environment variables to contain =
Fix issue where environment variables with embedded equals signs were
being dropped and not passed to the container.

Fixes #26178.

Signed-off-by: Matt Richardson <matt.richardson@octopus.com>
Upstream-commit: bc8eabce252e8363263e9baacdeb1de508029d06
Component: engine
2016-09-05 08:49:07 +10:00
17447fd1b0 correct some nits in comment and test files
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 52637848a769b8c80d2f1e28d3d34ada6d35b5a6
Component: engine
2016-08-29 18:37:14 +08:00
f5ce997d75 Fix minor typo
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d56c2ea9edf0a6f5abfb5be8d241ecf8375054ff
Component: engine
2016-08-17 16:10:01 -07:00
6c683fac48 Replace old oci specs import with runtime-specs
Fixes #25804

The upstream repo changed the import paths.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 041e5a21dc0a8856448e3a9ad91e8535b8a7d00d
Component: engine
2016-08-17 09:38:34 -07:00
97adc78725 Revendor hcsshim
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: c58d0358c359e391707698b12850524137ef56ae
Component: engine
2016-08-16 17:28:49 -07:00
5fafd959b5 Fixing race in Windows container servicing
There exists a race in container servicing on Windows where, during normal operation, the container will begin to shut itself down while docker calls shutdown explicitly.  If the former succeeds just as the latter is attempting to communicate with the container to request the shutdown, an error comes back that can cause the servicing to incorrectly register as a failure.  Instead, we just wait for the servicing container to shutdown on it's own, using a reasonable timeout to allow for merging in the updates.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: 6591a37aaffa36b857db4b8c91b8f55942ab5730
Component: engine
2016-08-15 14:32:50 -07:00
c57bbdb1c7 Merge pull request #25505 from darrenstahlmsft/SignalProcessNewAPI
Changed SignalProcess to use new hcsshim API
Upstream-commit: 92ef3f615a95c0359f7abfc5f686d5e0392dd48b
Component: engine
2016-08-11 23:21:31 +02:00
cb1c855c27 Merge pull request #23951 from allencloud/defer-os-file-close
add defer file.Close to avoid potential fd leak
Upstream-commit: 64605d709f9bf5677d513d6ed78d63fffadc697d
Component: engine
2016-08-10 11:07:15 -07:00
1c502571ef add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0ead624473b6bddc232b46bc7c76ab4f9c743ff5
Component: engine
2016-08-10 08:36:09 +08:00
fe7b1d72f0 Merge pull request #23391 from Microsoft/WindowsSandboxSize
Windows: Added support for storage-opt size
Upstream-commit: 04e021d7511fcfdc0838a0165f70a4772c0e7718
Component: engine
2016-08-09 15:34:39 +02:00
7df2db6c39 Changed SignalProcess to use new hcsshim API
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 5eaf86c6db0ee010f1a2996d9a9ce3abae444ba7
Component: engine
2016-08-08 14:03:12 -07:00
0c4a3deec0 Merge pull request #25072 from mlaventure/oos-libcontainerd-client
Handle out-of-sync libcontainerd client on restore
Upstream-commit: 6401bd65b11931a27a6d2e1d3b6a9278ed4e8fc7
Component: engine
2016-08-05 14:23:25 -07:00
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
8e4d2991bb Handle out-of-sync libcontainerd client on restore
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 51f21a1674c60108f97878815046c69f769cee48
Component: engine
2016-07-28 11:26:07 -07:00
665067dce6 Check if the container is running if no event
When there is no event for the container it can happen because of a
crash and the container state on the persistent disk will have a
mismatch between what was in `/run` ( machine crash ).

This situation will create an unkillable container in docker because
containerd does not see it and it is not running but docker thinks it is
and you cannot tell it anything different.

This fixes the issue by checking if containerd has the container running
if we do not have an event instead of just returning.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 2650b1b6abd87d7d888e27abd6110dea83dcd080
Component: engine
2016-07-28 11:17:02 -07:00
e4e65a85a5 Fix daemon panic on restoring containers
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: c75de8e33cc0db5236eef6146f2de06533b46aa8
Component: engine
2016-07-26 22:52:52 -04:00
0000093b60 Fix missing unlock in libcontainerd.Restore()
This was preventing the "exit" event to be correctly processed during
the restore process without live-restore enabled.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: ac068a1f9de2b20b145b5682cd514c1f6b1fac17
Component: engine
2016-07-22 15:21:10 -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
ac1b563dd3 Update libcontainerd.AddProcess to accept a context
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: c02f82756e914081543bf05cb1815a48c02b1ebd
Component: engine
2016-07-19 08:24:39 -07:00
32ecbd59e9 Do not rely on "live" event anymore
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 64483c3bdaa1887b8b932e0564362fbbff025dc0
Component: engine
2016-07-19 08:24:39 -07:00
7262ef8faa Vendor in new containerd
This version introduces the following:
 - uses nanosecond timestamps for event
 - ensure events are sent once their effect is "live"

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 29b2714580d085533c29807fa337c2b7a302abb6
Component: engine
2016-07-18 11:44:24 -07:00
918edfff9f Wait for the reader fifo opening to block
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 0b2023130e285a0207be9fda4b22e1419997c552
Component: engine
2016-07-14 10:14:53 -07:00
8de09a35ce Merge pull request #24593 from mlaventure/fix-libcontainerd-data-race
Fix data race in libcontainerd
Upstream-commit: 0a96ba8a0f6b98d82fe2f8f4e07838785cb8d708
Component: engine
2016-07-14 17:27:24 +02:00
8a49e1f925 Fix data race in libcontainerd
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 8e9fbc8f5fc5759eb7f26ec998f227994ff6c642
Component: engine
2016-07-13 10:04:42 -07:00
53c33cc1be Add --oom-score-adjust to daemon
This adds an `--oom-score-adjust` flag to the daemon so that the value
provided can be set for the docker daemon's process.  The default value
for the flag is -500.  This will allow the docker daemon to have a
less chance of being killed before containers do.  The default value for
processes is 0 with a min/max of -1000/1000.

-500 is a good middle ground because it is less than the default for
most processes and still not -1000 which basically means never kill this
process in an OOM condition on the host machine.  The only processes on
my machine that have a score less than -500 are dbus at -900 and sshd
and xfce( my window manager ) at -1000.  I don't think docker should be
set lower, by default, than dbus or sshd so that is why I chose -500.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: a894aec8d81de5484152a76d76b80809df9edd71
Component: engine
2016-07-12 15:53:15 -07:00
b02186b3ad Merge pull request #24156 from Microsoft/jjh/clearbasefs
Windows: Clear volume path for Hyper-V containers
Upstream-commit: efcf24f0c41412c196390d7208f908d6fc7b9ed6
Component: engine
2016-07-07 15:35:14 -07:00
0bdbf282f3 Fix spelling in comments, strings and documentation
Signed-off-by: Otto Kekäläinen <otto@seravo.fi>
Upstream-commit: 644a7426cc31c338fedb6574d2b88d1cc2f43a08
Component: engine
2016-07-03 20:58:11 +03:00
37fb9cfa09 Windows: Ensure VolumePath is not set for Hyper-V containers
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: fd4f5c23650799a7e76e193614bf82454b375fe3
Component: engine
2016-06-29 16:49:09 -07:00
5fab4e7492 Windows: Disable VM cloning for TP5 image
The Windows TP5 image is not compatible with the Hyper-V isolated
container clone feature. Detect old images and pass a flag specifying that
clone should not be enabled.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 8e3432225357128fc135c8c3cf0318bd944c0c3b
Component: engine
2016-06-24 16:12:44 -07:00
fed645b1f8 Merge pull request #23862 from LK4D4/fix_unused
all: fix usage of some variables
Upstream-commit: c9175a6deb70887afc757702a69bf750b9668fd4
Component: engine
2016-06-23 10:21:10 -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
9e92fb5474 all: fix usage of some variables
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 57e14714ee85e67f59d8c22aed23dc875cf2e58c
Component: engine
2016-06-22 10:40:32 -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
85d966380c Windows: Added support for storage-opt size
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 7e5ee6d176357fb294d0ca7b9a93373f6cc84bc0
Component: engine
2016-06-21 10:53:29 -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
69096baccb Merge pull request #23532 from swernli/exitCodeFix
Fixing exit code return on error case in Windows.
Upstream-commit: a590a6b1800778c86f6649b64283d29d14d83024
Component: engine
2016-06-16 19:01:18 -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
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
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
0a17038359 Merge pull request #23443 from swernli/servicing-async
Updating call sequence for servicing Windows containers
Upstream-commit: 50c7bcac1e22a6a3dd39bec4136aa96136f56eb2
Component: engine
2016-06-13 19:49:23 +02:00
763e6c326e *: fix logrus.Warn[f]
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 44ccbb317c2ca67fd8a88147b1ff80ce83d453cc
Component: engine
2016-06-11 19:42:38 +02: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
743a9e8b07 Increase containerd start-timeout to 2 minutes
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 4251e1e99e16ff7ff5557ee16e5bef26a14cd127)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 64a91ee74e73c956e92801447ae73ba82d168ed5
Component: engine
2016-06-10 16:22:19 +02:00
79ea898035 Fix some typos
Signed-off-by: Jannick Fahlbusch <git@jf-projects.de>
Upstream-commit: e3490cdcc0e2b1e4c4da125626430016a3048128
Component: engine
2016-06-08 21:59:34 +02:00