pve-installer/proxmox-post-hook
Christoph Heiss a37e0442b4 fix #5811: auto: add option to retrieve FQDN from DHCP configuration
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 either directly specify the desired FQDN in the answer
file as before through

```
[global]
fqdn = "node.example.local"
```

or, with the new mechanism, if the DHCP server provides all the
information already:

```
[global]
fqdn.source = "from-dhcp"
```

or additionally with a custom domain:

```
[global.fqdn]
source = "from-dhcp"
domain = "custom.domain.local"
```

The DHCP-provided hostname and domain are already provided to the
auto-installer through the runtime environment, so its just a matter of
using them.

The test suite is extended quite a bit, to cover all the different
cases.

[0] https://bugzilla.proxmox.com/show_bug.cgi?id=5811

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
 [TL: resolve conflict from context of recent ZFS related changes]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-04-04 18:24:04 +02:00
..
src fix #5811: auto: add option to retrieve FQDN from DHCP configuration 2025-04-04 18:24:04 +02:00
Cargo.toml tree-wide: rust: update to 2024 edition 2025-02-28 16:04:40 +01:00