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.
This commit is contained in:
2026-10-24 16:48:01 -04:00
parent ca72e1aa2e
commit 0dbfcc7147
+14
View File
@@ -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() {