[Bug] VMs not syncing in Pool Permissions
Hey there! 👋 Thanks for taking the time to report this bug — we appreciate it!
Please keep in mind: PegaProx is developed and maintained entirely by volunteers in our free time. We do our best, but we can't work magic 🪄 — please be patient, we'll get to your issue as soon as we can.
Want to help keep PegaProx alive?
- ⭐ Star the project — it's free and helps a lot!
- 💖 Become a Sponsor — helps us dedicate more time to development
- 🤝 Contributing code or docs is always welcome too!
Describe the bug
Under PegaProx Settings -> Permissions -> Pool Permissions - VMs aren't showing up. Clicking the refresh/sync button shows success with 0 vms found in pool. VMs from proxmox resource pools don't sync/show up.
Steps to Reproduce
- Make sure there are VMs assigned to a Resource Pool in Proxmox
- In Pegaprox - login as admin, Go to Settings -> Permissions -> Pool Permissions
- Select Proxmox cluster from the drop down
- It should show all the resource pools from Proxmox along with VM count = 0 albeit there are VMs under resource pool/s in Proxmox
- Click on the refresh button and the VM count on Resource Pools still shows 0
Expected behavior
Resource Pools show correct number of VMs.
Environment
- PegaProx Version: 0.9.15
- Installation Method: Manual
- OS: Debian
- Browser: Firefox and Chrome
- Behind Reverse Proxy? None
- UI? Modern
Logs
Screenshots
Checklist
- [x] I have searched existing issues to make sure this is not a duplicate
- [x] I am using the latest version of PegaProx
Thanks for the clear repro. We pull members with a plain GET /pools/{poolid} against your Proxmox and count the qemu/lxc ones, so a pool showing up with 0 almost always means Proxmox handed us an empty member list rather than us dropping them — and the usual reason for that is the connection lacking audit rights on the guests.
Two things to pin it: (a) which Proxmox version are the nodes on, and (b) does PegaProx connect to that cluster with an API token or a user+password? If it's a token, check it has PVEAuditor (or at least Pool.Audit + VM.Audit) with propagate on / — Proxmox will happily list the pool but hide members the token can't audit, which looks exactly like this. Ping me back with those and we'll get it sorted.
If PegaProx is pulling its weight for you, a coffee at https://opencollective.com/pegaprox helps keep the volunteer tank full 🙏
Verified the token permissions and they are as expected. Looks like the pool thing works only at the top level resource pool, for instance, if you have a pool called "teamA" it would show it's member vms but if you have hierarchy like "teamA/servers/db", "teamA/servers/httpd" etc. then their members aren't showing up. We use hierarchical resource pools to group the VMs for better management. Also in the pool permissions, user groups seems more like a place holder for future development and doesn't seem to do anything, in fact, I don't see the ability to create user groups at all.
Nice, that narrows it right down — and it's a real bug on our side. We fetch a pool's members with GET /pools/{poolid} but don't URL-encode the poolid, so a nested one like teamA/servers/db goes out with raw slashes and Proxmox never resolves it → empty member list, exactly what you're seeing (flat pools work because there's no slash to trip on). I'll fix the nested-pool handling.
On the user-groups bit — you're right, that part's half-built: the pool-permission UI references groups but there's no group management behind it yet. That overlaps with your #635, so I'll track the "actually usable groups" work over there.
Awesome, thanks!
Pushed the nested-pool fix to Testing — we now look members up via the ?poolid= filter, so hierarchical pools like teamA/servers/db resolve instead of getting mangled by the slashes. I don't have a nested-pool setup on my side to fully confirm the counts, so if you can pull Testing and check that your teamA/servers/* pools now show their VMs, that'd close it out. Ships in the next release regardless.
I just tested it and I can see that it's now pulling the VMs from hierarchical pools. Thanks for the quick workaround. However, it doesn't allow me to save the modified permissions under the Pool Permission. I guess it never worked before and need more fixes.
Nice, thanks for confirming the member listing works now. And good catch on the save — you're right, it's a separate (real) bug: the pool-permission save/delete endpoints take the pool id straight in the URL path, and Flask's default path segment won't match a nested id like teamA/servers/db (the slashes break the route), so the request 404s before it ever reaches the handler. Flat pools save fine; hierarchical ones don't — so yeah, that path never worked for nested pools. Needs the route to accept the slashed id; it's on the list.
Fixed in 1.0 — nested/hierarchical resource pools list their members and VM counts correctly now (the lookup was missing the sub-pool query). Thanks for the report and for confirming the retest. Closing.