Enhance logging functionality in CLI and tunnel operations. Updated gpu-rent logs to provide a complete journal output, including cloud-init logs by default. Added log digest printing for better visibility during VM operations, especially on failure scenarios. Improved error handling and added tests for new log digest features.

This commit is contained in:
Leonid Pershin
2026-08-23 05:08:05 +03:00
parent d06b4f4fdc
commit ac0797530d
7 changed files with 326 additions and 47 deletions
+3 -3
View File
@@ -71,7 +71,7 @@ gpu-rent up --yes --ollama
| `gpu-rent hold` / `--minutes N` / `--until ISO` / `--clear` | Пауза idle-killer (нужны живая VM + SSH) |
| `gpu-rent stop` / `stop --no-pull` | Удалить compute (+ FIP), диски оставить; optional pull Output |
| `gpu-rent destroy --i-understand-data-loss` | `stop` + диски |
| `gpu-rent logs` | journalctl swarmui / cloud-init |
| `gpu-rent logs` | journalctl swarmui / cloud-init (полный дамп; после `up` хвост уже печатается сам) |
| `gpu-rent ssh` | Оболочка на VM |
| `gpu-rent seed-models` | Докачать новые строки Civitai-манифеста на живой диск |
| `gpu-rent seed-extensions` | Доклонировать/обновить git-репы; restart swarmui |
@@ -238,9 +238,9 @@ Application credential для idle-killer CLI создаёт на `up` (узко
4. На VM: HTTP сервисов стека (SwarmUI `:7801` / Ollama `:11434`) — `verify_stack_on_vm`
5. На VM: **nvidia-smi / CUDA** (fail-fast) + **torch+cuda** в Comfy venv при SwarmUI (ждём) — `verify_gpu_env`
6. В логе: строка **`тайминг up:`** (SSH / bootstrap / Idle / verify / …)
7. Туннель + проверка **localhost** тех же сервисов → access-card (красная рамка, если killer failed)
7. Туннель + проверка **localhost** тех же сервисов → access-card (красная рамка, если killer failed)**дайджест journal** поднятых юнитов (~20 строк, без cloud-init)
`gpu-rent logs --unit swarm|ollama|killer`фильтр journalctl.
`gpu-rent logs --unit swarm|ollama|killer`полный journalctl (и cloud-init при `--unit all` / по умолчанию).
`gpu-rent status` — killer/hold, последний стек/GPU-env, тайминг up.
Локальный порт UI: **17801** (на VM по-прежнему 7801 на loopback).