Priority: P2 (important and urgent). netOrk's workflow step "Shut down Proxmox VM" can never see a VM stop, so it always runs into its timeout. The "Proxmox status" source reports every existing VM as running.
What happens
get_vm_status(vmid) (napalm_proxmox/vm_provision_mixin.py:866-948, at netOrk's pin 449230c) never reads the VM's state:
When the VM's config cannot be read, it returns {"status": "unknown"}.
Otherwise it tries the guest agent's network-get-interfaces. On an IPv4 address it returns "running". Without wait_for_ip it then returns {"status": "running"} at once, whatever the VM's actual state, stopped included (line 948).
status/current (status: running|stopped, qmpstatus) is never asked.
Effect in netOrk
The workflow node source.proxmox_status (src/netork/core/workflows/graph/devices.py:194-204) reports "running" for a stopped VM.
_proxmox_shutdown_vm (:244-266) asks for a clean shutdown and then waits for "stopped". It only ever sees "running", so it takes the timeout port after timeout_minutes, even when the VM stopped within seconds. Workflows that shut guests down before a node goes off (#1633) wait the full timeout and then follow the timeout branch.
Expected
get_vm_status reads GET /nodes/{node}/qemu/{vmid}/status/current. status is stopped/running, and paused for qmpstatus: paused/suspended, matching get_vms() since NetOrk/netork#2658. The guest-agent IP lookup runs only for a running VM. A test asserts that a stopped fixture gives "stopped".
Priority: P2 (important and urgent). netOrk's workflow step "Shut down Proxmox VM" can never see a VM stop, so it always runs into its timeout. The "Proxmox status" source reports every existing VM as running.
## What happens
`get_vm_status(vmid)` (`napalm_proxmox/vm_provision_mixin.py:866-948`, at netOrk's pin 449230c) never reads the VM's state:
- When the VM's config cannot be read, it returns `{"status": "unknown"}`.
- Otherwise it tries the guest agent's `network-get-interfaces`. On an IPv4 address it returns `"running"`. Without `wait_for_ip` it then returns `{"status": "running"}` at once, whatever the VM's actual state, stopped included (line 948).
`status/current` (`status: running|stopped`, `qmpstatus`) is never asked.
## Effect in netOrk
- The workflow node `source.proxmox_status` (`src/netork/core/workflows/graph/devices.py:194-204`) reports `"running"` for a stopped VM.
- `_proxmox_shutdown_vm` (`:244-266`) asks for a clean shutdown and then waits for `"stopped"`. It only ever sees `"running"`, so it takes the `timeout` port after `timeout_minutes`, even when the VM stopped within seconds. Workflows that shut guests down before a node goes off (#1633) wait the full timeout and then follow the timeout branch.
## Expected
`get_vm_status` reads `GET /nodes/{node}/qemu/{vmid}/status/current`. `status` is `stopped`/`running`, and `paused` for `qmpstatus: paused`/`suspended`, matching `get_vms()` since NetOrk/netork#2658. The guest-agent IP lookup runs only for a running VM. A test asserts that a stopped fixture gives `"stopped"`.
Found while working on NetOrk/netork#2658.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Priority: P2 (important and urgent). netOrk's workflow step "Shut down Proxmox VM" can never see a VM stop, so it always runs into its timeout. The "Proxmox status" source reports every existing VM as running.
What happens
get_vm_status(vmid)(napalm_proxmox/vm_provision_mixin.py:866-948, at netOrk's pin449230c) never reads the VM's state:{"status": "unknown"}.network-get-interfaces. On an IPv4 address it returns"running". Withoutwait_for_ipit then returns{"status": "running"}at once, whatever the VM's actual state, stopped included (line 948).status/current(status: running|stopped,qmpstatus) is never asked.Effect in netOrk
source.proxmox_status(src/netork/core/workflows/graph/devices.py:194-204) reports"running"for a stopped VM._proxmox_shutdown_vm(:244-266) asks for a clean shutdown and then waits for"stopped". It only ever sees"running", so it takes thetimeoutport aftertimeout_minutes, even when the VM stopped within seconds. Workflows that shut guests down before a node goes off (#1633) wait the full timeout and then follow the timeout branch.Expected
get_vm_statusreadsGET /nodes/{node}/qemu/{vmid}/status/current.statusisstopped/running, andpausedforqmpstatus: paused/suspended, matchingget_vms()since NetOrk/netork#2658. The guest-agent IP lookup runs only for a running VM. A test asserts that a stopped fixture gives"stopped".Found while working on NetOrk/netork#2658.