Jeremi Piotrowski
821c961c86
pkg/oom/v2: handle EventChan routine shutdown quietly
...
When the cgroup is removed, EventChan is closed (this was pulled in by
8d69c041c5 ). This results in a nil error
being received. Don't log an error in that case but instead return.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com >
2022-02-03 13:20:46 +01:00
haoyun
bbe46b8c43
feat: replace github.com/pkg/errors to errors
...
Signed-off-by: haoyun <yun.hao@daocloud.io >
Co-authored-by: zounengren <zouyee1989@gmail.com >
2022-01-07 10:27:03 +08:00
Akihiro Suda
d3aa7ee9f0
Run go fmt with Go 1.17
...
The new `go fmt` adds `//go:build` lines (https://golang.org/doc/go1.17#tools ).
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp >
2021-08-22 09:31:50 +09:00
Akihiro Suda
2f601013e6
cgroup2: implement containerd.events.TaskOOM event
...
How to test (from https://github.com/opencontainers/runc/pull/2352#issuecomment-620834524 ):
(host)$ sudo swapoff -a
(host)$ sudo ctr run -t --rm --memory-limit $((1024*1024*32)) docker.io/library/alpine:latest foo
(container)$ sh -c 'VAR=$(seq 1 100000000)'
An event `/tasks/oom {"container_id":"foo"}` will be displayed in `ctr events`.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp >
2020-06-01 14:00:13 +09:00
Michael Crosby
6601b406b7
Refactor runtime code for code sharing
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com >
2019-07-08 11:47:53 -04:00