Add diagnostics command and enhance error handling for backend states
- Introduced a new CLI command `diag` to collect diagnostics from SwarmUI/Comfy, including API, journal, and paths. - Enhanced the `ensure_swarm_comfy_installed` function to include diagnostic script handling for errored backends. - Updated `wait_backend_idle` to trigger diagnostics when backends are in an errored state, improving error recovery. - Implemented fallback mechanisms for diagnostics in the `run_diagnostics` function, ensuring better visibility into backend issues. - Added tests to validate the new diagnostic functionality and error handling, ensuring robustness in backend management.
This commit is contained in:
@@ -93,8 +93,10 @@ def tune_swarm_perf(cfg: Config, host: str, log: Log) -> bool:
|
||||
|
||||
|
||||
def ensure_swarm_comfy_installed(cfg: Config, host: str, log: Log) -> None:
|
||||
"""Headless SwarmUI InstallConfirmWS (ComfyUI) when backends are still empty."""
|
||||
log("SwarmUI first-install: ComfyUI backend (если ещё empty)…")
|
||||
"""Headless Comfy install / recover errored backends before ready wait."""
|
||||
# Diag script next to install so recover-fail can subprocess it on the VM.
|
||||
put_text(cfg, host, "/tmp/gpu-rent-swarm_diag.py", _pkg_text("swarm_diag.py"))
|
||||
log("SwarmUI Comfy: install если empty, RestartBackends если errored…")
|
||||
run_python(
|
||||
cfg,
|
||||
host,
|
||||
|
||||
Reference in New Issue
Block a user