Skip to content

Harden no-extension CVT execution - #4648

Open
mohshei-786 wants to merge 1 commit into
microsoft:mainfrom
mohshei-786:mohshei/cvt-runner-safety
Open

Harden no-extension CVT execution#4648
mohshei-786 wants to merge 1 commit into
microsoft:mainfrom
mohshei-786:mohshei/cvt-runner-safety

Conversation

@mohshei-786

Copy link
Copy Markdown
Contributor

Summary

  • exclude the physical root disk from size-based CVT data-disk selection
  • log disk topology to make device-selection and ENOSPC failures diagnosable
  • enforce a configurable 30-minute timeout for each indskflt_ct testcase
  • correct single-line testcase updates in cvt_status.json

Why

A SAIL 8.3 customer run reported Disk Write failed with error=0x1c, followed by barrier ioctl EPERM, and then remained hung until the overall 5-6 hour timeout. The root-disk exclusion prevents kernel-dependent disk enumeration from selecting the OS disk, while the per-test timeout prevents a failed testcase from blocking the entire run.

Validation

  • Native SAIL kernel: 6.4.0-150700.53.34.1.uis.00-default
  • ASRDFD driver: 2.3.79.63
  • mixed completed successfully in 697 seconds
  • revised script passes bash -n on SAIL 8.3

The timeout can be overridden with CVT_TEST_TIMEOUT_SECONDS when a longer testcase duration is expected.

Exclude the root disk from size-based data disk selection, capture disk topology for diagnostics, enforce a configurable per-test timeout, and correct testcase status updates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: fe96f568-56f4-48e4-b1c9-eadfa2e73949
Copilot AI lite review requested due to automatic review settings August 11, 2026 09:54

Copilot AI left a comment

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.

Pull request overview

This PR hardens the no-extension CVT execution path used by the VM extension validation suite by improving disk selection diagnostics/safety and preventing individual indskflt_ct testcases from hanging the entire run.

Changes:

  • Excludes the root (OS) disk from size-based data-disk selection and logs block-device topology for troubleshooting.
  • Adds a per-test configurable timeout (CVT_TEST_TIMEOUT_SECONDS, default 1800s) around indskflt_ct execution.
  • Fixes cvt_status.json testcase updates to match single-line testcase entries.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +342 to +350
local root_source
root_source=$(findmnt -n -o SOURCE /)
local root_disk
root_disk=$(lsblk -no PKNAME "$root_source" 2>/dev/null)
if [ -n "$root_disk" ]; then
root_disk="/dev/$root_disk"
else
root_disk="$root_source"
fi
Comment on lines +458 to +461
if [ "$cvt_ret" -eq 124 ] || [ "$cvt_ret" -eq 137 ]; then
log "$subtestname: TIMED OUT after ${cvt_test_timeout_seconds}s"
return $FAILED_TEST
fi

time "$test_dir/indskflt_ct" \
local cvt_ret=0
time timeout --signal=TERM --kill-after=30 "$cvt_test_timeout_seconds" \
@LiliDeng

Copy link
Copy Markdown
Collaborator

Please check the results, shell should be set as true

2026-08-12T03:49:37.7930424Z 2026-08-12 03:49:37.792[7088][DEBUG] lisa.env[generated_0].node[0].cmd[663] cmd: ['sudo', 'ls', 'homel****tlisa_working2026081220260812-012219-435'], cwd: None, shell: False, sudo: True, nohup: False, posix: True, remote: True, encoding: utf-8
2026-08-12T03:49:37.9437453Z 2026-08-12 03:49:37.939[7264][DEBUG] lisa.env[generated_0].node[0].cmd[663].stdout ls: cannot access 'homel****tlisa_working2026081220260812-012219-435': No such file or directory
2026-08-12T03:49:37.9512924Z 2026-08-12 03:49:37.950[7088][DEBUG] lisa.env[generated_0].node[0].cmd[663] execution time: 0.157 sec, exit code: 2
2026-08-12T03:49:37.9513926Z 2026-08-12 03:49:37.950[7088][INFO] lisa.case[verify_asr_by_cvt_no_extension][lisa_0_0] ASR CVT (no-extension) test completed with exit code '0'

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