Skip to content

fix(guest): report ZFS pool creation errors - #855

Closed
kvinwang wants to merge 1 commit into
masterfrom
codex/fix-guest-zfs-pool-errors
Closed

fix(guest): report ZFS pool creation errors#855
kvinwang wants to merge 1 commit into
masterfrom
codex/fix-guest-zfs-pool-errors

Conversation

@kvinwang

@kvinwang kvinwang commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Problem

The ZFS setup path discarded the command failure that occurs while creating the application pool. Boot then continued and failed later against a missing pool, obscuring the actual zpool create error.

Root cause and fix

Propagate the pool-creation command error immediately, including its diagnostic output, so provisioning stops at the real failure.

Implementation

The branch records the following focused implementation work:

  • fix(guest): report ZFS pool creation errors

Changed paths:

  • dstack/dstack-util/src/system_setup.rs

Scope

This PR addresses one logical guest finding. It intentionally excludes the acceptance-test infrastructure from #841 and unrelated product fixes from #840.

Dependency and merge order

This PR is based directly on master and does not require another split product PR to merge first.

Verification

  • git diff --check origin/master..origin/codex/fix-guest-zfs-pool-errors: passed.
  • The declared base was verified as an ancestor of the PR head.
  • Focused compile/check verification was run for the changed component where applicable; non-Rust packaging or configuration changes were reviewed against their exact branch delta.

Copilot AI review requested due to automatic review settings July 31, 2026 02:43

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kvinwang

kvinwang commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Closing this because the original code already propagates zpool create failures.

cmd! is imported as cmd_lib::run_fun. For a command group, GroupCmds::run_fun() executes preceding commands through self.run_cmd()?, so a non-zero zpool create result immediately returns an error and prevents zfs create from running. The existing .context("Failed to create zpool")? then stops the setup path, while the command's stderr remains visible in the service logs.

Therefore, this change does not fix the stated error-propagation bug; it only changes how the diagnostic is formatted and renames the dataset-creation context. That does not justify the additional manual Command::output() implementation.

@kvinwang kvinwang closed this Aug 3, 2026
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.

2 participants