public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Kral <d.kral@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Christoph Heiss <c.heiss@proxmox.com>
Subject: Re: [pve-devel] [PATCH installer 0/6] fix #5811: add option to retrieve FQDN from DHCP configuration
Date: Tue, 1 Apr 2025 15:45:47 +0200	[thread overview]
Message-ID: <02e7804d-ab22-4c30-b44f-ad6c032acc05@proxmox.com> (raw)
In-Reply-To: <20250327151718.1084841-1-c.heiss@proxmox.com>

On 3/27/25 16:17, Christoph Heiss wrote:
> Fixes #5811 [0].
> 
> Adds a new option to the answer file for specifying to use the
> DHCP-provided hostname and domain. For the domain, an additional
> fallback/default can be specified, in case the DHCP server only provides
> hostnames. The hostname is always required in this mode.
> 
> The addition to the answer file format is done in a backwards-compatible
> way.
> 
> Users can now specify the following to use the DHCP-provided domain:
> 
> ```
> [global]
> fqdn.source = "from-dhcp"
> ```
> 
> or additionally with a custom domain:
> 
> ```
> [global.fqdn]
> source = "from-dhcp"
> domain = "custom.domain.local"
> ```
> 
> Patches #1 through #4 can all be applied independently, #1 & #4 are pure
> cleanups.
> 
> [0] https://bugzilla.proxmox.com/show_bug.cgi?id=5811
> 
> Diffstat
> ========
> 
> Christoph Heiss (6):
>    auto: utils: avoid a force unwrap()
>    auto: tests: parse-answer: allow per-test runtime env
>    auto: tests: allow testing for serde parse errors of answer files
>    tui, common: move network option tests to correct crate
>    common: options: allow user-supplied domain for network options
>    fix #5811: auto: add option to retrieve FQDN from DHCP configuration

Tested this patch series with setting up a DHCP server through dnsmasq, 
where I set up the dnsmasq with `dhcp-fqdn` and `domain=something.com` 
for the domain part, and `dhcp-host=<MAC>,<IPaddr>,<HOSTNAME>`.

I tested `global.fqdn.source = 'from-dhcp'` with both 
`global.fqdn.domain` set and unset for:

- not setting hostnames nor domain at all -> correctly errors for both,
- setting a hostname but no domain -> correctly errors for unset domain, 
works as expected with fallback domain,
- setting no hostname but a domain -> correctly errors for both,
- setting both a hostname and a domain -> works as expected.

Also tested that for the working cases these are set as the fqdn after 
installation, and also tested that setting `fqdn = "some.local.domain"` 
also still works as expected as before.

Works great!

Just wanted to ask: Would it make sense to also have a fallback for the 
hostname if the DHCP server does only provide a domain but no hostname 
here or should the DHCP provide the full FQDN?

Else, consider this series as:

Tested-by: Daniel Kral <d.kral@proxmox.com>


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


  parent reply	other threads:[~2025-04-01 13:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-27 15:17 Christoph Heiss
2025-03-27 15:17 ` [pve-devel] [PATCH installer 1/6] auto: utils: avoid a force unwrap() Christoph Heiss
2025-04-04 12:51   ` [pve-devel] applied: " Thomas Lamprecht
2025-03-27 15:17 ` [pve-devel] [PATCH installer 2/6] auto: tests: parse-answer: allow per-test runtime env Christoph Heiss
2025-04-04 12:51   ` [pve-devel] applied: " Thomas Lamprecht
2025-03-27 15:17 ` [pve-devel] [PATCH installer 3/6] auto: tests: allow testing for serde parse errors of answer files Christoph Heiss
2025-04-04 12:51   ` [pve-devel] applied: " Thomas Lamprecht
2025-03-27 15:17 ` [pve-devel] [PATCH installer 4/6] tui, common: move network option tests to correct crate Christoph Heiss
2025-04-04 12:54   ` Thomas Lamprecht
2025-03-27 15:17 ` [pve-devel] [PATCH installer 5/6] common: options: allow user-supplied domain for network options Christoph Heiss
2025-03-27 15:17 ` [pve-devel] [PATCH installer 6/6] fix #5811: auto: add option to retrieve FQDN from DHCP configuration Christoph Heiss
2025-04-01 13:15   ` Daniel Kral
2025-04-01 13:25     ` Christoph Heiss
2025-04-01 13:29       ` Stefan Hanreich
2025-04-01 13:44         ` Daniel Kral
2025-04-01 14:58           ` Thomas Lamprecht
2025-04-01 13:45 ` Daniel Kral [this message]
2025-04-01 14:05   ` [pve-devel] [PATCH installer 0/6] fix #5811: " Christoph Heiss

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=02e7804d-ab22-4c30-b44f-ad6c032acc05@proxmox.com \
    --to=d.kral@proxmox.com \
    --cc=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