oomparser - new constructor to support streaming of new/current OOM events only.#3716
oomparser - new constructor to support streaming of new/current OOM events only.#3716jesseward wants to merge 3 commits into
Conversation
|
This PR is stale because it has been open 90 days with no activity. This PR will be closed in 30 days unless new comments are made or the stale label is removed. To skip these checks, apply the "lifecycle/frozen" label. |
|
Keepalive |
|
@frittentheke @jesseward need this rebased and some kind of test |
2f380de to
2fd1da8
Compare
|
@jesseward would you pick up on this one again? @dims already indicated that it could be merged once rebased and the missing tests where added... |
Ignores OOMs that occurred before the parser was created.
hey @frittentheke, yep. I will rebase as there appears to be some minor changes in the |
Head branch was pushed to by a user without write access
be1e6c5 to
9c58223
Compare
|
@dims fyi here. I have added some tests and refactored. I see there have been some changes around oomparser. Let me know if this change is still relevant in given the changes. |
|
Is there a k/k issue that needs this change? |
hey @dims , I had originally logged this kubernetes/kubernetes#133260 after a Kubelet debugging exercise. Though a different approach is being taken in that issue. so this would stand alone inside of CAdvisor . |
Summary
This adds a new constructor
NewFromNowthat moves the/dev/kmsgreader offset to the end of the queue. Allowing the user to ignore OOM events that occurred prior to the creation of theOomParserobject.Examples
Create stream using
New(default behaviour)Returns all available OOM events in the kmsg buffer. This is the default behaviour and is not changed.
Create stream using
NewFromNowWhen launched, old OOM events are ignored and net new events are reported (as seen at
I0727 20:05:50.120013)Related
cadvisor/utils/oomparser- Add constructor to (optionally) allow streaming of current+new OOMs only. #3715