Commit graph

36 commits

Author SHA1 Message Date
Kenfe-Mickaël Laventure
8040df4e89 New oom sync (#257)
* Vendor in runc afaa21f79ade3b2e99a68f3f15e7219155aa4662

This updates the Dockerfile to use go 1.6.2 and install pkg-config are
both are now needed by runc.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

* Add support for runc create/start operation

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

* Remove dependency on runc state directory for OOM handler

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

* Add OOM test

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-09 13:33:26 -07:00
Kenfe-Mickaël Laventure
16a8dfe6a8 Add support for updating Kernel Memory Limits (#256)
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-06 11:26:07 -07:00
Amit Krishnan
62e1370f91 containerd build clean on Solaris (#203)
* containerd build clean on Solaris

Signed-off-by: Amit Krishnan <krish.amit@gmail.com>

* Vendor golang.org/x/sys

Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-05-19 10:12:50 -07:00
Michael Crosby
f7f4d8677f Remove windows code and simplify linux
Windows will not use containerd and its just unused code and unneed
complexity to keep it all around.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-26 14:10:41 -07:00
Michael Crosby
79c35e0306 Merge pull request #218 from crosbymichael/bump_runc
Update runc and runtime-specs dependencies
2016-04-26 14:05:44 -07:00
Michael Crosby
7a1d28e42b Bump runc and runtime-specs deps
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-26 13:38:36 -07:00
HuKeping
ca7c504068 Bugfix: ctr container list can not get the proper status of container
Prior to this patch, when list containers by "ctr containers" or
"ctr containers xxx", it will not get the proper status of conatinser(s).

That was caused by the wrong implementation of State() for structure process,
it only send a signal "0" to ping the "init" process and do nothing.

Since the OCI/runc has implemented an interface Status(), we can use that.
And I think this is more compatible with the design for containerd:
- containerd -> runtime -> fun()

Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-26 07:04:26 -04:00
HuKeping
9d30093505 Interface: introduce status to runtime container
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-22 16:09:50 -04:00
Kenfe-Mickaël Laventure
b31b8a611e Merge pull request #157 from mYmNeo/binary-path
let user to specify the shim name or path
2016-04-21 00:31:14 +10:00
Kenfe-Mickael Laventure
07646a7150 Return runtime output on checkpoint operation errors
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-04-17 12:01:19 -07:00
mYmNeo
4eb27a5926 let user to specify the shim name or path
Signed-off-by: mYmNeo <thomassong@tencent.com>
2016-04-06 14:42:47 +08:00
Michael Crosby
ae107f688e Change sleep to 15ms
This is currently the optimal value for this setting based on runc start
times.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-05 14:07:26 -07:00
Michael Crosby
3742ae3ec8 Add timeout flag for container start times
This currently depends on a runc PR:

https://github.com/opencontainers/runc/pull/703

We need this pr because we have to SIGKILL runc and the container root
dir will still be left around.

As for the containerd changes this adds a flag to containerd so that you
can configure the timeout without any more code changes.  It also adds
better handling in the error cases and will kill the containerd-shim and
runc ( as well as the user process if it exists ) if the timeout is hit.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-05 13:38:49 -07:00
Kenfe-Mickael Laventure
fd888e8f34 Return the runtime error message on failed pause and resume calls
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-29 11:40:05 -07:00
Kenfe-Mickael Laventure
f07c5ac52a Ensure that runtimeArgs always get passed down to the oci runtime
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-29 10:32:37 -07:00
Kenfe-Mickael Laventure
3f388f8638 Take runtimeArgs in account when loading containers state
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-25 11:03:11 -07:00
Tonis Tiigi
bbf760ee6f Add prefixes to external errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-22 19:38:22 -07:00
Michael Crosby
142e22a4dc Merge pull request #149 from mlaventure/fix-vet-errors
Fix go vet errors
2016-03-22 10:54:08 -07:00
Kenfe-Mickael Laventure
514ca2d407 Fix go vet errors
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-22 09:47:03 -07:00
Tibor Vass
2406bbc1ca Factor out some leftover direct references to runc binary
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-03-22 12:01:25 -04:00
Tibor Vass
b0681dd523 Have containerd-shim filename depend on containerd filename
If containerd binary is renamed to docker-containerd, then it should
invoke the docker-containerd-shim binary.

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-03-21 21:33:35 -04:00
Tonis Tiigi
f9ecd09f4f Retry on pidfile read error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-18 09:22:13 -07:00
Michael Crosby
6ba5767b70 Return errors from shim in log
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-17 14:44:03 -07:00
Michael Crosby
366dcc08fa Add specific error message for missing shim
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-17 14:13:08 -07:00
Tonis Tiigi
edd3265858 Raise pidfile wait timeout
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-16 17:45:51 -07:00
Michael Crosby
e637c1ea80 Update specs imports for specs-go
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-15 11:31:32 -07:00
Michael Crosby
bd23df8fd1 Remove process dir and entry on error
If we fail to exec a process make sure that it is cleaned up within the
container's information and on disk state.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-14 16:05:45 -07:00
Michael Crosby
ca6ae2e64b Remove container on load if it exited
If the shim gets sigkilled while containerd is down we need to be able
to remove the container correctly so that it does not stay in a stopped
state forever.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-14 14:23:24 -07:00
Michael Crosby
17e4d62ab0 Update runc state dir
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-11 16:06:38 -08:00
Michael Crosby
b68bc651a8 Handle start errors sync with runc
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-11 10:13:34 -08:00
Tonis Tiigi
4700b961ca Fix userns mapping for tty
- Linux part of the spec was ignored
- Exec used empty spec

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-10 23:09:39 -08:00
Michael Crosby
500ca74f38 Add oom support to events
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-29 17:01:40 -08:00
John Howard
d4ca79c978 Getting ctr closer to compiling on Windows
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-29 12:42:30 -08:00
John Howard
b044ff0f29 Refactor process.go for platform specific
Signed-off-by: John Howard <jhoward@microsoft.com>

Move process sorter to new file

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Sort containers by id

This will not be the most accurate sorting but atleast the list will be
consistent inbetween calls.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Allow runtime to be configurable via daemon start

This allows people to pass an alternate name or location to the runtime
binary to start containers.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Fix state output for containers

Return the proper state/status for a container by checking if the pid is
still alive.  Also fix the cleanup handling in the shim to make sure
containers are not left behind.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Properly wait for container start

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-29 10:43:35 -08:00
John Howard
2b8f022950 runtime compiles on Windows
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-26 14:01:06 -08:00
John Howard
817c2089aa Refactors getRootIDs
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-25 12:13:21 -08:00