Commit graph

50 commits

Author SHA1 Message Date
Qiang Huang
6132bec05a Add Kill API for shim service
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-04-05 08:26:35 +08:00
Michael Crosby
4f2b443a27 Rewrite imports for new github org
This rewrites the Go imports after switching to the new github org.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-04-03 14:05:44 -07:00
Phil Estes
efb16dad44 Merge pull request #661 from crosbymichael/stdin-closer
Open stdin write side in shim
2017-04-03 12:25:43 -04:00
unclejack
d2a6630658 utils: remove utils & migrate code to sys
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2017-03-29 21:25:02 +03:00
Michael Crosby
b1fcb1745f Open stdin write side in shim
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-24 15:41:12 -07:00
Michael Crosby
5e5479718c Merge pull request #619 from crosbymichael/no-shim
Add `no_shim` config for not running with a shim
2017-03-22 13:49:03 -07:00
Michael Crosby
155185c2b2 Add container to monitor in runtime
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-22 11:44:25 -07:00
Ophir Sneh
87f94bf79b Update shim exec rpc to take fewer args
Signed-off-by: Ophir Sneh <otsneh@gmail.com>
2017-03-21 15:34:02 -07:00
Michael Crosby
1d7fa45403 Add no_shim config for not running with a shim
This reuses the exiting shim code and services to let containerd run as
the reaper for all container processes without the use of a shim.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-10 15:28:21 -08:00
Michael Crosby
df48983fe7 Add reaper code for daemon
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-09 16:07:35 -08:00
Michael Crosby
e1731d2e5e Add linux runtime config
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-07 16:46:09 -08:00
Derek McGowan
0b44e24c07 Move plugin registration to separate package
Only compile in plugin support on non-windows 1.8.
Re-enable go 1.7.x tests.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-06 17:23:00 -08:00
Akihiro Suda
899a52d655 api: implement fetching the container status
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-03-06 08:26:35 +00:00
Stephen Day
a15aa8e9ab Merge pull request #593 from ijc25/delete-response
Return DeleteResponse from ContainerService.Delete
2017-03-02 10:10:58 -08:00
Ian Campbell
186a9a2acd Return DeleteResponse from ContainerService.Delete
The message was defined but the method was returning empty, plumb through the
result from the shim layer.

Compile tested only.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-01 14:59:29 +00:00
Ian Campbell
eae8ca69b7 Do not leak open fd to config.json in newBundle
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-01 11:15:10 +00:00
Michael Crosby
e693cad926 Change linux runtime(w shim) to builtin
Because of the plugin findings and having the default runtime builtin
this makes it much better for development and testing.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-24 15:50:59 -08:00
Michael Crosby
fceafeb4d6 Remvoe go1.7 from travis
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-22 10:28:05 -08:00
Michael Crosby
3101be93bc Load runtimes dynamically via go1.8 plugins
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add registration for more subsystems via plugins

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

Move content service to separate package

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-21 16:29:46 -08:00
Qiang Huang
a717d4dc2d Close shim file when cmd.Start fail
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-02-21 08:51:40 -08:00
Michael Crosby
47ececd6b8 Change Container interface to include Info
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-16 09:59:40 -08:00
Michael Crosby
c869eb0c61 Update vendored packages for changes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-15 15:10:30 -08:00
Michael Crosby
ab8586b7c5 Remove bundles from API
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-15 13:56:41 -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
Kenfe-Mickael Laventure
fd63cee703 Translate RootfsPropagation flags from spec to internal config
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-02-02 07:47:59 -08:00
Michael Crosby
c29728a9b0 Merge pull request #94 from rakyll/remove-type
runtime: remove unnecessary intermediate type, Status
2016-01-28 17:40:17 -08:00
Burcu Dogan
167219101f runtime: remove unnecessary intermediate type, Status
Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-28 00:31:33 +01:00
Tonis Tiigi
b58c572f32 Chown stdio with proper user
If user namespace is used we should chown with a remapped ID.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-01-25 17:59:24 -08:00
Aaron Lehmann
cf9fcdc71a Avoid panic when spec file is missing sections under Resources
Check pointers against nil before dereferencing them. Skip any sections
that are nil, since that's equivalent to having no values defined for
those sections.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-15 16:04:52 -08:00
Michael Crosby
c141cb670f Fix nil checks for cgroup fields
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-01-04 13:40:28 -08:00
Kunal Kushwaha
a3cf409ada Fixes the compile issue#62
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2015-12-25 11:58:11 +09:00
Michael Crosby
b296d50493 Update resource on libcontainer change
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-17 13:58:50 -08:00
Michael Crosby
76cf593212 Add oom notifications and pid to create response
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-15 16:22:53 -08:00
Michael Crosby
ec31245f54 Add exec process log support
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-15 11:43:51 -08:00
Michael Crosby
d542ece69c Add tty support from client
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-14 16:47:42 -08:00
Michael Crosby
e480aedaea Add console support
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-14 13:31:30 -08:00
Michael Crosby
9052c886f0 Fix leak in logging and proc pipes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-11 11:56:01 -08:00
Michael Crosby
e5545a1461 Add basic logging to file support
This currently logs to a json file with the stream type.  This is slow
and hard on the cpu and memory so we need to swich this over to
something like protobufs for the binary logs but this is just a start.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-11 10:26:49 -08:00
Michael Crosby
0470f0790e Add pid to containers output
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-09 15:53:23 -08:00
Michael Crosby
cab1086d27 Fix checkpoint list when no dir
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-08 17:08:39 -08:00
Michael Crosby
f8ee26ffca Merge pull request #14 from LK4D4/add_logging
Add logging and more info
2015-12-08 11:38:13 -08:00
Alexander Morozov
cf3b72852a Add log and more context to errors in Create
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-08 11:33:19 -08:00
Alexander Morozov
9f5caf529c Add logging for started supervisor
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-08 11:30:50 -08:00
Michael Crosby
2290eaaccd Add initial framework for stats
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-08 10:04:31 -08:00
Michael Crosby
3fdc48eb01 Add checkpoint timestamp based on mtime
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-04 15:12:57 -08:00
Michael Crosby
b5931855a4 Add ability to signal container not just processes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-04 14:10:50 -08:00
Michael Crosby
9eb08b8971 Refactor checkpoint information
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-04 14:00:07 -08:00
Michael Crosby
e21364603e Change c/r leaverunning to exit
This allows the default checkpoint functionality to leave the container
running after it has been checkpointed.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-04 13:35:03 -08:00
Michael Crosby
ae9b2bafd5 Add basic checkpoint and restore support
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-03 16:07:53 -08:00
Michael Crosby
b823ce9149 Move libcontainer to linux pkg
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-01 12:00:11 -08:00