Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/src/package_managers/YumPackageManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link

Copilot AI Mar 2, 2026

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.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

Add/adjust unit coverage to lock in this behavior: extend the YumPackageManager reboot/process parsing tests (and the LegacyEnvLayerExtensions "sudo yum ps" fixture) with a sample line like " packages excluded …" appearing in the yum-ps output, and assert that it does not increment process_count / trigger reboot pending.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please share an example of why this change is needed. In the sense, what was the current behavior seen on a VM, with the help of logs and how does this change correct it, again with the help of in VM logs

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Before:
The customer saw wrong update status and higher machine counts because some AWS Linux machines printed yum messages that were misread as reboot‑required. This caused machines to show Pending reboot and made the counters add up to more than the actual number of servers.
After:
Those yum informational lines are now ignored and no longer treated as reboot signals.
This fixes the false Pending reboot status and brings the machine counters back to the correct total.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm asking for logs from a VM for the before and after scenarios. Create a VM, reproduce the before scenario which show the false reboot detection and then another set of logs that show this issue fixed with the help of your code change

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Before (VM logs):
The yum output contained informational lines such as
62 packages excluded due to repository priority protections
which were parsed as process entries. In the extension logs this caused the reboot‑required process count to increment, resulting in the VM being marked as Pending reboot even though no reboot was actually needed.

After (VM logs):
With the change, the same line is logged as
[YPM] > Inapplicable line: 62 packages excluded due to repository priority protections
and is skipped during parsing. The reboot‑required process count is no longer incremented, and the VM correctly reports No pending reboot.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your response is just a statement on what the before and after should look like, this is not however an actual log fetched from a VM. Repeating my ask from before:
image

@sadiksubhani9-sudo, you need to create a VM, run this code in that VM, fetch logs from the VM that demonstrates the before scenario. Then run your changed code in the VM, fetch logs that demonstrate the after scenario

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@rane-rajasi sending a reminder for the PR review...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@kjohn-msft, Please take a look when you get a chance. Thanks!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@rane-rajasi requested the contents of a specific folder (ideally zipped) from the test machine - prior to the change and after the change. I don't see that in the internal folder. The goal is to understand the dev-test validation flow associated with any change (this change implicitly being simple). Which means:

  • demonstrating prior behavior and new behavior with full execution log files from a representative image.
  • having corresponding unit tests based on those samples.

Copy link
Copy Markdown
Contributor

@rane-rajasi rane-rajasi Apr 16, 2026

Choose a reason for hiding this comment

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

@sadiksubhani9-sudo please share the contents of the extension logs folder, path shared here:

image

Koshy is referring the same in this feedback

Copy link
Copy Markdown
Author

@sadiksubhani9-sudo sadiksubhani9-sudo Apr 23, 2026

Choose a reason for hiding this comment

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

self.composite_logger.log_verbose("[YPM] > Inapplicable line: " + str(line))
continue
else:
Expand Down
Loading