Commit Graph

35 Commits

Author SHA1 Message Date
23ee37555b Merge pull request #26690 from mwhudson/ignore-oom_score_adj-failure
Ignore failure to set oom_score_adj, as happens in an unprivileged container.
Upstream-commit: d316e172da464bd7fb88e45069cb459f90f710bd
Component: engine
2016-10-11 10:01:22 +01:00
a6e85b050d add log messages when write to oom_score_adj fails
Signed-off-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Upstream-commit: 9ed54d3c674ea25d7e038a7506f68924aa8d39d6
Component: engine
2016-09-21 19:36:36 +12:00
caffc36efd libcontainerd: do not use failfast for events stream
New grpc uses failfast by default, but that code was written with other
default in mind, so just preserve it for now.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 5fb383243234dfebc468207cfd7f64eca1b7f849
Component: engine
2016-09-20 09:24:40 -07:00
601f07305c Ignore failure to set oom_score_adj, as happens in an unprivileged container.
Signed-off-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Upstream-commit: 32f24bc3c59af530196d3613dcb55ffced964de4
Component: engine
2016-09-19 14:27:10 +12:00
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
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
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
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
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
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
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
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
3cbc347e63 Merge pull request #23148 from mlaventure/wait-for-containerd-before-restarting-it
Wait for containerd to die before restarting it
Upstream-commit: cb36dddad150a3bc0986736a877c8bdfcfbd346c
Component: engine
2016-06-01 10:35:31 -07:00
a612268e81 Wait for containerd to die before restarting it
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: ce160b37e15ddb86c45314d080718f833e551aa3
Component: engine
2016-06-01 07:45:03 -07:00
b9c6d22ba9 Set --state-dir on containerd.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8b5e5c61955eba9af7c2975b959c4f4517485389
Component: engine
2016-05-31 11:48:05 -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
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
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
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
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
40995de161 Use separate exec-root for test daemons
Fixes #21545

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 0d9b94c4c5d6b4f03a7a86e731e4110e9f27a51e
Component: engine
2016-03-28 17:38:14 -07:00
ef87795248 Remove grpc logging to stderr
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: b0280c37a08a77871947b1045073601deb601eaa
Component: engine
2016-03-23 15:41:47 -07:00
ce07920e99 Add docker- prefix to runc and containerd binaries
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 009399dc8ed8a4b635b0e229bf07b685e286d8d9
Component: engine
2016-03-23 00:52:16 -04:00
8ba16d91c8 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>
Upstream-commit: 9c4570a958df42d1ad19364b1a8da55b891d850a
Component: engine
2016-03-18 13:38:32 -07:00