-
Notifications
You must be signed in to change notification settings - Fork 15
Fix yum output parsing to avoid false reboot detection #336
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1062,7 +1062,7 @@ def do_processes_require_restart(self): | |
| continue | ||
|
|
||
| process_details = re.split(r'\s+', line.strip()) | ||
| if len(process_details) < 7: | ||
| if len(process_details) < 7 or line.find("packages excluded") >= 0: | ||
|
||
| self.composite_logger.log_verbose("[YPM] > Inapplicable line: " + str(line)) | ||
| continue | ||
| else: | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parser still accepts any line with >=7 whitespace-separated tokens whose first token is an int as a “process” line. The new special-case filter for "packages excluded" fixes one known message, but the overall parsing remains overly permissive and can misclassify other numeric-prefixed informational lines. Consider switching to a stricter format validation for yum-ps rows (e.g., regex/column validation for CPU/RSS/State/uptime) so future yum output variations don’t reintroduce false reboot detection.