From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 705C81FF0BC for ; Mon, 16 Nov 2026 14:31:43 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E847F21745; Mon, 16 Nov 2026 14:31:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794835877; x=1795440677; darn=lists.proxmox.com; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=cXuBO+CjXEsleQ4REnywkyqMBpUQtznTzshFREmaNGQ=; b=aPlcOzD3w+e81boJqGO2ptOWxirHQgUeb9YKY4dugOGQPjPElFEnKrLB/W1QPTIftd einmYzA2SFeka3Q7BQ+5dDe8xpYqmjIhBnOA6cu6f4QZgCW8wzP/K0idIonJXGbgljbP RzqeU/SrMTNMN9PF/1uDPJtOIheEFChJGsx/kGKiynt0IVBSj3YdKZUWySI18DT3KWgZ iatfRjblB0Sn0v9wjE+nnWOYWVN9pom0j6t0dC3kKdPqYRPg3xESM1BlPu5swb32v4u+ GrR1QmACzzYvsdiHHmEtuNYw0sdnkXKYrZZgHuZBobmJfNCjviwvY5msSjTUoHLIfi9l nQBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794835877; x=1795440677; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=cXuBO+CjXEsleQ4REnywkyqMBpUQtznTzshFREmaNGQ=; b=mCwnN3nPE6LjJ790BKSwLSX4+8ZWOICat24GnBf9pTQinA7NLwNAYh38lhhWdivHaY HQVxQ1Ui9XtIKVsb+l9AewNZGzigD6Nwmlxo5g9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WTt0Qe55u4rDLWMev9QZ9 X-Received: by 2002:a05:690c:a212:20b0:8b3:5f16:cc18 with SMTP id 00721157ae682-8b4aa297728mr42331507b3.23.1794835877169; Mon, 16 Nov 2026 05:31:17 -0800 (PST) From: Lucas Barros To: pve-devel@lists.proxmox.com Subject: [PATCH common/manager v3 0/2] fix #6357: show all search domains in the node DNS settings Date: Mon, 16 Nov 2026 10:31:06 -0300 Message-ID: <20261116133000.6357-0-lucasbarros.kam@gmail.com> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.120 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider 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_NONE -0.0001 Sender listed at https://www.dnswl.org/, no 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: RYMLEOSIKQBI7W53U3TUWU3NH4VUU3G3 X-Message-ID-Hash: RYMLEOSIKQBI7W53U3TUWU3NH4VUU3G3 X-MailFrom: lucasbarros.kam@gmail.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: t.lamprecht@proxmox.com, Lucas Barros X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The DNS settings of a node only show the first domain of the 'search' line of resolv.conf, so saving the dialog again drops the others. As suggested by Thomas, v3 keeps the 'resolvconf' parser as it is, as PVE and PMG use its value to build the FQDN of the node certificate and more. It adds a new reader that keeps the whole search list, and only the node DNS API uses it. * 1/2 pve-common: new reader, and a test for both readers * 2/2 pve-manager: GET /nodes/{node}/dns uses the new reader, needs the bumped pve-common The obsolete 'domain' directive only takes one domain (resolv.conf(5)), so both readers only use its first word. changes since v2: * new approach: keep the old parser, add a new reader for the DNS API * 'domain' only uses its first word, with a regression test * dropped the pve-cluster and qemu-server patches, they are not needed anymore Tested on a PVE 9 node (libpve-common-perl 9.2.8, pve-manager 9.2.26, files patched in place) with three search domains set via resolvectl: * GET .../dns returns all three; a PUT with that value writes all three and GET returns them again * the node certificate ('pvecm updatecerts --force') and the cloud-init DNS fallback of a VM still only use the first domain, as before * 'domain a.example b.example' is read as 'a.example' by both readers 'make check' in pve-common passes before and after (17 new checks; if 'domain' is parsed as a list, 2 of them fail), proxmox-perltidy reports no changes. The cloud-init 'fqdn' issue from v2 2/3 (a VM with several entries in its own 'searchdomain') is not related to this anymore, I can send it on its own. v2: https://lore.proxmox.com/pve-devel/20261116010014.88737-1-lucasbarros.kam@gmail.com/ v1: https://lore.proxmox.com/pve-devel/20261107223019.21361-1-lucasbarros.kam@gmail.com/ This series was prepared with the help of an LLM based coding assistant; I reviewed the changes and ran the tests mentioned above myself. common: Lucas Barros (1): inotify: resolv.conf: add reader that keeps the whole search list src/PVE/INotify.pm | 29 ++++++++++-- test/Makefile | 1 + test/resolv_conf_test.pl | 97 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+), 3 deletions(-) create mode 100755 test/resolv_conf_test.pl manager: Lucas Barros (1): fix #6357: api: node dns: return all search domains PVE/API2/Nodes.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.50.1 (Apple Git-155)