[Bug] Node Configure → DNS shows empty when the host has DNS configured
Describe the bug
On a Proxmox node that has DNS configured, Configure → DNS in PegaProx shows every row as empty:
| PegaProx | Proxmox (same node) | |
|---|---|---|
| Search domain | - |
set |
| DNS 1 | - |
set |
| DNS 2 | - |
not set |
| DNS 3 | - |
not set |
Proxmox VE 9.2.21, System → DNS on that node. The node is Online in PegaProx, and Configure → Network on the same node lists its interfaces, so the cluster connection and the node name are fine. Only DNS renders as if nothing were configured.
Steps to Reproduce
- On a PVE 9 node, set a search domain and a DNS server under System → DNS.
- In PegaProx, open that node → Configure → DNS.
- Search Domain and DNS 1 show
-.
Expected behavior
Search Domain and DNS 1 show the same values as Proxmox. DNS 2 and DNS 3 stay - only when those slots are actually unset. A failed read should say it failed, not look like an unconfigured host.
What the current code does
The table renders data.dns.search and data.dns.dns1–dns3:
<tr><td>Search Domain</td><td>{data.dns?.search || '-'}</td></tr>
<tr><td>DNS 1</td><td>{data.dns?.dns1 || '-'}</td></tr>
<tr><td>DNS 2</td><td>{data.dns?.dns2 || '-'}</td></tr>
<tr><td>DNS 3</td><td>{data.dns?.dns3 || '-'}</td></tr>
That object comes from GET /api/clusters/{id}/nodes/{node}/dns, which calls Proxmox GET /api2/json/nodes/{node}/dns and returns the inner data object (search, dns1, dns2, dns3). Those are the same fields the PVE UI reads.
Two things make a bad read look like this screenshot:
get_node_dnsturns a non-200, an exception, or a JSONnullinto{}, and the route still returns 200. The table then prints-for every row.- The tab only loads when
!data.dns. An empty object is truthy, so a failed first fetch is kept and opening the tab again does not retry.
Network on the same page uses the same pattern (GET /nodes/{node}/network, also Sys.Audit) and does return data, so this is specific to the DNS read or to how its empty result is shown.
Environment
- Proxmox VE: 9.2.21
- UI: node Configure → DNS (the table with Search Domain, DNS 1, DNS 2, DNS 3)
- PegaProx version: not copied from Settings → About; the page matches current
web/src/node_modals.js
Checklist
- [x] I have searched existing issues to make sure this is not a duplicate
- [x] I am using the latest version of PegaProx
- [x] I've put enough in here that someone can start on it without asking me three questions first
- [x] I understand PegaProx is maintained by volunteers in their free time. Nobody is on call, and writing URGENT doesn't get anyone out of bed 🪄
Hey, thanks for the detailed write-up. The masking part is real: when the PVE read fails, the route still answers 200 with an empty object, and since {} counts as loaded the tab never asks again, so a refused read looks like an unconfigured node. The read itself works here on PVE 9.2, and PVE checks the same Sys.Audit on the node for DNS as for the network list, so I'd like to see what comes back on your side: could you open the browser dev tools, load Configure → DNS on a fresh page, and paste the status and response of the /dns request? And which account is the cluster connected with in PegaProx (root@pam or a dedicated user/token)?
We changed the side that hid it, so the dev tools part isn't needed anymore. A failed DNS read no longer comes back as an empty config: the route answers with an error and the reason, and the DNS tab (Modern and Corporate) shows "Could not read the DNS settings of this node: ..." with a Retry and keeps the fields locked, so nobody saves empty DNS over the real settings. If Proxmox VE turns the read down for permissions, it says that the read needs Sys.Audit on the node.
On Testing now, comes with the next release. Once you're on it, the line in the tab tells us what your PVE answered.
MK
Shipped with 1.5.0: a failed DNS read now shows an error instead of an empty config. Closing this one.