Add stopped-workspace disk export and inspection
Finish the 3.1.0 secondary disk-tools milestone so stable workspaces can be stopped, inspected offline, exported as raw ext4 images, and started again without changing the primary workspace-first interaction model. Add workspace stop/start plus workspace disk export/list/read across the CLI, SDK, and MCP, backed by a new offline debugfs inspection helper and guest-only validation. Scrub runtime-only guest state before disk inspection/export, and fix the real guest reliability gaps by flushing the filesystem on stop and removing stale Firecracker socket files before restart. Update the docs, examples, changelog, and roadmap to mark 3.1.0 done, and cover the new lifecycle/disk paths with API, CLI, manager, contract, and package-surface tests. Validation: uv lock; UV_CACHE_DIR=.uv-cache make check; UV_CACHE_DIR=.uv-cache make dist-check; real guest-backed smoke for create, shell/service activity, stop, workspace disk list/read/export, start, exec, and delete.
This commit is contained in:
parent
f2d20ef30a
commit
287f6d100f
26 changed files with 2585 additions and 34 deletions
|
|
@ -1,6 +1,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pyro_mcp.runtime_boot_check import _classify_result
|
||||
import pytest
|
||||
|
||||
from pyro_mcp.runtime_boot_check import _classify_result, run_boot_check
|
||||
|
||||
|
||||
def test_classify_result_reports_kernel_panic() -> None:
|
||||
|
|
@ -19,3 +21,32 @@ def test_classify_result_reports_success_when_vm_stays_alive() -> None:
|
|||
vm_alive=True,
|
||||
)
|
||||
assert reason is None
|
||||
|
||||
|
||||
def test_classify_result_reports_logger_failure_and_early_exit() -> None:
|
||||
logger_reason = _classify_result(
|
||||
firecracker_log="Successfully started microvm",
|
||||
serial_log="Could not initialize logger",
|
||||
vm_alive=False,
|
||||
)
|
||||
early_exit_reason = _classify_result(
|
||||
firecracker_log="partial log",
|
||||
serial_log="boot log",
|
||||
vm_alive=False,
|
||||
)
|
||||
assert logger_reason == "firecracker logger initialization failed"
|
||||
assert early_exit_reason == "firecracker did not fully start the microVM"
|
||||
|
||||
|
||||
def test_classify_result_reports_boot_window_exit_after_start() -> None:
|
||||
reason = _classify_result(
|
||||
firecracker_log="Successfully started microvm",
|
||||
serial_log="boot log",
|
||||
vm_alive=False,
|
||||
)
|
||||
assert reason == "microVM exited before boot validation window elapsed"
|
||||
|
||||
|
||||
def test_run_boot_check_requires_positive_wait_seconds() -> None:
|
||||
with pytest.raises(ValueError, match="wait_seconds must be positive"):
|
||||
run_boot_check(wait_seconds=0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue