public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH common/manager 0/3] fix #7803: 'localhost' alias handling in node-specific endpoints
@ 2026-07-14 14:50 Elias Huhsovitz
  2026-07-14 14:50 ` [PATCH common 1/3] inotify: add helper to resolve 'localhost' node alias Elias Huhsovitz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Elias Huhsovitz @ 2026-07-14 14:50 UTC (permalink / raw)
  To: pve-devel; +Cc: Elias Huhsovitz

This series fixes bug #7803, where API endpoints like
/nodes/localhost/config and /nodes/localhost/certificates/info return
empty data or fail, while the same endpoints work correctly when using
the actual node name (e.g., /nodes/node1/config).

The API routing layer correctly proxies
'localhost' to the local node, but the endpoint handlers use the literal
string 'localhost' to construct file paths in the cluster filesystem.
Since no node directory named 'localhost' exists, the file
lookups fail.

To resolve this, the first patch introduces a
PVE::INotify::resolve_nodename() helper in pve-common to centralize the
alias resolution. The subsequent patches apply this helper to the
affected endpoints in pve-manager (NodeConfig, Certificates, RRD,
migrateall) and refactor existing inline resolutions in the bulk
operation endpoints (startall, stopall, suspendall) for consistency.

Note: The pve-common patch (1/3) must be applied and built before the
pve-manager patches, as the API changes depend on the new helper
function.


pve-common:

Elias Huhsovitz (1):
  inotify: add helper to resolve 'localhost' node alias

 src/PVE/INotify.pm | 5 +++++
 1 file changed, 5 insertions(+)


pve-manager:

Elias Huhsovitz (2):
  fix #7803: api: nodes: resolve 'localhost' alias in node-specific
    endpoints
  api: nodes: use resolve_nodename helper for bulk operation

 PVE/API2/Ceph/MDS.pm     |  3 +--
 PVE/API2/Certificates.pm |  8 +++++---
 PVE/API2/NodeConfig.pm   |  6 ++++--
 PVE/API2/Nodes.pm        | 22 +++++++++-------------
 4 files changed, 19 insertions(+), 20 deletions(-)


Summary over all repositories:
  5 files changed, 24 insertions(+), 20 deletions(-)

-- 
Generated by murpp 0.12.0




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-14 14:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14 14:50 [PATCH common/manager 0/3] fix #7803: 'localhost' alias handling in node-specific endpoints Elias Huhsovitz
2026-07-14 14:50 ` [PATCH common 1/3] inotify: add helper to resolve 'localhost' node alias Elias Huhsovitz
2026-07-14 14:50 ` [PATCH manager 2/3] fix #7803: api: nodes: resolve 'localhost' alias in node-specific endpoints Elias Huhsovitz
2026-07-14 14:57   ` Shannon Sterz
2026-07-14 14:50 ` [PATCH manager 3/3] api: nodes: use resolve_nodename helper for bulk operation Elias Huhsovitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal