Commit graph

57 commits

Author SHA1 Message Date
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
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
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
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
Kenfe-Mickael Laventure
5a688c3e28 Cleanup stdio files upon start and exec termination (ctr).
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-02 13:59:40 -07:00
Mrunal Patel
79de8a2fc5 Add missing state command to command list
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-04-29 16:08:11 -07:00
Kenfe-Mickaël Laventure
25de9de446 Merge pull request #214 from HuKeping/constant
Replace exit codes by Constants
2016-04-26 16:46:23 -07:00
Michael Crosby
f7f4d8677f Remove windows code and simplify linux
Windows will not use containerd and its just unused code and unneed
complexity to keep it all around.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-26 14:10:41 -07:00
HuKeping
10800f62ae Use constant to replace integer literal
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-26 06:02:49 -04:00
Aleksa Sarai
0ec0bb380f ctr: support proto://address format for --address
In order to match the containerd --listen update, allow users to set any
address of the form proto://address.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-04-23 02:20:46 +10:00
Zhang Wei
59720469ac Provide more useful help information for ctr
`ctr containers/checkpoints` contains lots of important subcommands,
but now help command can't show subcommands. Adding subcommands to
help information will avoid user from digging into the code for
getting necessary command list.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-18 15:32:46 +08: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
Kenfe-Mickael Laventure
4ecebc4e0f Add timeout option for GRPC connection
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-28 10:09:40 -07:00
Michael Crosby
a06dec80cd Merge pull request #151 from mlaventure/ctr-retrieve-missed-events
Retrieve ctr missed events once connection is re-established
2016-03-24 16:57:18 -07:00
Michael Crosby
5f0f162c62 Merge pull request #150 from mlaventure/ctr-reset-termios
Fix cases where ctr wouldn't properly restore the terminal termios
2016-03-23 15:35:57 -07:00
Kenfe-Mickael Laventure
2b8ae55b0b Retrieve ctr missed events once connection is re-established
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-22 11:25:20 -07:00
Kenfe-Mickael Laventure
cad6fb95ab Fix cases where ctr wouldn't properly restore the terminal termios
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-22 10:19:38 -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
0dd075a47b Add update rpc for resource updates
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-07 15:23:52 -08:00
John Howard
d4ca79c978 Getting ctr closer to compiling on Windows
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-29 12:42:30 -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
Kenfe-Mickael Laventure
d8412061d2 Add watch command to ctr
This command dump events matching a given container id or all events
if no id is provided.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-02-25 10:10:22 -08:00
Kenfe-Mickael Laventure
d0ab285704 Add resume command to ctr
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-02-25 10:10:05 -08:00
Kenfe-Mickael Laventure
450c8223e6 Add pause command to ctr
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-02-25 10:09:22 -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
d6bd304c92 Add labels for containers
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 13:44:25 -08:00
Michael Crosby
76d69b4ed8 Add id to state command to return single container
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 12:20:29 -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
f5fdc548e8 Add tty resize api
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:23 -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
6808dbc02f Add reconnect for attach events
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
facfce3e8e ctr: convert bundle paths to absolute
Fixes #75.

Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-25 19:47:54 -08:00
Michael Crosby
daaa7096a0 Merge pull request #87 from rakyll/ctr-readability
Do not export symbols from the main package
2016-01-25 14:18:56 -08:00
Burcu Dogan
40086bd92b Do not export symbols from the main package
main packages are not importable; see the discussion at https://github.com/golang/go/issues/4210

Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-23 23:42:16 -08:00
Burcu Dogan
6014cf22d8 Fix typo
Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-23 14:32:56 -08:00
Lei Jitang
80ce7650f4 Fix container exit without restore terminal
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-06 16:25:38 +08:00
Alexander Morozov
e55ebadb09 Revert "Use protoversion for containerd version"
This reverts commit d2e319523d.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-05 13:07:47 -08:00
Peter Edge
d2e319523d Use protoversion for containerd version
Signed-off-by: Peter Edge <peter.edge@gmail.com>
2015-12-18 13:06:04 +00:00
Tonis Tiigi
ae5c752449 Close stdin after data has been copied
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-17 13:42:08 -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
94d807aec4 Get terminal setting from spec
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-15 10:51:12 -08:00
Alexander Morozov
ca4191ce41 Use unix-socket as communication channel
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Conflicts:
	ctr/container.go
2015-12-14 17:35:49 -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
327573a61e Make stats command be subcommand
This makes the stats command be a sub command of container.
It also makes the id provided via the first arg instead of a flag.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-14 16:06:27 -08:00
Alexander Morozov
4bc322397f Add initial implementation of stats
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-14 14:45:06 -08:00