Skip to content

Fix for regression in modprobe script run#4453

Open
kanchansenlaskar wants to merge 1 commit into
mainfrom
kasenlaskar/fix_for_regression_in_modprobe_script_run
Open

Fix for regression in modprobe script run#4453
kanchansenlaskar wants to merge 1 commit into
mainfrom
kasenlaskar/fix_for_regression_in_modprobe_script_run

Conversation

@kanchansenlaskar
Copy link
Copy Markdown
Collaborator

@kanchansenlaskar kanchansenlaskar commented Apr 30, 2026

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

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:
verify_cpu_offline_channel_add
verify_reload_hyperv_modules

Impacted LISA Features:

Tested Azure Marketplace Images:

Test Results

Image VM Size Result
PASSED / FAILED / SKIPPED

Copilot AI review requested due to automatic review settings April 30, 2026 06:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Chown usage/import in modprobe.py.
  • Read the loop PID file via cat with sudo=True to avoid permission failures.

Comment thread lisa/tools/modprobe.py Outdated
Comment thread lisa/tools/modprobe.py
Comment on lines 10 to 12
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
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

3 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 3
❌ Failed 0
⏭️ Skipped 0
Total 3
Test case details
Test Case Status Time (s) Message
verify_uio_binding (lisa_0_0) ✅ PASSED 20.611
verify_gpu_rescind_validation (lisa_0_2) ✅ PASSED 14.290
verify_reload_hyperv_modules (lisa_0_1) ✅ PASSED 186.652

@kanchansenlaskar kanchansenlaskar force-pushed the kasenlaskar/fix_for_regression_in_modprobe_script_run branch from 8534436 to 000d928 Compare April 30, 2026 06:56
@kanchansenlaskar kanchansenlaskar marked this pull request as ready for review April 30, 2026 07:03
Copilot AI review requested due to automatic review settings April 30, 2026 07:03
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

2 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 1
Total 2
Test case details
Test Case Status Time (s) Message
verify_bbr3_applies_to_live_tcp_flow (lisa_0_0) ⏭️ SKIPPED 11.630 skipped: bbr3 is not available in net.ipv4.tcp_available_congestion_control. CONFIG_TCP_CONG_BBR3 is not enabled in kern
verify_reload_hyperv_modules (lisa_0_1) ✅ PASSED 187.496

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread lisa/tools/modprobe.py
Comment on lines +217 to +219
pid = cat.read(
loop_process_pid_file_name, force_run=True, sudo=True
).strip()
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

Consider linking the related issue for traceability (e.g., Fixes #...). The PR description's Related Issue section is currently empty.

Suggested change
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))

Copilot uses AI. Check for mistakes.
Comment thread lisa/tools/modprobe.py
Comment on lines +217 to +219
pid = cat.read(
loop_process_pid_file_name, force_run=True, sudo=True
).strip()
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@LiliDeng
Copy link
Copy Markdown
Collaborator

LiliDeng commented May 8, 2026

@bhagyapathak please help test against mariner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants