Commit graph

537 commits

Author SHA1 Message Date
K3A
403ccb155b Update Makefile (#303)
adding LDFLAGS for "shim" target as well.

Signed-off-by: Mario Hros <spam@k3a.me>
2016-08-26 10:55:21 -07:00
Phil Estes
8508d2bec9 Don't call runc start when restoring a checkpoint (#302)
The create/start split left checkpoint/restore broken in that the create
side was calling runc restore, which fully restores the process to
operation, leaving a call to `runc start` as an error (process already
started). This patch skips process.Start as it is an unnecessary (and
wrong) step for a restored checkpoint.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2016-08-26 10:25:19 -07:00
Michael Dougherty
edc124c8e7 Initial jenkinsfile (#306)
Signed-off-by: Mike Dougherty <mike.dougherty@docker.com>
2016-08-26 10:24:30 -07:00
Damien Lespiau
d77bc40d5c shim: Fix description of cwd and arguments given to the shim process (#307)
That comment didn't seem to match the reality and confused me a bit. The
shim takes 3 arguments and the cwd is the containerd state directory.

I'm guessing it's a left over from the containerd split.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-08-26 09:41:11 -07:00
Damien Lespiau
ab90816c41 A few .gitignore updates (#308)
* gitignore: Use absolute paths

git status will only match the ignored path from the root of the
repository, a very slightly more accurate way to ignore those files.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

* gitignore: Ignore the /output directory

Test artifacts are now generated in /output, so update the .gitignore
file accordingly.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-08-26 09:40:41 -07:00
Lei Jitang
95d78cad59 Remove obsolete comment about reaper in containerd/main.go (#297)
Sigchld reaper has been removed from containerd procss in
847690583f, so the comment
is not need any more.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-08-15 09:54:47 -07:00
Kenfe-Mickaël Laventure
621f263475 Merge pull request #296 from crosbymichael/bump
Update version to 0.2.3
2016-08-10 09:06:47 -07:00
Michael Crosby
973f21fcad Update version to 0.2.3
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-08-10 08:59:47 -07:00
Kenfe-Mickaël Laventure
0ac3cd1be1 Fix shim deadlock when joining an existing pid namespace (#290)
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-07-15 11:49:43 -07:00
Kenfe-Mickaël Laventure
3abb9fc411 Merge pull request #289 from resouer/minor-fix
Fix wrong name comment etc
2016-07-14 09:26:25 -07:00
Harry Zhang
9df37c23e4 Fix wrong field name
Signed-off-by: Harry Zhang <harryz@hyper.sh>
2016-07-14 17:06:01 +08:00
Kenfe-Mickaël Laventure
90f827ca10 Streamline events (#287)
* Sync process.State() with the matching events

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

* Allow requesting events for a specific container

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

* Sync container state retrieval with other events

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

* Let containerd take care of calling runtime delete on exit

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

* Take care of possible race in TestBusyboxTopExecTopKillInit

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-07-13 11:01:07 -07:00
Kenfe-Mickaël Laventure
6dd2f1c422 Merge pull request #281 from mlaventure/use-protobuf-timestamp
Use protobuf timestamp
2016-07-05 13:37:41 -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
Kenfe-Mickaël Laventure
af3c4bd9c5 Merge pull request #276 from resouer/fix-fd
Fix controlPipe is not closed
2016-07-05 11:25:07 -07:00
Kenfe-Mickaël Laventure
3104c6b537 Merge pull request #284 from coolljt0725/set_default_shim
set default shim if shim is nil for backward compatibility
2016-07-05 11:23:53 -07:00
Kenfe-Mickaël Laventure
c26f5ef94b Merge pull request #283 from coolljt0725/fix_attach
Fix attach to old running container after restart
2016-07-05 10:11:45 -07:00
Lei Jitang
0b15e03da0 set default shim if shim is nil for backward compatibility
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-07-05 09:14:20 -04:00
Lei Jitang
bce8df5498 Fix attach to old running container after restart
Get the control pipe of old running container on
containerd restarting.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-07-04 04:19:18 -04:00
Kenfe-Mickaël Laventure
1b3a81545c Merge pull request #282 from mlaventure/fix-race-in-process-start
Handle case where shim is reaped before the call to the runtime start
2016-07-01 11:39:34 -07:00
Kenfe-Mickael Laventure
d8b9559d8e Handle case where shim is reaped before the call to the runtime start
This avoid erroring out with a false positive

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-07-01 11:26:20 -07:00
Kenfe-Mickael Laventure
dfb626dccc Use protobuf Timestamp type instead of uint64
This will ensure nanoseconds are taken in account.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-07-01 09:37:21 -07:00
Harry Zhang
96ee432674 Refactoring minor fix
Signed-off-by: Harry Zhang <harryz@hyper.sh>
2016-06-30 23:13:04 -04:00
Kenfe-Mickael Laventure
3dfa04b2f4 Log runtime error message on delete error
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-30 14:09:04 -07:00
Harry Zhang
2ef56b2ee8 Fix fd leak
Signed-off-by: Harry Zhang <harryzhang@zju.edu.cn>
Signed-off-by: Harry Zhang <harryz@hyper.sh>
2016-06-29 03:35:27 -04:00
Kenfe-Mickaël Laventure
2e4e484237 Stop creating /tmp/shim-delete-<pid> as noone uses it (#278)
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-28 11:52:52 -07:00
Kenfe-Mickaël Laventure
b93a33be39 Merge pull request #274 from crosbymichael/start-sync
Call start in containerd
2016-06-27 11:11:31 -07: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
14e79494da Merge pull request #272 from liubin/fix-typos
Fix typos
2016-06-22 07:30:48 -07:00
bin liu
004efe5991 fix typos
Signed-off-by: bin liu <liubin0329@gmail.com>
2016-06-22 14:23:32 +08:00
Kenfe-Mickaël Laventure
a8c73b6959 Merge pull request #270 from crosbymichael/shim-start-error
Return the start error and reap
2016-06-17 11:18:23 -07:00
Michael Crosby
f44458d6b5 Return the start error and reap
Make sure that if we get an error from start it is returned and that we
reap the container's process from create before existing if we were to
send a kill signal.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-06-17 11:03:52 -07:00
Julio Montes
0227e9fb94 Micro Benchmarks: multiples runtimes (#268)
* Micro benchmarks: use container.Runtime to kill container

Signed-off-by: Julio Montes <julio.montes@intel.com>

* Micro benchmarks: add support for multiples runtimes

Signed-off-by: Julio Montes <julio.montes@intel.com>
2016-06-16 14:39:19 -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
Kenfe-Mickaël Laventure
3c889979c9 Update runc to version cc29e3dded8e27ba8f65738f40d251c885030a28 (#267)
It fixes issue encountered while inside a user namespace

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-15 15:08:09 -07:00
Kenfe-Mickaël Laventure
860f3a9494 Merge pull request #266 from crosbymichael/bump-runc
Bump runc to 85873d917e86676e44ccb80719fcb47a79467
2016-06-13 13:15:51 -07:00
Michael Crosby
d307ab6fa2 Bump runc to 85873d917e86676e44ccb80719fcb47a79467
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-06-13 12:50:23 -07:00
Kenfe-Mickaël Laventure
098f9f1a1b Use uin64 for UpdateResource rpc (#265)
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-13 10:59:12 -07:00
Kenfe-Mickaël Laventure
3d900051b6 Fix panic within ctr if the daemon dies while attached to a container (#264)
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-09 14:36:42 -07:00
Kenfe-Mickaël Laventure
a5968ecb85 Update runc to version eb217f273125d3e4d6731389fe804e46e0b14ac6 (#263)
This is needed to get the new `--empty-ns` flag for the restore
operation.

NOTE: I've also updated the vendor.sh script even though this doesn't
pull any new code in

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-09 14:17:04 -07:00
Kenfe-Mickaël Laventure
71c8c8c3b7 Merge pull request #254 from boucher/empty-ns
Support the new empty-ns flag in RunC
2016-06-09 13:58:26 -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
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
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
zhangwei_cs
4176ba7b52 Add multi OCI runtime support for ctr (#250)
Add ctr command line args `--runtime` and `--runtime-args` for multiple
OCI runtime support.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-05-31 10:14:31 -07:00
Anusha Ragunathan
24144682a0 Micro benchmarks for containerd. (#244)
This is the first in a series of micro benchmarks for containerd.
Performance measurement will use containerd objects and methods
that are not dependent on the grpc API and dont require the daemon
to the running. Test will require containerd-shim and runc.

The motivation is to understand the baseline performance at the lowest
containerd layer. A natural extension to this effort would be to write
macro benchmarks which would include API and daemon.

Note:
- Currently measures only one workload (busybox sh) start times. Will
add other bundles and args soon.
- Can use integration-test utils for bundle processing. However, json
marshal/unmarshal is currently timing out standard benchmark times. So
going with default spec for now.

Sample run:
BenchmarkBusyboxSh-4    / # / # / #        2     576013841 ns/op
ok      github.com/docker/containerd/runtime    1.800s

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-05-27 10:35:42 -07:00
Michael Crosby
7fa8fc1477 Regen proto for checkpoint pr (#249)
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-25 17:52:46 -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