Commit graph

59 commits

Author SHA1 Message Date
Ross Boucher
e756ae42d1 Add support for specifying a checkpoint directory. (#245)
Signed-off-by: Ross Boucher <rboucher@gmail.com>
2016-05-25 17:42:37 -07:00
Sebastiaan van Stijn
d191f5bd1e
fix typo in error-message
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-05-25 13:26:20 +02:00
Kenfe-Mickaël Laventure
126e5c403e Allow specifying runtime to be used when creating container (#247)
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-23 15:43:47 -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
Kenfe-Mickael Laventure
7979ac24fe Fix restore to correctly set the exec timeout value (containerd)
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-02 14:04:14 -07:00
Michael Crosby
847690583f Remove sigchld reaper from containerd process
Because we are launching alot of different runc commands to do
operations there is a race between doing a `cmd.Wait()` and getting the
sigchld and reaping it.  We can remove the sigchild reaper from
containerd as long as we make sure we reap the shim process if we are
the parent, i.e. not restored.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-27 16:02:03 -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
31270bba69 Remove windows files
Windows is not going to use containerd because there is already a
similar implementation on windows.  This removes all the windows files
because there is no reason to keep this overhead when its not going to
be used.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-26 14:10:33 -07:00
Michael Crosby
c44f03a1bf Merge pull request #215 from HuKeping/runtime_status
Bugfix: ctr container list can not get the proper status of container
2016-04-26 13:43:47 -07:00
HuKeping
40d42a1aac Rework function getContainers
- Use canonical way to check if a map contains a key.
- Use "ci" to keep consistence since it is for "containerInfo".

Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-22 17:32:41 -04:00
Michael Crosby
c0295fac04 Merge pull request #210 from WeiZhang555/event-types-constant
Move event types constants into single file
2016-04-21 10:24:54 -07:00
Michael Crosby
1b8cc65462 Set fixed event log size
Truncate the event log on disk and in memory so that it does not
grow forever.  This is mainly used for higher levels to receive past
events if they miss any.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-20 15:07:49 -07: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
Zhang Wei
e213e2eb62 Move event types constants into single file
Move all constants for event types to types.go for easier code
readability and maintainance.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-19 19:09:54 +08:00
Michael Crosby
4ae5413ed7 Truncate events log after read
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-15 13:48:02 -07:00
Michael Crosby
28f9453fbb Error oom if container has not stopped
The oom control file may not exist if the container is short lived and
exits before we can open it.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-07 10:44:36 -07:00
Michael Crosby
d34c458529 Merge pull request #186 from coolljt0725/arm64_epoll
move epoll syscall to arch specific to enable containerd run on arm64
2016-04-06 17:19:22 -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
Lei Jitang
6299489d03 move epoll syscall to arch specific to enable containerd run on arm64
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-04-05 23:17:30 -04: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
Tianon Gravi
13f03c3f7a Fix minor "deferred" typo
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2016-04-02 10:28:05 -07:00
Michael Crosby
cb3c208a4d Merge pull request #172 from mlaventure/better-error-for-pause-and-resume
Return the runtime error message on failed pause and resume calls
2016-04-01 14:25:52 -07:00
Michael Crosby
47f239706c Add no pivot root support
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-30 21:52:15 -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
Michael Crosby
6e4d5b385c Add runtimeArgs to pass to shim
This allows you to pass options like:

```bash
containerd --debug --runtime-args "--debug" --runtime-args
"--systemd-cgroup"
```

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-24 13:31:27 -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
Michael Crosby
52a1dfb418 Call delete before closing IO in shim
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-14 16:58:56 -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
94568b7a9b Don't send exit event on failure
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-11 16:40:42 -08:00
Michael Crosby
0dd075a47b Add update rpc for resource updates
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-07 15:23:52 -08:00
Michael Crosby
7cbe3e759d Remove oom flag on daemon
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-01 11:17:29 -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
Kenfe-Mickael Laventure
e8b602462a Send "live" event only if past events requested
This fixes a bug where the live events are recorded in the events log.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-02-29 11:18:11 -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
3d8e37cf9d Making it not crash on Windows
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-28 19:02:24 -08:00
John Howard
cdb5947f86 Supervisor compiles
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-26 14:58:15 -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
Kenfe-Mickael Laventure
4ca592f56e Add a new "live" Event type
This event type is used to notify consumers that everything following
are real-time events. This allow clients that request events from the
backlog to detect when those events have all been sent.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-02-25 16:39:54 -08:00
Kenfe-Mickael Laventure
b7042518e5 Fix stats command not returning
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-02-25 10:14:20 -08:00
Michael Crosby
4e05bf491a Remove eventloop package
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-19 13:21:21 -08:00
Michael Crosby
9341a95c26 add event log and timestamp to events api
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-12 10:17:59 -08:00
Michael Crosby
3dc59d565a Rename Events to task in supervisor
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 17:26:24 -08:00
Michael Crosby
d2bf71043f Fix memory value in stats api
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 15:55:19 -08:00
Michael Crosby
bdeb87a090 Implement stats for containerd
This is a single endpoint that clients will poll

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 14:36:32 -08:00
Michael Crosby
d6bd304c92 Add labels for containers
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 13:44:25 -08:00
Michael Crosby
76d69b4ed8 Add id to state command to return single container
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 12:20:29 -08:00
Michael Crosby
58c5eb5ecb Return container on start
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 11:56:11 -08:00
Michael Crosby
01176f2d7f Add pid and stdio to process state
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-04 14:40:35 -08:00
Michael Crosby
36eb83cb99 Move fifo creation to client
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-03 13:56:15 -08:00