Commit graph

21 commits

Author SHA1 Message Date
Michael Crosby
6f18acda73 Remove dep on larger packages
This removes most of the deps on the larger packages for the shim and
reduces the binary size and memory footprint from a 7.1mb binary to a
2.6mb binary.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-06 11:21:49 -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
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
Tonis Tiigi
fa0efa2906 Fix closing stdin before everything has been written to pipe
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-23 12:12:56 -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
Michael Crosby
0969765fad Don't treat runtime error as shim error
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-17 16:32:35 -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
52a1dfb418 Call delete before closing IO in shim
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-14 16:58:56 -07:00
Tonis Tiigi
e57fccc481 Wait for stdio to close
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-11 14:49:01 -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
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
Jaana Burcu Dogan
f611b37834 Use a better package name for utility functions. 2016-02-17 00:10:18 +01:00
Michael Crosby
d317f71ac2 Move exec and checkpoint to process state
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 11:30:25 -08:00
Michael Crosby
cf28969328 Fix tty and io permission for userns
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 11:23:35 -08:00
Michael Crosby
20a39bce97 Update to use runc 0.0.8
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-10 16:48:04 -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
Michael Crosby
a42eb9fd63 Add close stdin
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:22 -08:00
Michael Crosby
277cc920a4 Implement checkpoint / restore for shim
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