Thanks for the quick iteration and the unifying of the implementations for the validations!
I ran a few smoke-tests: * installed a server in our test-lab which had issues with 9.0 (due to duplicate predictable names (pci-path-based) for a 100g broadcom nic and a 1g broadcom nic...) - this went fine (I installed with filter.ID_NET_NAME set to the unpinned name - and the autoinstaller correctly configured the corresponding pinned nic-name in /etc/network/interfaces) * during a few smoke-tests in a VM I noticed that the following nic-names were accepted (by both the tui and gui installers): '_' , 'a' - from a quick look at: https://git.proxmox.com/?p=pve-common.git;a=blob;f=src/PVE/JSONSchema.pm;h=c6e0f36898487b9584221693b8846195f1ef87dd;hb=HEAD#l677 I think both would be rejected - so maybe we could adapt this in a follow-up (and still cap the maximal length here to 15) In any case - the series as-is is a worthy addition! Reviewed-by: Stoiko Ivanov <[email protected]> Tested-by: Stoiko Ivanov <[email protected]> On Tue, 11 Nov 2025 14:59:50 +0100 Christoph Heiss <[email protected]> wrote: > This series adds support for pinning the names of network interfaces > directly during the installation, for all of GUI, TUI and auto-installer. > > There are also some smaller clean-ups and quality-of-life improvements > interspersed - to keep the patches for each part of the installer > together - in the series, which can also be applied > separately/beforehand if wanted. > > Tested all combinations, i.e. for each of GUI, TUI and auto-installer, > installed with pinning disabled (checking for regressions) and with > pinning enabled at some custom interface names set. > > The auto-installer changes can be tested by specifying e.g. > > [network.interface-name-pinning] > enabled = true > > [network.interface-name-pinning.mapping] > "ab:cd:ef:12:34:56" = "mgmt" > "12:34:56:ab:cd:ef" = "lan0" > > in the answer file. > > If pinning is enabled, interfaces which have no explicit mapping > specified in the answer file will be assigned a pinned name based on > their enumeration and the fixed `nic` prefix, i.e. `nic2` for the third > NIC enumerated during boot. > > The hardcoded `nic` prefix could potentially be made configurable in the > future, although given that the auto-installer provides information > about all present network interfaces in the answer POST request anyway, > assigning all network interfaces a custom name programmatically is no > big deal. > > History > ======= > v2: > https://lore.proxmox.com/pve-devel/[email protected]/ > v1: > https://lore.proxmox.com/pve-devel/[email protected]/ > > Notable changes v2 -> v3: > * matched up pinning map validation for Rust & Perl (hopefully I > caught all cases this time), also adding unit tests to the latter > * improved above checks for both sides, mostly w.r.t. numeric checks > > Notable changes v1 -> v2: > * improved interface name validation according to our `pve-iface` json > schema > * fixed gui error dialog getting wrongly z-ordered > * implemented gtk machinery suggestion by Maximilano > > Diffstat > ======== > Christoph Heiss (14): > test: parse-kernel-cmdline: fix module import statement > run env: network: add kernel driver name to network interface info > common: utils: fix clippy warnings > common: setup: simplify network address list serialization > common: implement support for `network_interface_pin_map` config > auto: add support for pinning network interface names > assistant: verify network settings in `validate-answer` subcommand > post-hook: avoid redundant Option<bool> for (de-)serialization > post-hook: add network interface name and pinning status > tui: views: move network options view to own module > tui: views: form: allow attaching user-defined data to children > tui: add support for pinning network interface names > ui: gtk3: allow passing of dialog parent window > gui: add support for pinning network interface names > > Thomas Lamprecht (1): > install: add support for network interface name pinning > > Proxmox/Install.pm | 47 +- > Proxmox/Install/Config.pm | 8 + > Proxmox/Install/RunEnv.pm | 11 + > Proxmox/Sys/Net.pm | 116 ++++- > Proxmox/UI.pm | 12 +- > Proxmox/UI/Gtk3.pm | 12 +- > proxinstall | 189 +++++++- > proxmox-auto-install-assistant/src/main.rs | 39 +- > proxmox-auto-installer/src/answer.rs | 63 ++- > .../src/bin/proxmox-auto-installer.rs | 5 +- > proxmox-auto-installer/src/utils.rs | 62 ++- > proxmox-auto-installer/tests/parse-answer.rs | 2 + > .../network_interface_pinning.json | 30 ++ > .../network_interface_pinning.toml | 22 + > ...n_from_dhcp_no_default_domain.run-env.json | 36 +- > ...rface_pinning_overlong_interface_name.json | 3 + > ...rface_pinning_overlong_interface_name.toml | 18 + > .../no_fqdn_from_dhcp.run-env.json | 36 +- > .../tests/resources/run-env-info.json | 38 +- > .../src/fetch_plugins/http.rs | 5 +- > .../src/fetch_plugins/partition.rs | 5 +- > proxmox-installer-common/src/lib.rs | 5 + > proxmox-installer-common/src/options.rs | 274 ++++++++++-- > proxmox-installer-common/src/setup.rs | 78 +++- > proxmox-installer-common/src/utils.rs | 6 +- > proxmox-post-hook/src/main.rs | 73 ++-- > proxmox-tui-installer/src/main.rs | 110 +---- > proxmox-tui-installer/src/setup.rs | 3 + > proxmox-tui-installer/src/views/bootdisk.rs | 8 +- > proxmox-tui-installer/src/views/mod.rs | 90 ++-- > proxmox-tui-installer/src/views/network.rs | 406 ++++++++++++++++++ > test/Makefile | 7 +- > test/parse-kernel-cmdline.pl | 2 +- > test/validate-link-pin-map.pl | 42 ++ > 34 files changed, 1534 insertions(+), 329 deletions(-) > create mode 100644 > proxmox-auto-installer/tests/resources/parse_answer/network_interface_pinning.json > create mode 100644 > proxmox-auto-installer/tests/resources/parse_answer/network_interface_pinning.toml > create mode 100644 > proxmox-auto-installer/tests/resources/parse_answer_fail/network_interface_pinning_overlong_interface_name.json > create mode 100644 > proxmox-auto-installer/tests/resources/parse_answer_fail/network_interface_pinning_overlong_interface_name.toml > create mode 100644 proxmox-tui-installer/src/views/network.rs > create mode 100755 test/validate-link-pin-map.pl > _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
