Skip to content

cgroup2: implement containerd.events.TaskOOM event#4273

Merged
crosbymichael merged 1 commit intocontainerd:masterfrom
AkihiroSuda:oomv2
Jun 1, 2020
Merged

cgroup2: implement containerd.events.TaskOOM event#4273
crosbymichael merged 1 commit intocontainerd:masterfrom
AkihiroSuda:oomv2

Conversation

@AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented May 20, 2020

How to test (from opencontainers/runc#2352 (comment)):

(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.

DRAFT: Requires containerd/cgroups#158

@crosbymichael crosbymichael mentioned this pull request May 20, 2020
11 tasks
@containerd containerd deleted a comment from theopenlab-ci bot May 20, 2020
@containerd containerd deleted a comment from theopenlab-ci bot May 20, 2020
@AkihiroSuda AkihiroSuda marked this pull request as ready for review May 20, 2020 16:31
@containerd containerd deleted a comment from theopenlab-ci bot May 20, 2020
@AkihiroSuda AkihiroSuda added this to the 1.4 milestone May 26, 2020
@AkihiroSuda AkihiroSuda requested review from Zyqsempai, crosbymichael and fuweid and removed request for crosbymichael May 27, 2020 23:31
@fuweid
Copy link
Member

fuweid commented May 28, 2020

@AkihiroSuda will take a look today

Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good but I think we can add log for error :)

How to test (from opencontainers/runc#2352 (comment)):
  (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>
Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@crosbymichael crosbymichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crosbymichael crosbymichael merged commit 62dd141 into containerd:master Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants