services/imaging_status.py - if a new POST arrives with stage_index <= 1 that is lower than the cached stage_index, OR the previous run already finished (status=succeeded|failed), reset the session: clear log_tail, mint a fresh started_at, drop the status field so the in_progress default re-applies. Preserves serial + records the previous run's last_updated under previous_run_at for audit. Without this, a reimage on the same bay would leave a stale 6/8 "succeeded" card visible until the new run progressed past that index. playbook/startnet.cmd - one-line PowerShell POST after the PXE menu choice + enrollment-share mount, before PESetup.exe waits to start. Captures BIOS serial via wmic, MAC via Get-NetAdapter, and posts: stage_index=2, current_stage="WinPE: PESetup / WIM apply". Best-effort; try/catch swallows any network failure so a missing webapp never blocks imaging. PXE clients will now appear on the /imaging dashboard during WinPE phase instead of only post-PPKG. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5.2 KiB
5.2 KiB