Commit Graph

82 Commits

Author SHA1 Message Date
Lifubang
2d3a4f99ec should no defer when detach
Signed-off-by: Lifubang <lifubang@acmcoder.com>
2018-12-03 19:18:57 +08:00
Ace-Tang
6593399e9f cr: support checkpoint/restore without image
support checkpoint without committing a checkpoint dir into a
checkpoint image and restore without untar image into checkpoint
directory. support for both v1 and v2 runtime

Signed-off-by: Ace-Tang <aceapril@126.com>
2018-11-29 10:19:39 +08:00
Ace-Tang
461222dba8 fix: should get runtime name from container info
when use `ctr t checkpoint`, runtime name should get from container
info, but not passed by flag, since task has already running with
specified runtime

Signed-off-by: Ace-Tang <aceapril@126.com>
2018-11-23 15:39:43 +08:00
Lifubang
2101b1362e add ctr delete --exec-id to debug DeleteProcess
Signed-off-by: Lifubang <lifubang@acmcoder.com>
2018-11-20 19:53:06 +08:00
Lifubang
01f5aa3878 add flag -d for ctr t exec to run a service in container
Signed-off-by: Lifubang <lifubang@acmcoder.com>
2018-11-16 14:29:45 +08:00
Lifubang
bd2a21985c fix container cmd args may parsed as ctr args
Signed-off-by: Lifubang <lifubang@acmcoder.com>
2018-11-15 18:32:04 +08:00
Ace-Tang
c3cac72b92 ctr: fix potential panic in metric
Signed-off-by: Ace-Tang <aceapril@126.com>
2018-10-23 14:01:50 +08:00
Ace-Tang
7ea75ef4a9 ctr: add some metric item
add memory limit, pid info into metric subcommand, since moby also
show them. As blkio read/write IO need more calculation,not add them.

Signed-off-by: Ace-Tang <aceapril@126.com>
2018-10-16 16:54:06 +08:00
Samuel Karp
607888ce29 ctr: make kill use stop-signal by default
The OCI image specification includes a `StopSignal` field in the image
configuration, denoting the system call signal to be sent to the
container to exit.  This commit adds a new `WithImageStopSignal` container
option that can be used for storing the `StopSignal` field as a label on
the container.  This commit also adjusts `ctr run` to call
`WithImageStopSignal` and `ctr tasks kill` to send the signal stored in
that label by default.

Signed-off-by: Samuel Karp <skarp@amazon.com>
2018-09-27 15:53:38 -07:00
Samuel Karp
b392a3a8e4 signals: move ParseSignal to containerd package
Signed-off-by: Samuel Karp <skarp@amazon.com>
2018-09-27 15:53:38 -07:00
Lifubang
66f6dd8b3b add -detach flag for 'ctr t start'
Signed-off-by: Lifubang <lifubang@aliyun.com>
2018-08-27 18:43:56 +08:00
Michael Crosby
4f644dbfd5 Copy io into and out of console
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-08-22 14:04:17 -04:00
Justin Terry (VM)
790c3a3663 Remove extra allocation in NewTask
Reorders the code so that it doesnt overwrite the previous allocation
when creating a NewTask via ctr.exe

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-08-01 13:22:18 -07:00
Samuel Karp
9a34bb046a metrics: add optional json output
Signed-off-by: Samuel Karp <skarp@amazon.com>
2018-07-27 15:21:08 -07:00
Samuel Karp
2c87d120df ctr: add new metrics subcommand
Signed-off-by: Samuel Karp <skarp@amazon.com>
2018-07-27 09:37:57 -07:00
Andrei Vagin
fc2fcf6b2a task: WithExit() doesn't have to overwrite existing options
Signed-off-by: Andrei Vagin <avagin@openvz.org>
2018-07-20 13:19:05 -07:00
Michael Crosby
17ab11a236 Fixes for runtimev2 and checkpoint restore
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-07-20 12:09:29 -04:00
Michael Crosby
da1b5470cd Runtime v2
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-07-17 10:21:29 -04:00
Michael Crosby
fdceb13b14 Add cio.Load for loading io set
This adds a `Load` Opt for cio to load a tasks io/fifos without
attaching or starting the copy routines.

It adds the load method in `ctr` by default so that fifos or other IO
are removed from disk on delete methods inbetween command runs.  It is
not the default for all task loads for backwards compat. and a user may
want to keep io around to reuse or if log files are used.

Fixes #2421

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-06-26 11:48:26 -04:00
Andrei Vagin
60daa414db Allow to checkpoint and restore a container with console
runc already supports this case, so we just need to run it with proper
options.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-28 01:06:42 +03:00
Julien Kassar
9d247718d7 Update ctr tasks list usage for quiet flag
Signed-off-by: Julien Kassar <github@kassisol.com>
2018-04-23 14:53:35 -04:00
Jess Valarezo
e343006b8f ctr: allow for force kill when deleting task process
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2018-03-13 14:58:31 -07:00
Michael Crosby
d3a8055e2d Add --pid-file to ctr
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-02-20 15:10:50 -05:00
Kunal Kushwaha
b12c3215a0 Licence header added
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-02-19 10:32:26 +09:00
Akihiro Suda
507a149488 cio: add WithFIFODir opt
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-01-18 14:33:56 +09:00
Kenfe-Mickael Laventure
0cc79a6ff6
Add no-pivot flag to ctr
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2018-01-09 07:48:30 -08:00
Daniel Nephin
7d4337e738 Reduce the number of IO constructors
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-12-11 15:07:09 -05:00
Jess Valarezo
61c8fe2307 ctr: snapshot->snapshots cmd, add aliases
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-11-29 14:34:02 -08:00
Daniel Nephin
298dabc6c2 Move io.go into cio package
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-11-17 17:04:45 -05:00
Jess Valarezo
1966f9f1b7 ctr: update task kill to take exec-id
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-11-13 10:47:15 -08:00
Jess Valarezo
807f4d2ec7 expose exec-id on ctr task ps
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-11-10 11:38:51 -08:00
Jess Valarezo
c3b70f1d0b ctr: move tasks, run to commands package
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-31 11:57:41 -07:00