Skip to content

bug: rust-vm E2E intermittently fails with masked ext4 formatter error #2423

Description

@pimlock

Agent Diagnostic

  • Skills loaded: create-github-issue
  • OpenShell version tested: GitHub Actions revisions from 5402551797585268356d84b2a3a1c99f1031f076 (the commit that added VM CI coverage) through cbdeb4d537ad8b4b8592596b7668b9d03464544c; the cited failure ran at cbdeb4d
  • Latest release checked: v0.0.88
  • Known fixes reviewed: v0.0.88 release notes and the merged CI changes in #2305 and #2311; none addresses this recurring formatter failure
  • Possible duplicates reviewed: #2308 concerns e2fsprogs licensing/distribution, #1762 concerns the mke2fs -d large-file bug, and #2314 concerns separating provisioning from execution. None tracks this CI failure.
  • Findings: From the VM CI job's introduction on 2026-07-16 through 2026-07-22 17:09 UTC, there were 9 failed e2e / E2E (rust-vm) job attempts (including failures hidden by reruns), or 8 others besides the cited example. Seven of the nine—including the example—failed while formatting the VM root disk and ended with /usr/local/opt/e2fsprogs/bin/mkfs.ext4 not found; therefore there are 6 other matching failures. The other two failures were unrelated: a Rustls crypto-provider panic and a disk-full error while applying an image layer.
  • Remaining reason for filing: the recurring formatter failure affects branch, dev-release, and tagged-release workflows, while the final error masks the first executable formatter failure and no existing issue tracks the CI instability.

Description

Actual behavior: e2e / E2E (rust-vm) intermittently fails in gateway_smoke while provisioning the first VM sandbox. The CLI reaches Formatting root disk, the sandbox enters ProvisioningFailed, and the reported cause ends with:

failed to create ext4 rootfs image ...:
/usr/local/opt/e2fsprogs/bin/mkfs.ext4 not found.
Install e2fsprogs (mke2fs/mkfs.ext4) and retry

The reusable workflow's Ubuntu dependency step does not explicitly install e2fsprogs.

The error is also misleading: format_ext4_image_from_dir tries mke2fs and mkfs.ext4 from PATH before probing Homebrew-specific candidates, but each failed probe overwrites last_error. A real failure from a system formatter can therefore be replaced by the final nonexistent Homebrew path.

Expected behavior: The rust-vm E2E job should reliably provision the VM root disk on its supported ubuntu-24.04 runner. If formatting fails, logs should retain the executed formatter's status and stderr instead of replacing them with a later candidate's not found error.

Failure history

Matching root-disk formatting failures:

The failures occurred on GitHub ubuntu-24.04 image revisions 20260714.240.1 and 20260720.247.2.

Reproduction Steps

  1. Run a workflow that invokes .github/workflows/e2e-test.yml with the rust-vm job enabled on ubuntu-24.04.
  2. Let mise run --no-deps --skip-deps e2e:vm pull ghcr.io/nvidia/openshell-community/sandboxes/base:latest.
  3. Observe the intermittent failure during gateway_smoke after Preparing rootfs / Formatting root disk.

Environment

Logs

Pulling image ghcr.io/nvidia/openshell-community/sandboxes/base:latest
Preparing rootfs
Formatting root disk
Error: sandbox entered error phase while provisioning: ProvisioningFailed:
failed to create ext4 rootfs image ...:
/usr/local/opt/e2fsprogs/bin/mkfs.ext4 not found.
Install e2fsprogs (mke2fs/mkfs.ext4) and retry

thread 'gateway_smoke' panicked at tests/smoke.rs:63:10:
sandbox create should succeed
test gateway_smoke ... FAILED

Definition of Done

  • The rust-vm E2E job explicitly provides or validates the host tools required for ext4 root-disk creation.
  • Formatter failures preserve the actionable status/stdout/stderr from executable candidates.
  • The VM E2E path succeeds repeatedly on the supported GitHub-hosted Ubuntu runner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    github_actionsPull requests that update GitHub Actions codeos:linuxBug affects Linux hostsstate:agent-readyApproved for agent implementationstate:pr-openedPR has been opened for this issuetopic:testing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions