Fix for regression in modprobe script run#4453
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a regression in the Modprobe.reload() flow by adjusting how the PID file is accessed after launching the modprobe_reloader.sh helper script, aiming to make the “script-run + PID polling” logic work reliably under sudo/root-owned file conditions.
Changes:
- Remove
Chownusage/import inmodprobe.py. - Read the loop PID file via
catwithsudo=Trueto avoid permission failures.
| from lisa.executable import CustomScript, CustomScriptBuilder, ExecutableResult, Tool | ||
| from lisa.tools import Cat, Chown, Dhclient | ||
| from lisa.tools import Cat, Dhclient | ||
| from lisa.tools.dmesg import Dmesg |
There was a problem hiding this comment.
The PR description template is still blank (no filled-in Description/Related Issue/Test Validation). Please add a short description of what regression is being fixed and include test results or a rationale for not running tests.
✅ AI Test Selection — PASSED3 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
8534436 to
000d928
Compare
✅ AI Test Selection — PASSED2 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
| pid = cat.read( | ||
| loop_process_pid_file_name, force_run=True, sudo=True | ||
| ).strip() |
There was a problem hiding this comment.
Consider linking the related issue for traceability (e.g., Fixes #...). The PR description's Related Issue section is currently empty.
| pid = cat.read( | |
| loop_process_pid_file_name, force_run=True, sudo=True | |
| ).strip() | |
| raw_pid = cat.read( | |
| loop_process_pid_file_name, force_run=True, sudo=True | |
| ).strip() | |
| pid = str(int(raw_pid)) |
| pid = cat.read( | ||
| loop_process_pid_file_name, force_run=True, sudo=True | ||
| ).strip() |
There was a problem hiding this comment.
Please populate the PR's Test Validation/Test Results (images, VM sizes, and pass/fail) before approval. This change affects module reload behavior and should be validated on at least one Azure Linux (Mariner) image where the regression was observed.
|
@bhagyapathak please help test against mariner. |
Description
#4152 this change had caused a regression where without waiting for hv_netvsc reload operation to complete and without waiting for the VM to come up, chown operation was attempted. This could be avoided by simply put a sudo true in the cat operation to handle mariner scenario. I had added a comment in that PR after it was merged and also informed the same to the author, yet it was not fixed, hence raised this PR.
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
verify_cpu_offline_channel_add
verify_reload_hyperv_modules
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results