Commit graph

31 commits

Author SHA1 Message Date
Michael Crosby
1c6ed30a79 Remove vendor and fix go build
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-07 13:15:32 -08:00
Michael Crosby
90e4f130c8 Add working shim exec driver for start
Still need to implement a working Wait() on the process using epoll
because of the non-blocking exit fifo

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-10-06 11:39:12 -07:00
Kenfe-Mickaël Laventure
3a65d238a9 Start runc in detached mode when restoring a checkpoint (#312)
Without this the shim cannot detect the death of the init process.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-07 09:26:37 -07:00
Kenfe-Mickaël Laventure
ef23e7041b Merge pull request #280 from resouer/minor-fix
Refactoring minor fix
2016-07-05 11:27:18 -07:00
Harry Zhang
96ee432674 Refactoring minor fix
Signed-off-by: Harry Zhang <harryz@hyper.sh>
2016-06-30 23:13:04 -04:00
Michael Crosby
654c537d38 Call start in containerd
This fixes a sync issue when the containerd api returns after a
container has started.  It fixes it by calling the runtime start inside
containerd after the oom handler has been setup.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-06-27 10:49:20 -07:00
Kenfe-Mickaël Laventure
2d2dfab85a Set parent death signal to all exec within the shim (#269)
This will prevent from leaving hung processes around if there's a bug
in the runtime.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-16 14:38:28 -07:00
boucher
a135e1093d Support the new --empty-ns flags in RunC for checkpoint/restore.
Signed-off-by: Ross Boucher <rboucher@gmail.com>
2016-06-09 16:49:26 -04:00
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
Ross Boucher
cf554d59dd Store the checkpoint and restore logs in the same directory as the (#253)
checkpoint image itself.

Signed-off-by: Ross Boucher <rboucher@gmail.com>
2016-06-07 14:05:22 -07:00
Kenfe-Mickaël Laventure
5624732128 Add golint to test (#255)
* Add a new lint rule to the Makefile

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

* Fix linter errors

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

* Allow replacing the default apt mirror

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-03 15:00:49 -07:00
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
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
Darren Shepherd
2347cc9dc3 Pass runtime args to runtime delete call from shim
Signed-off-by: Darren Shepherd <darren@rancher.com>
2016-04-26 11:14:37 -07:00
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
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
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
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