all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH installer 0/6] fix #5811: add option to retrieve FQDN from DHCP configuration
@ 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
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Christoph Heiss @ 2025-03-27 15:17 UTC (permalink / raw)
  To: pve-devel

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

 proxmox-auto-installer/src/answer.rs          |  36 +++-
 proxmox-auto-installer/src/utils.rs           |  43 ++++-
 proxmox-auto-installer/tests/parse-answer.rs  |  43 +++--
 .../parse_answer/fqdn_from_dhcp.json          |  19 ++
 .../parse_answer/fqdn_from_dhcp.toml          |  14 ++
 ...cp_no_dhcp_domain_with_default_domain.json |  19 ++
 ...cp_no_dhcp_domain_with_default_domain.toml |  17 ++
 ...ll_fqdn_from_dhcp_with_default_domain.json |  19 ++
 ...ll_fqdn_from_dhcp_with_default_domain.toml |  17 ++
 .../fqdn_from_dhcp_no_default_domain.json     |   3 +
 ...n_from_dhcp_no_default_domain.run-env.json |   1 +
 .../fqdn_from_dhcp_no_default_domain.toml     |  14 ++
 .../parse_answer_fail/fqdn_hostname_only.json |   3 +
 .../parse_answer_fail/fqdn_hostname_only.toml |  14 ++
 .../parse_answer_fail/no_fqdn_from_dhcp.json  |   3 +
 .../no_fqdn_from_dhcp.run-env.json            |   1 +
 .../parse_answer_fail/no_fqdn_from_dhcp.toml  |  14 ++
 .../tests/resources/run-env-info.json         |   2 +-
 proxmox-installer-common/Cargo.toml           |   3 +
 proxmox-installer-common/src/options.rs       | 165 +++++++++++++++++-
 proxmox-post-hook/src/main.rs                 |  19 +-
 proxmox-tui-installer/Cargo.toml              |   3 -
 proxmox-tui-installer/src/main.rs             |   2 +-
 proxmox-tui-installer/src/options.rs          |  93 ----------
 24 files changed, 440 insertions(+), 127 deletions(-)
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/fqdn_from_dhcp.json
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/fqdn_from_dhcp.toml
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/fqdn_from_dhcp_no_dhcp_domain_with_default_domain.json
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/fqdn_from_dhcp_no_dhcp_domain_with_default_domain.toml
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/full_fqdn_from_dhcp_with_default_domain.json
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/full_fqdn_from_dhcp_with_default_domain.toml
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/fqdn_from_dhcp_no_default_domain.json
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/fqdn_from_dhcp_no_default_domain.run-env.json
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/fqdn_from_dhcp_no_default_domain.toml
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/fqdn_hostname_only.json
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/fqdn_hostname_only.toml
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/no_fqdn_from_dhcp.json
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/no_fqdn_from_dhcp.run-env.json
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/no_fqdn_from_dhcp.toml

-- 
2.48.1



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


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-04-04 12:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-27 15:17 [pve-devel] [PATCH installer 0/6] fix #5811: add option to retrieve FQDN from DHCP configuration 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 ` [pve-devel] [PATCH installer 0/6] fix #5811: " Daniel Kral
2025-04-01 14:05   ` Christoph Heiss

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal