From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 88DAF1FF0E4 for ; Tue, 14 Jul 2026 16:50:48 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id CF9D521497; Tue, 14 Jul 2026 16:50:42 +0200 (CEST) From: Elias Huhsovitz To: pve-devel@lists.proxmox.com Subject: [PATCH common/manager 0/3] fix #7803: 'localhost' alias handling in node-specific endpoints Date: Tue, 14 Jul 2026 16:50:24 +0200 Message-ID: <20260714145027.53038-1-e.huhsovitz@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784040621370 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.169 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: XADQ7G3RJ4ZSNW3534WCFPACX6UV464Y X-Message-ID-Hash: XADQ7G3RJ4ZSNW3534WCFPACX6UV464Y X-MailFrom: e.huhsovitz@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Elias Huhsovitz X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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