Commit bec34ca
ci: Capture VM journal+console logs via bcvk --log-dir
When a VM fails to become SSH-reachable, all we get today is
"SSH connectivity check failed after 60 attempts" with no insight into
what went wrong inside the VM. bcvk libvirt run supports --log-dir to
stream the systemd journal (as JSON) and virtio console to files while
the VM is running.
Wire this into run_tmt(): each VM now gets its own log subdirectory
under /var/tmp/tmt/<vm-name>/ (the same base directory the CI workflow
already collects as an artifact). The path is resolved as:
- CLI --log-dir flag (new RunTmtArgs field)
- $TMT_LOG_DIR environment variable
- /var/tmp/tmt (default, matches CI artifact path)
The flag is probed at runtime via `bcvk libvirt run --help` so older
bcvk versions (pre-0.17) silently fall back to no log capture rather
than hard-failing.
When SSH verification fails, the error message now prints the log
directory path so developers know where to look.
No CI workflow changes needed: the existing "Archive TMT logs" steps
already upload /var/tmp/tmt/** as artifacts.
Assisted-by: OpenCode (Claude Sonnet 4.6)
Signed-off-by: Colin Walters <walters@verbum.org>1 parent 1f824fb commit bec34ca
2 files changed
Lines changed: 43 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
422 | 441 | | |
423 | 442 | | |
424 | 443 | | |
| |||
483 | 502 | | |
484 | 503 | | |
485 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
486 | 516 | | |
487 | 517 | | |
488 | 518 | | |
489 | 519 | | |
490 | | - | |
| 520 | + | |
491 | 521 | | |
492 | 522 | | |
493 | 523 | | |
| |||
581 | 611 | | |
582 | 612 | | |
583 | 613 | | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
584 | 620 | | |
585 | 621 | | |
586 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
256 | 262 | | |
257 | 263 | | |
258 | 264 | | |
| |||
0 commit comments