Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent: Fix an issue reporting OOM events by mistake #8773

Merged
merged 1 commit into from Jan 5, 2024

Conversation

justxuewei
Copy link
Member

The agent registers an event fd in memory.oom_control. An OOM event is
forwarded to containerd when the event is emitted, regardless of the
content in that file.

I observed content indicating that events should not be forwarded, as shown
below. When oom_kill is set to 0, it means no OOM has occurred. Therefore,
it is important to check the content to avoid mistakenly forwarding OOM
events.

oom_kill_disable 0
under_oom 0
oom_kill 0

Fixes: #8715

@@ -165,22 +166,17 @@ async fn register_memory_event(

tokio::spawn(async move {
loop {
let sender = sender.clone();
Copy link
Contributor

Choose a reason for hiding this comment

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

why the line deleted ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Cuz clone() is unnecessary here.

Copy link
Contributor

@Apokleos Apokleos left a comment

Choose a reason for hiding this comment

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

@justxuewei
Copy link
Member Author

/test

@justxuewei justxuewei force-pushed the dbs-k8s-fragile branch 2 times, most recently from ff86888 to fb3cf6b Compare January 5, 2024 03:06
The agent registers an event fd in `memory.oom_control`. An OOM event is
forwarded to containerd when the event is emitted, regardless of the
content in that file.

I observed content indicating that events should not be forwarded, as shown
below. When `oom_kill` is set to 0, it means no OOM has occurred. Therefore,
it is important to check the content to avoid mistakenly forwarding OOM
events.

```
oom_kill_disable 0
under_oom 0
oom_kill 0
```

Fixes: kata-containers#8715

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
@justxuewei
Copy link
Member Author

/test

@justxuewei justxuewei merged commit 192c6ee into kata-containers:main Jan 5, 2024
165 of 188 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test size/small Small and simple task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests: An empty-dir test for Dragonball is fragile
4 participants