Skip to content

feat(logwatchers): Restart kmsg parser if channel closes#1192

Merged
k8s-ci-robot merged 3 commits intokubernetes:masterfrom
arjraman:master
Apr 10, 2026
Merged

feat(logwatchers): Restart kmsg parser if channel closes#1192
k8s-ci-robot merged 3 commits intokubernetes:masterfrom
arjraman:master

Conversation

@arjraman
Copy link
Copy Markdown
Contributor

@arjraman arjraman commented Dec 12, 2025

This PR adds an option to restart kmsg parser if channel closes.

When /dev/kmsg gets flooded with messages, the kmsg file descriptor can close unexpectedly. Instead of exiting the watcher and restarting the whole pod, I would like to restart the kmsg parser.

Related issues: #1002, #1003, #1004, #1168, #1174

cc @hakman

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Dec 12, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @arjraman!

It looks like this is your first PR to kubernetes/node-problem-detector 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/node-problem-detector has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 12, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @arjraman. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Dec 12, 2025
@hakman
Copy link
Copy Markdown
Member

hakman commented Dec 12, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 12, 2025
@geetasg
Copy link
Copy Markdown

geetasg commented Dec 18, 2025

requesting review feedback @Random-Liu @yujuhong. cc @hakman @arjraman

@hakman
Copy link
Copy Markdown
Member

hakman commented Dec 18, 2025

/cc @wangzhen127 @SergeyKanzhelev

Removed log message for disabled restart on error.
@geetasg
Copy link
Copy Markdown

geetasg commented Jan 12, 2026

@hakman can we please get review feedback on this? Thank you.

@daveoy
Copy link
Copy Markdown
Contributor

daveoy commented Feb 18, 2026

i wrote this feature last year and it never got reviewed / approved. this has been in use in my org for a year now. its saved us many many times 👍

@hakman
Copy link
Copy Markdown
Member

hakman commented Feb 18, 2026

Sorry for delay here @geetasg @daveoy, I will pick this up this week to review.

@daveoy
Copy link
Copy Markdown
Contributor

daveoy commented Feb 18, 2026

@hakman i am biased, but I prefer the solution in #1004

@geetasg
Copy link
Copy Markdown

geetasg commented Feb 24, 2026

@hakman @daveoy — requesting your feedback on this. We currently have a workaround in place, but ideally NPD should be made resilient to this scenario. Open to discussing alternative approaches. cc @arjraman

@geetasg
Copy link
Copy Markdown

geetasg commented Mar 20, 2026

@hakman @daveoy - can you please help review? thanks

Copy link
Copy Markdown
Member

@hakman hakman left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, had some spare time and got to the review, at least a first pass. Thanks for your patience.

@arjraman
Copy link
Copy Markdown
Contributor Author

@hakman addressed comments

Copy link
Copy Markdown
Member

@hakman hakman left a comment

Choose a reason for hiding this comment

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

This looks great, thanks @arjraman!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arjraman, hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 10, 2026
@hakman hakman changed the title feat(kmsgLogWatcher): Add option to restart kmsg parser if channel closes logwatchers: Restart kmsg parser if channel closes Apr 10, 2026
@hakman hakman changed the title logwatchers: Restart kmsg parser if channel closes feat(logwatchers): Restart kmsg parser if channel closes Apr 10, 2026
@hakman
Copy link
Copy Markdown
Member

hakman commented Apr 10, 2026

/retest

@k8s-ci-robot k8s-ci-robot merged commit 0c4cc67 into kubernetes:master Apr 10, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants