public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Michael Köppl" <m.koeppl@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>
Cc: "pve-devel" <pve-devel-bounces@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH installer 00/14] support network interface name pinning
Date: Tue, 21 Oct 2025 16:04:43 +0200	[thread overview]
Message-ID: <DDO22GLBT9IO.2UL9QK0W2E2QI@proxmox.com> (raw)
In-Reply-To: <20251014132207.1171073-1-c.heiss@proxmox.com>

Tested this in both the GUI and TUI installers and the autoinstaller.
Tried the following:

- Pinning names for multiple interfaces
- Pinning names for interface with invalid MAC in autoinstaller
    Noticed that in this case, the default of nic0 is used since the map
    from MACs to interface names is pre-populated with the default
    values. So if I use a MAC address in my answer file that does not
    exist, the interface name for any interface not mentioned in the
    answer file will be set to nic0, since if
    network.interface-name-pinning.enabled is set to true, the pinning
    is done in any case. I suppose this is on purpose, since there's no
    way to check for the existence of the MAC address beforehand and
    once the installation is running, the .link file has already been
    written. Just wanted to mention it nonetheless.
- Testing invalid interface names in GUI, TUI, autoinstaller
    Noticed that in the GUI, the error dialog will show up behind the
    form where users enter the interface name. The form cannot really be
    interacted with and the window has to be moved to the side to reveal
    the error message.
- Explicitly test the case of pinning a fully numeric interface, since
  it is allowed by the installers, but systemd does not allow this [0].
    The result of this is that the interface that's affected does not
    come up on first boot, since /etc/network/interfaces configures the
    numeric-only interface which does not exist.
- Checked that disabling pinning actually does not set any interface
  names

Other than the above, this seems to work as advertised. Nice work!

Also had a look at the code and left a few comments on the individual
patches, but did not notice any real problems with it. A single patch
seems to add code that is not correctly formatted and other than that
just added some suggestions.

With the comments on the individual patches addressed, consider this:
Tested-by: Michael Köppl <m.koeppl@proxmox.com>
Reviewed-by: Michael Köppl <m.koeppl@proxmox.com>

[0] https://manpages.debian.org/testing/udev/systemd.link.5.en.html#%5BLINK%5D_SECTION_OPTIONS

On Tue Oct 14, 2025 at 3:21 PM CEST, Christoph Heiss 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.
>
> Christoph Heiss (13):
>   test: parse-kernel-cmdline: fix module import statement
>   install: add support for network interface name pinning
>   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
>   gui: add support for pinning network interface names
>
>  Proxmox/Install.pm                            |  47 +-
>  Proxmox/Install/Config.pm                     |   8 +
>  Proxmox/Install/RunEnv.pm                     |  11 +
>  Proxmox/Sys/Net.pm                            |  63 ++-
>  proxinstall                                   | 209 ++++++++-
>  proxmox-auto-install-assistant/src/main.rs    |   3 +-
>  proxmox-auto-installer/src/answer.rs          |  63 ++-
>  proxmox-auto-installer/src/utils.rs           |  36 +-
>  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 +-
>  proxmox-installer-common/src/lib.rs           |   5 +
>  proxmox-installer-common/src/options.rs       | 174 ++++++--
>  proxmox-installer-common/src/setup.rs         |  74 +++-
>  proxmox-installer-common/src/utils.rs         |   6 +-
>  proxmox-post-hook/src/main.rs                 |  62 +--
>  proxmox-tui-installer/src/main.rs             | 105 +----
>  proxmox-tui-installer/src/setup.rs            |   3 +
>  proxmox-tui-installer/src/views/bootdisk.rs   |   6 +-
>  proxmox-tui-installer/src/views/mod.rs        |  41 +-
>  proxmox-tui-installer/src/views/network.rs    | 406 ++++++++++++++++++
>  test/parse-kernel-cmdline.pl                  |   2 +-
>  27 files changed, 1274 insertions(+), 235 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



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

      parent reply	other threads:[~2025-10-21 14:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 13:21 Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 01/14] test: parse-kernel-cmdline: fix module import statement Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 02/14] install: add support for network interface name pinning Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 03/14] run env: network: add kernel driver name to network interface info Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 04/14] common: utils: fix clippy warnings Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 05/14] common: setup: simplify network address list serialization Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 06/14] common: implement support for `network_interface_pin_map` config Christoph Heiss
2025-10-21 14:05   ` Michael Köppl
2025-10-14 13:21 ` [pve-devel] [PATCH installer 07/14] auto: add support for pinning network interface names Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 08/14] assistant: verify network settings in `validate-answer` subcommand Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 09/14] post-hook: avoid redundant Option<bool> for (de-)serialization Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 10/14] post-hook: add network interface name and pinning status Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 11/14] tui: views: move network options view to own module Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 12/14] tui: views: form: allow attaching user-defined data to children Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 13/14] tui: add support for pinning network interface names Christoph Heiss
2025-10-14 13:21 ` [pve-devel] [PATCH installer 14/14] gui: " Christoph Heiss
2025-10-14 15:04   ` Maximiliano Sandoval
2025-10-16 12:01     ` Christoph Heiss
2025-10-21 14:05   ` Michael Köppl
2025-10-21 14:04 ` Michael Köppl [this message]

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=DDO22GLBT9IO.2UL9QK0W2E2QI@proxmox.com \
    --to=m.koeppl@proxmox.com \
    --cc=pve-devel-bounces@lists.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