Skip to content

fix(sync): VMs reach Installed only via the agent handoff, never Proxmox power#32

Merged
Zorlin merged 1 commit into
mainfrom
fix/sync-installed-from-agent-handoff
Jun 21, 2026
Merged

fix(sync): VMs reach Installed only via the agent handoff, never Proxmox power#32
Zorlin merged 1 commit into
mainfrom
fix/sync-installed-from-agent-handoff

Conversation

@Zorlin

@Zorlin Zorlin commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Problem

Proxmox running means powered-on, not installed. A QEMU VM can be
running the install environment, mid-install, or the installed OS — and
Proxmox cannot tell which. apply_proxmox_vm_state mapped running
Installed (#26 / #28), conflating power state with install state. That let
Jetpack's idempotent re-run reimage freshly-built, working nodes: a re-run
saw a VM as not-truly-Installed and reimaged it, wiping the cluster.

Fix

The authoritative Installed mark is the workflow's reboot/kexec
action_started handler in api.rs — the instant the pre-boot agent is about
to hand off to the finished OS. That path is unchanged and is now the sole
source of Installed for VMs
.

apply_proxmox_vm_state now reflects power state only:

  • stoppedOffline
  • everything else leaves the install state untouched (never asserts Installed,
    never completes os_installed / installation_progress)

LXC is unaffected — a container is its OS, so runningInstalled stays
correct there.

The 4 sync tests are updated to the new contract.

🤖 Generated with Claude Code

…mox power

Proxmox "running" means powered-on, not installed. A QEMU VM can be
running the install environment, mid-install, or the installed OS, and
Proxmox cannot tell which. apply_proxmox_vm_state mapped "running" ->
Installed (#26/#28), conflating power state with install state. That let
Jetpack's idempotent re-run reimage freshly-built, working nodes: a re-run
saw a VM as not-truly-Installed and reimaged it, wiping the cluster.

The authoritative Installed mark is the workflow's reboot/kexec
action_started handler in api.rs -- the instant the pre-boot agent is
about to hand off to the finished OS. That path is unchanged and is now
the sole source of Installed for VMs.

apply_proxmox_vm_state now reflects power state only: stopped -> Offline;
everything else leaves the install state untouched (never asserts
Installed, never completes os_installed / installation_progress). LXC is
unaffected -- a container *is* its OS, so running -> Installed stays
correct there.

The 4 sync tests are updated to the new contract.

Co-Authored-By: Claude <noreply@anthropic.com>
@Zorlin Zorlin merged commit 6db9003 into main Jun 21, 2026
4 checks passed
@Zorlin Zorlin deleted the fix/sync-installed-from-agent-handoff branch June 21, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant