From 0dbfcc71475c921446026c67e12d9d4d780b4677 Mon Sep 17 00:00:00 2001 From: Mathieu Moran Date: Sat, 24 Oct 2026 16:48:01 -0400 Subject: [PATCH] lifecycle: up/reset wait for every guest before returning doctor run right after reset reported false failures because the VMs were still booting. _start_lab now waits for WinRM on each guest (300 s) and names the ones that did not answer. --- session1/content/lib/cmd_build.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/session1/content/lib/cmd_build.sh b/session1/content/lib/cmd_build.sh index 6f046e8..33c9085 100644 --- a/session1/content/lib/cmd_build.sh +++ b/session1/content/lib/cmd_build.sh @@ -116,6 +116,20 @@ _start_lab() { backend_launch "$name" run || { fail "$name did not start"; return 1; } fi done + + # Return only once every guest answers: running `doctor` the instant `up` + # printed its last line used to report false failures during boot. + step "wait for the guests" + local notready=0 + for name in "${VM_NAMES[@]}"; do + if backend_ready "$name" 300; then + ok "$(printf '%-6s ready' "$name")" + else + warn "$name did not answer in time" + notready=1 + fi + done + return $(( notready )) } cmd_up() {