Skip to content

fix(vm): look for e2fsprogs tools in /usr/sbin and /sbin - #3477

Open
natedemoss wants to merge 3 commits into
NVIDIA:mainfrom
natedemoss:fix/vm-e2fsprogs-system-sbin-lookup
Open

natedemoss wants to merge 3 commits into
NVIDIA:mainfrom
natedemoss:fix/vm-e2fsprogs-system-sbin-lookup

Conversation

@natedemoss

@natedemoss natedemoss commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix VM provisioning when e2fsprogs is installed outside a regular user's PATH.

Related Issue

Closes #3400

Changes

  • Preserve the caller's PATH and append platform-specific e2fsprogs directories for each subprocess.
  • Include Linux system administration directories and macOS Homebrew keg-only directories without changing the driver process environment.
  • Resolve each tool through PATH once instead of retrying alternate copies after an execution failure.
  • Cover search-path precedence and platform fallbacks with a unit test.

Testing

  • cargo test -p openshell-driver-vm
  • mise run pre-commit

Checklist

  • Follows Conventional Commits
  • Commits are signed off for DCO compliance
  • Unit tests added or updated
  • VM end-to-end test run

@copy-pr-bot

copy-pr-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

drew
drew previously approved these changes Sep 23, 2026
@drew

drew commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

/ok to test a48253c

@drew
drew enabled auto-merge September 23, 2026 04:58
@drew
drew added this pull request to the merge queue Sep 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 23, 2026
natedemoss and others added 3 commits September 23, 2026 14:31
The VM driver only checked PATH and the Homebrew e2fsprogs dirs for
mke2fs, e2fsck and debugfs. On Linux these live in /usr/sbin or /sbin,
which usually isn't on a regular user's PATH, so provisioning failed with
"mke2fs not found" even with e2fsprogs installed.

Add /usr/local/sbin, /usr/sbin and /sbin to the search list. macOS
behavior is unchanged.

Closes NVIDIA#3400

Signed-off-by: natedemoss <ndemoss28@gmail.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
ext4_image_has_directory landed on main in NVIDIA#3524 using the removed
e2fs_tool_candidates helper. Route it and its test through e2fs_command
so it uses the same PATH lookup as the other e2fsprogs callers.

Signed-off-by: Nathan DeMoss <ndemoss28@gmail.com>
@natedemoss

Copy link
Copy Markdown
Contributor Author

Rebased onto main to fix the merge queue failure. #3524 added ext4_image_has_directory, which called the e2fs_tool_candidates helper this PR removes, so the combined tree did not compile. It now goes through e2fs_command like the other e2fsprogs callers (8c35425). Could someone re-run /ok to test and re-queue when you get a chance?

This branch has not been deployed

No deployments
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.

MicroVM driver doesn't use system path to look for e2fsprogs

2 participants