From: "Christoph Heiss" <c.heiss@proxmox.com>
To: "Michael Köppl" <m.koeppl@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH installer 14/14] gui: add support for pinning network interface names
Date: Wed, 22 Oct 2025 11:40:02 +0200 [thread overview]
Message-ID: <DDOR2CHEXIFF.16RRT1X8MOIE6@proxmox.com> (raw)
In-Reply-To: <DDO232Q5XNFX.2VGDBBZ3VC83P@proxmox.com>
On Tue Oct 21, 2025 at 4:05 PM CEST, Michael Köppl wrote:
> 3 comments inline
>
> On Tue Oct 14, 2025 at 3:21 PM CEST, Christoph Heiss wrote:
[..]
>> + $dialog->signal_connect(
>> + response => sub {
>> + my $new_mapping = {};
>> + my $reverse_mapping = {};
>> + foreach my $mac (keys %$inputs) {
>> + my $name = $inputs->{$mac}->get_text();
>> +
>> + if (!defined($name) || $name eq '') {
>> + Proxmox::UI::message("interface name mapping for $mac cannot be empty");
>> + $inputs->{$mac}->grab_focus();
>> + return;
>> + }
>> +
>> + if ($reverse_mapping->{$name}) {
>> + Proxmox::UI::message(
>> + "duplicate interface name mapping '$name' for: $mac, $reverse_mapping->{$name}"
>> + );
>> + $inputs->{$mac}->grab_focus();
>> + return;
>> + }
>> +
>> + if (length($name) > MAX_IFNAME_LEN) {
>> + Proxmox::UI::message(
>> + "interface name mapping '$name' for $mac cannot be longer than "
>> + . MAX_IFNAME_LEN
>> + . " characters");
>> + $inputs->{$mac}->grab_focus();
>> + return;
>> + }
>
> same as for the TUI installer, imo the check for only-numeric interface
> names would make sense. Or is there a reason it was omitted?
No particular reason, I'll add it here too for v2.
IIRC that seems to just have slipped through, as the first draft was
with a fixed prefix, since our tooling didn't support fully custom names
back then.
[..]
>> - my $get_device_desc = sub {
>> - my $iface = shift;
>> - return "$iface->{name} - $iface->{mac} ($iface->{driver})";
>> + my $refresh_device_cb = sub {
>> + # clear all entries and re-add them with their new names
>> + my $active = $device_cb->get_active();
>> + $device_model->clear();
>> +
>> + my $mapping = Proxmox::Install::Config::get_network_interface_pin_map();
>> + my $i = 0;
>> + for my $index (sort keys $ipconf->{ifaces}->%*) {
>> + my $iface = $ipconf->{ifaces}->{$index};
>> + my $iter = $device_model->append();
>> +
>> + my $symbol = "$iface->{state}" eq "UP" ? "\x{25CF}" : ' ';
>> + my $name = $gtk_state->{network_pinning_enabled} ? $mapping->{ $iface->{mac} } : $iface->{name};
>
> This seems to need a `make tidy`?
>
I'll run it before sending v2, thanks :^)
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-10-22 9:39 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 13:21 [pve-devel] [PATCH installer 00/14] support network interface name pinning 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-22 9:37 ` Christoph Heiss
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-22 9:40 ` Christoph Heiss [this message]
2025-10-21 14:04 ` [pve-devel] [PATCH installer 00/14] support network interface name pinning Michael Köppl
2025-10-22 9:46 ` 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=DDOR2CHEXIFF.16RRT1X8MOIE6@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=m.koeppl@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