Commit graph

23 commits

Author SHA1 Message Date
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
Michael Crosby
4ae5413ed7 Truncate events log after read
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-15 13:48:02 -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
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
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
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
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
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
cdb5947f86 Supervisor compiles
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-26 14:58:15 -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
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
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
a42eb9fd63 Add close stdin
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:22 -08:00
Michael Crosby
835f3b6a97 Update shim for exec
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:22 -08:00
Michael Crosby
fe38efda50 Add shim for reattach of processes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Remove runtime files from containerd

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

Update supervisor for orphaned containers

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

Remove ctr/container.go back to rpc calls

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

Add attach to loaded container

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

Add monitor based on epoll for process exits

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

Convert pids in containerd to string

This is so that we no longer care about linux or system level pids and
processes in containerd have user defined process id(pid) kinda like the
exec process ids that docker has today.

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

Add reaper back to containerd

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

Implement list containers with new process model

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

Implement restore of processes

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

Add NONBLOCK to exit fifo open

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

Implement tty reattach

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

Fix race in exit pipe creation

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

Add delete to shim

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

Update shim to use pid-file and not stdout

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:22 -08:00
Burcu Dogan
bc4f1aae01 chanotify should use interface{} keys
Fixes #79.

Signed-off-by: Burcu Dogan <jbd@golang.org>
2016-01-22 08:15:13 -08:00
Alexander Morozov
4f0c3850ba Use chanotify in supervisor
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-18 12:17:53 -08:00
Alexander Morozov
69f8f566a2 Move supervisor to it's own package
It allows to keep main namespace cleaner

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-17 16:18:48 -08:00
Renamed from supervisor.go (Browse further)