[Bug] ZFS Native Replication infos are inaccurate
In the last beta when you go in vm settings and looking for replication info the last sync is showed as "Never" while the sync job has been correctly executed.
Hey @buzzzo — thanks for reporting, but I'd need a bit more to actually chase this one. The bug template didn't come through (it normally asks for PegaProx version, install method, OS, browser, UI mode, etc.) and without that I'm guessing at which code path is involved.
Concretely — could you drop:
- PegaProx version (Settings → About, or the blue badge in the top bar)
- Which replication type: ZFS intra-cluster (Datacenter → Replication → Snapshot Replication) or Cross-Cluster Replication (VM → Configure → Replication → Cross-Cluster)?
- Exactly where "Last sync = Never" is shown — ideally a small screenshot of that panel
- What the Proxmox UI shows for the same VM at
/api2/json/cluster/replication(or the matching Replication tab on the node)
On our side we read last_sync (or last_try) from PVE's /cluster/replication endpoint and feed it into the VM settings replication panel. If PVE reports a valid timestamp but we render "Never", that's a parsing bug on our end. If PVE itself also shows nothing, the job probably isn't tracked by the normal ZFS replication machinery.
Self-assigning so it doesn't fall off the list.
PegaProx version: Beta 0.9.7 Replication type: zfs (proxmox builtin) Proxmox version: 8.4.1
Screenshot of the issue on pegaprox side (datacenter view)
Screeshot of the issue (vm view):
The replication task is event NOT started if I click on the button on the screen of the first screenshot
As you can see the replication currently happens on proxmox side:
Thx now it works at vm level view but still not doe not show info at data center level
Plus: the button "start replication" on the vm's replication view (vm->configure->replication) when clicked it display "replication started" but in the backend does nothing
Both confirmed. The datacenter view was hitting /cluster/replication directly which only carries job config — no last_sync / last_try / state. The VM-side already merges per-node runtime data, wired the datacenter route through the same path so those fields show up there too.
The "start replication" no-op is the same root-cause class: schedule_now was POSTed to nodes/localhost/replication/... which only triggers if the API endpoint we're talking to is also the source node of the VM. In any real cluster that's basically never the case, so PVE silently no-ops, button shows green toast, nothing replicates. Now resolves the actual source from /cluster/replication (with /cluster/resources as fallback) before firing.
Will push to main later today after a re-test on a multi-node setup, ships in the next beta. PegaProx is donation-funded, https://opencollective.com/pegaprox keeps it going if this saved you a debug session.
— MK
Start replication butt is still not working in Beta 0.9.9
Hey @buzzzo, the May-2 fix did ship in v0.9.9 — run_replication_now() now resolves the source node from /cluster/replication (or /cluster/resources as fallback) before calling schedule_now on the right node. So if it's still no-op for you, something specific to your cluster is hitting a different branch.
Could you grab two things next time you click the button:
- From the PegaProx server log: the line starting with
Triggering immediate replication for job <id> on node <name>— or, if the resolver couldn't find the source, theCould not resolve source node for job 'X'error. - Browser DevTools → Network tab → the response body of the POST to
/api/clusters/<id>/replication/<job>/run— even just{"success": ...}tells me whether we got past the resolver or whether PVE itself rejected the call.
That'll narrow it down to either (a) we still resolve the wrong node in your setup, or (b) PVE is returning 200 but the job isn't actually firing on its side. Reopening this on my end.
— MK
My bad: i was expecting replication task will triggers a log entry in the proxmox task list instead it just log the event in the vm replication windows.
So yes: it works.
Thx again
Glad it works. Worth flagging though — the missing-task-in-Proxmox-task-list confused you because by default schedule_now doesn't surface as a discrete PVE task entry; PVE just logs it inside the per-job replication state which is what you saw in the VM replication panel. Same here, no real workaround other than "check the VM-level view". If we ever wanted parity with the PVE UI's task list we'd have to inject a synthetic task entry, which is more trouble than it's worth.
Closing this one out. Cheers for the back-and-forth — debugging across two cluster topologies makes for a better fix than I'd have written alone. https://opencollective.com/pegaprox keeps that kind of feedback loop turning if you've got a few euros to spare.
— MK