From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Maximiliano Sandoval <m.sandoval@proxmox.com>
Subject: Re: [pve-devel] [PATCH container] fix #7156: setup: separate dns list with semicolons
Date: Wed, 17 Dec 2025 22:36:12 +0100 [thread overview]
Message-ID: <2fb16dd6-8af4-4d95-a9d4-a78e65c6f5ba@proxmox.com> (raw)
In-Reply-To: <20251217150620.829190-1-m.sandoval@proxmox.com>
On 17/12/2025 16:06, Maximiliano Sandoval wrote:
> Network manager uses GLib's key file format [1]. As per `man 5
> nm-settings-keyfile`:
>
>> lists are separated by character ;
this is just an example though, marked by the "etc" you omitted...
[1] you linked yourself actually spells out:
"Lists are separated by a separator character, typically ; or ,.
To use the list separator character in a value in a list, it has
to be escaped by prefixing it with a backslash."
And the nm-settings-keyfile man page has tons of usages of comma
as separator. Please verify this.
>
> additionally, table 6 contains an example:
>
>> Example: dns=1.2.3.4;8.8.8.8;8.8.4.4;
>
> [1] https://docs.gtk.org/glib/struct.KeyFile.html
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
>
> Running `nmcli` with this patch on a new rockylinux 10 container results in
>
> ```
> DNS configuration:
> servers: 10.10.10.2 10.10.10.22
> domains: testinstall
> interface: eth0
> ```
>
> and
> ```
> $ grep 'dns=' /etc/NetworkManager/system-connections/eth0.nmconnection
> dns=10.10.10.2;10.10.10.22
> ```
>
> and domain resolution seems to works as expected.
>
>
> src/PVE/LXC/Setup/CentOS.pm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/PVE/LXC/Setup/CentOS.pm b/src/PVE/LXC/Setup/CentOS.pm
> index 0826977..7bccca2 100644
> --- a/src/PVE/LXC/Setup/CentOS.pm
> +++ b/src/PVE/LXC/Setup/CentOS.pm
> @@ -244,7 +244,7 @@ sub setup_network_with_networkmanager {
> }
> }
> if (@name_servers_v4) {
> - $data .= "dns=" . join(',', @name_servers_v4) . "\n";
> + $data .= "dns=" . join(';', @name_servers_v4) . "\n";
> $data .= "dns-search=" . join(' ', PVE::Tools::split_list($searchdomains)) . "\n"
> if $searchdomains;
> }
> @@ -270,7 +270,7 @@ sub setup_network_with_networkmanager {
> }
> }
> if (@name_servers_v6) {
> - $data .= "dns=" . join(',', @name_servers_v6) . "\n";
> + $data .= "dns=" . join(';', @name_servers_v6) . "\n";
> $data .= "dns-search=" . join(' ', PVE::Tools::split_list($searchdomains)) . "\n"
> if $searchdomains;
> }
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-12-17 21:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 15:06 Maximiliano Sandoval
2025-12-17 21:31 ` Thomas Lamprecht
2025-12-17 21:36 ` Thomas Lamprecht [this message]
2025-12-18 8:21 ` Maximiliano Sandoval
2025-12-18 14:09 ` Thomas Lamprecht
2025-12-18 15:04 ` [pve-devel] superseded: " Maximiliano Sandoval
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=2fb16dd6-8af4-4d95-a9d4-a78e65c6f5ba@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=m.sandoval@proxmox.com \
--cc=pve-devel@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox