public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 0/3] run env, auto: fix dhcp hostname/domain retrieval
Date: Tue, 15 Jul 2025 15:55:38 +0200	[thread overview]
Message-ID: <20250715135620.1023136-1-c.heiss@proxmox.com> (raw)

First two patches fix two small, separate issues w.r.t. the automatic
retrieval of hostname and search domain from the DHCP lease.

First one is a correctness fix for RFC 2132, which specifies that the
hostname in the DHCP lease _can_ also contain a fully-qualified name,
i.e. <hostname>.<domain>. That can easily be stripped.

Second was that in the auto-installer answer file `global.fqdn.domain`
can be set to an empty string, which further down the line causes
parsing failure and the default `<productname>.example.invalid` being
set as system FQDN.

Both were reported by a user on the community forum [0].

Third patch just runs perltidy on the codebase again, fixing up some
recent changes.

[0] https://forum.proxmox.com/threads/auto-install-fetching-fqdn-through-dhcp-does-not-set-search-domain-correctly.168369/

Diffstat
========

Christoph Heiss (3):
  run env: fix dhcp-set hostname containing local domain
  auto: answer: deserialize empty domain name as `None`
  install: run `make tidy`

 Proxmox/Install.pm                            |  6 ++++--
 Proxmox/Install/RunEnv.pm                     |  8 +++++++-
 Proxmox/Sys/Net.pm                            | 12 ++++++++----
 proxmox-auto-installer/src/answer.rs          | 13 +++++++++++++
 proxmox-auto-installer/tests/parse-answer.rs  |  1 +
 ...n_from_dhcp_empty_dhcp_domain_setting.json | 19 +++++++++++++++++++
 ...n_from_dhcp_empty_dhcp_domain_setting.toml | 17 +++++++++++++++++
 7 files changed, 69 insertions(+), 7 deletions(-)
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/fqdn_from_dhcp_empty_dhcp_domain_setting.json
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/fqdn_from_dhcp_empty_dhcp_domain_setting.toml

-- 
2.49.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


             reply	other threads:[~2025-07-15 13:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 13:55 Christoph Heiss [this message]
2025-07-15 13:55 ` [pve-devel] [PATCH installer 1/3] run env: fix dhcp-set hostname containing local domain Christoph Heiss
2025-07-15 13:55 ` [pve-devel] [PATCH installer 2/3] auto: answer: deserialize empty domain name as `None` Christoph Heiss
2025-07-15 13:55 ` [pve-devel] [PATCH installer 3/3] install: run `make tidy` Christoph Heiss
2025-07-15 14:32 ` [pve-devel] applied: [PATCH installer 0/3] run env, auto: fix dhcp hostname/domain retrieval 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=20250715135620.1023136-1-c.heiss@proxmox.com \
    --to=c.heiss@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal