From 37852b3f0b319dc53c565cb917426ca988a20403 Mon Sep 17 00:00:00 2001 From: Mathieu Moran Date: Mon, 26 Oct 2026 17:23:36 -0400 Subject: [PATCH] provision: fail fast when the role script is missing A missing seed payload used to look like a hung stage: the scheduled task exited immediately and backend_wait polled for an hour. Both backends now check Test-Path on the role script before scheduling it. --- session1/platforms/proxmox/backends/proxmox.sh | 8 ++++++++ session1/platforms/qemu/backends/qemu.sh | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/session1/platforms/proxmox/backends/proxmox.sh b/session1/platforms/proxmox/backends/proxmox.sh index 921b036..b7e51a3 100644 --- a/session1/platforms/proxmox/backends/proxmox.sh +++ b/session1/platforms/proxmox/backends/proxmox.sh @@ -318,6 +318,14 @@ backend_ready() { backend_start() { local name=$1 remote=$2 + + # Fail in seconds, not after the one-hour marker wait, when the seed + # payload never reached the guest. + if ! backend_ps "$name" "Test-Path '${remote}'" 2>/dev/null | grep -qi true; then + fail "$name: ${remote} is missing — the seed payload was not copied" + return 1 + fi + backend_ps "$name" " Remove-Item -Force -ErrorAction SilentlyContinue '${remote}.done' schtasks.exe /End /TN NorbourgStage 2>\$null | Out-Null diff --git a/session1/platforms/qemu/backends/qemu.sh b/session1/platforms/qemu/backends/qemu.sh index 0ac4704..d41ec61 100644 --- a/session1/platforms/qemu/backends/qemu.sh +++ b/session1/platforms/qemu/backends/qemu.sh @@ -297,6 +297,12 @@ backend_ready() { backend_start() { local name=$1 remote=$2 + + if ! _labwinrm "$name" ps "Test-Path '${remote}'" 2>/dev/null | grep -qi true; then + fail "$name: ${remote} is missing — the seed payload was not copied" + return 1 + fi + _labwinrm "$name" start "$remote" }