Akihiro Suda
525bffd194
snapshot: support JSON marshalling for Info
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-09-01 04:47:35 +00:00
Akihiro Suda
fef7f3addc
ctr: add ctr snapshot info <key>
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-09-01 04:41:34 +00:00
Ian Campbell
94b0d0ecd0
ctr: drop labels from ctr containers
subcommand list
...
The labels can be very long (e.g. cri-containerd stores a large JSON metadata
blob as `io.cri-containerd.container.metadata`) which renders the output
useless due to all the line wrapping etc.
The information is still available in `ctr containers info «name»`.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-08-31 23:42:21 +01:00
Kenfe-Mickael Laventure
1b79170849
linux: Add RuntimeRoot to RuncOptions
...
This allow specifying wher the OCI runtime should store its state data.
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-31 14:35:05 -07:00
Kenfe-Mickael Laventure
ab0cb4e756
linux: Honor RuncOptions if set on container
...
This also fix the type used for RuncOptions.SystemCgroup, hence introducing
an API break.
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-31 14:35:05 -07:00
Kenfe-Mickael Laventure
e0d8cb1366
Fix retrieval of container Runtime.Options field
...
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-31 12:05:39 -07:00
Kenfe-Mickaël Laventure
22df20b35f
Merge pull request #1452 from crosbymichael/reaper2
...
Update reaper for multiple subscribers
2017-08-31 11:52:23 -07:00
Michael Crosby
6b4c4a2937
Update reaper for multipe subscribers
...
Depends on https://github.com/containerd/go-runc/pull/24
The is currently a race with the reaper where you could miss some exit
events from processes.
The problem before and why the reaper was so complex was because
processes could fork, getting a pid, and then fail on an execve before
we would have time to register the process with the reaper. This could
cause pids to fill up in a map as a way to reduce the race.
This changes makes the reaper handle multiple subscribers so that the
caller can handle locking, for when they want to wait for a specific
pid, without affecting other callers using the reaper code.
Exit events are broadcast to multiple subscribers, in the case, the runc
commands and container pids that we get from a pid-file. Locking while
the entire container stats no longs affects runc commands where you want
to call `runc create` and wait until that has been completed.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-31 14:29:47 -04:00
Stephen J Day
9255e752b3
containerd: export Subscribe method on client
...
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-08-31 11:14:03 -07:00
Phil Estes
c2e894c33a
Merge pull request #1448 from darrenstahlmsft/ConsoleSize
...
Ensure ConsoleSize is not nil
2017-08-31 08:49:45 -04:00
Stephen Day
c1c2aafffe
Merge pull request #1444 from Random-Liu/add-image-config
...
Add image config function.
2017-08-30 17:27:23 -07:00
Darren Stahl
04c6bf42e2
Ensure ConsoleSize is not nil
...
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-08-30 16:34:20 -07:00
Lantao Liu
76e016ca30
Add image config function.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-30 23:02:43 +00:00
Phil Estes
0baecaa7cf
Merge pull request #1439 from mlaventure/allow-setting-rutime-opts
...
Allow setting runtime options when using WithRuntime()
2017-08-30 15:59:14 -04:00
Kenfe-Mickaël Laventure
49e3d43ff2
Merge pull request #1443 from crosbymichael/daemon-cgroup
...
Place containerd inside cgroup
2017-08-30 10:45:19 -07:00
Michael Crosby
932246b575
Place containerd inside cgroup
...
This adds a config option to place the `containerd` daemon process into
a cgroup so that proper resource usage and accounting can be applied.
It defaults to not being place inside a cgroup and will create a new
cgroup if the `path` does not exist in the config or join an existing
`path` if it already exists.
```toml
[cgroup]
path = "/containerd"
```
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-29 15:00:27 -04:00
Michael Crosby
c3711c3866
Merge pull request #1319 from mlaventure/handle-sigkilled-shim
...
Handle sigkilled shim
2017-08-29 14:06:17 -04:00
Michael Crosby
744308a952
Merge pull request #1440 from mlaventure/fix-shim-panic
...
Fix panic in CloseIO when not Stdin was allocated for a process
2017-08-29 13:33:05 -04:00
Kenfe-Mickael Laventure
42b131c1f3
Allow setting runtime options when using WithRuntime()
...
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 10:03:51 -07:00
Kenfe-Mickael Laventure
1c92c0ecbf
Fix panic in CloseIO when not Stdin was allocated for a process
...
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 09:58:48 -07:00
Kenfe-Mickaël Laventure
456e1697ee
Merge pull request #1438 from crosbymichael/apparmor
...
Add default apparmor profile generation
2017-08-29 09:55:34 -07:00
Phil Estes
7dd87c35ee
Merge pull request #1436 from crosbymichael/security
...
Add security mailing list to readme and releases
2017-08-29 12:19:59 -04:00
Michael Crosby
2b46989dbe
Add default apparmor profile generation
...
This adds default apparmor profile generation to the containerd client
so that profiles can be generated with a SpecOpt
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-29 12:03:24 -04:00
Kenfe-Mickael Laventure
edd1da8591
Use configured runtime when cleaning up after dead shim
...
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 08:27:44 -07:00
Kenfe-Mickael Laventure
700120c066
Don't build binaries when running make vet
...
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 08:27:44 -07:00
Kenfe-Mickael Laventure
3f34c421d3
Add missing "/tasks/exec-started" event topic
...
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 08:27:44 -07:00
Kenfe-Mickael Laventure
dbd3eff1e6
containerd: add state flag to specify state dir
...
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 08:27:44 -07:00
Kenfe-Mickael Laventure
d541567119
Handle SIGKILL'ed shim while daemon is running
...
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 08:27:44 -07:00
Kenfe-Mickael Laventure
c23f29ebce
containerd-shim: Don't try to delete container twice
...
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 08:27:44 -07:00
Kenfe-Mickael Laventure
eb4abac9f7
linux: Prevent deadlock in reaper.WaitPid()
...
A deadlock can occurs if `WaitPid()` is called twice before the process
dies.
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 08:27:44 -07:00
Kenfe-Mickael Laventure
9923a49e97
linux/shim: Kill container upon SIG{TERM,KILL}
...
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 08:27:44 -07:00
Michael Crosby
6ec92ddbc9
Merge pull request #1437 from darrenstahlmsft/LCOWConfig
...
LCOW: Split Windows and Linux HCS config generation
2017-08-29 10:28:00 -04:00
Darren Stahl
d0b613665a
Split Windows config generation to support LCOW
...
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-08-28 18:05:55 -07:00
Darren Stahl
4a782f7b54
Vendor opengcs and hcsshim
...
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-08-28 15:07:51 -07:00
Michael Crosby
6b6ac8e9f0
Add security mailing list to readme and releases
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-28 17:17:50 -04:00
Michael Crosby
cf09e32618
Merge pull request #1435 from Random-Liu/with-process-kill-all
...
WithProcessKill should kill all processes.
2017-08-28 14:49:18 -04:00
Lantao Liu
2f237b2fde
WithProcessKill should kill all processes.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-28 18:39:00 +00:00
Kenfe-Mickaël Laventure
31b5bb9107
Merge pull request #1434 from crosbymichael/kill-all
...
Add KillOpts for killing all processes
2017-08-28 11:07:12 -07:00
Michael Crosby
ed6b8fb0aa
Add KillOpts for killing all processes
...
Fixes #1431
This adds KillOpts so that a client can specify when they want to kill a
single process or all the processes inside a container.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-28 13:29:47 -04:00
Michael Crosby
a19761874e
Merge pull request #1428 from mlaventure/go1.9
...
Use golang 1.9 on CI
2017-08-28 10:56:28 -04:00
Michael Crosby
b9879d46f4
Merge pull request #1433 from Random-Liu/fix-with-user-id
...
WithUserID should not return error when /etc/passwd doesn't exist.
2017-08-28 10:10:41 -04:00
Lantao Liu
410bcea236
WithUserID should not return error when /etc/passwd doesn't exist.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-28 05:57:49 +00:00
Michael Crosby
360e46ddda
Merge pull request #1429 from dmcgowan/client-use-root-path
...
Use RootPath for resolving path inside of an image
2017-08-25 16:23:28 -04:00
Derek McGowan
44e266b7a7
Use RootPath for resolving path inside of an image
...
Prevents unintentional lookup of host passwd file
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-25 13:16:46 -07:00
Michael Crosby
e4a77fcc0a
Merge pull request #1425 from Random-Liu/add-with-user-id
...
Add WithUserID which gets uid and gid from image's /etc/passwd.
2017-08-25 16:00:49 -04:00
Lantao Liu
bb9e2bfa43
Add WithUserID which gets uid and gid from image's /etc/passwd.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-25 19:52:48 +00:00
Derek McGowan
ab1968d590
Merge pull request #1427 from crosbymichael/states
...
Add procesStates for shim processes
2017-08-25 12:03:27 -07:00
Derek McGowan
fb427da12f
Merge pull request #1424 from crosbymichael/load-exec
...
Add LoadProcess api to Task
2017-08-25 11:50:56 -07:00
Derek McGowan
1a77db1a2a
Merge pull request #1423 from crosbymichael/events
...
Add Events client method
2017-08-25 11:45:55 -07:00
Michael Crosby
967497097a
Add procesStates for shim processes
...
Use the state pattern to handle process transitions from one state to
another and what actions can be performed on a process in a specific
state.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-25 14:03:55 -04:00