From: Lucas Barros <lucasbarros.kam@gmail.com>
To: pve-devel@lists.proxmox.com
Cc: t.lamprecht@proxmox.com, Lucas Barros <lucasbarros.kam@gmail.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 [thread overview]
Message-ID: <20261116133000.6357-0-lucasbarros.kam@gmail.com> (raw)
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)
next reply other threads:[~2026-11-16 13:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 13:31 Lucas Barros [this message]
2026-11-16 13:31 ` [PATCH common v3 1/2] inotify: resolv.conf: add reader that keeps the whole search list Lucas Barros
2026-11-16 13:31 ` [PATCH manager v3 2/2] fix #6357: api: node dns: return all search domains Lucas Barros
2026-11-18 1:42 ` partially-applied: [PATCH common/manager v3 0/2] fix #6357: show all search domains in the node DNS settings Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261116133000.6357-0-lucasbarros.kam@gmail.com \
--to=lucasbarros.kam@gmail.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.