diff --git a/internal/proxmox/query.go b/internal/proxmox/query.go index 43bfa72..0286893 100644 --- a/internal/proxmox/query.go +++ b/internal/proxmox/query.go @@ -63,13 +63,16 @@ func (c *Client) ListSnapshots(ctx context.Context, vmid int) ([]Snapshot, error return ss, c.get(ctx, path, &ss) } -// ListRunningTasks returns the node's currently-running tasks (GET /nodes/{node}/tasks?running=1). +// ListRunningTasks returns the node's currently-active tasks (GET /nodes/{node}/tasks?source=active). // The startup stale-lock recovery uses it as the load-bearing safety guard: a backup lock is cleared // ONLY when no vzdump task is genuinely in-flight for the guest (an agent restart while a real backup -// runs must never clear the live lock). +// runs must never clear the live lock). NOTE: PVE 9.x rejects `?running=1` ("property not defined in +// schema") — `source=active` is the supported filter (it returns the RUNNING tasks); confirmed live on +// felhom-pve (PVE 9.2.2). active-source entries carry status "RUNNING"; we match on type+id, so the +// case difference vs the by-UPID status endpoint ("running") is moot. func (c *Client) ListRunningTasks(ctx context.Context) ([]TaskStatus, error) { var ts []TaskStatus - return ts, c.get(ctx, "/nodes/"+c.node+"/tasks?running=1", &ts) + return ts, c.get(ctx, "/nodes/"+c.node+"/tasks?source=active", &ts) } // ListStorage returns GET /storage (cluster-wide storage definitions).