From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 0FF771FF066 for ; Tue, 24 Nov 2026 10:40:41 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 0587B2158E; Tue, 24 Nov 2026 10:40:39 +0100 (CET) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Subject: [PATCH installer 1/2] network: align VLAN interface names with the documentation Date: Tue, 24 Nov 2026 10:39:29 +0100 Message-ID: <20261124094025.2479405-2-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261124094025.2479405-1-s.ivanov@proxmox.com> References: <20261124094025.2479405-1-s.ivanov@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795513234720 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.366 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: Q64Y4SCDAGA5HD5P4KKIQ6PM2ZS6FOOH X-Message-ID-Hash: Q64Y4SCDAGA5HD5P4KKIQ6PM2ZS6FOOH X-MailFrom: s.ivanov@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: our documentation has relied on ifupdown(2)'s way of handling $iface.$vid as identifier for VLAN interfaces for a long while (looking through pve-docs commit history shows `vlan-raw-device` only occurring in the api-viewer) Sticking to our documentation should help reducing the different ways that people are configuring their interfaces and thus hopefully the potential for errors. Signed-off-by: Stoiko Ivanov --- Proxmox/Install.pm | 4 +-- test/generate-ifupdown2-config.pl | 42 +++++++++++++++---------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm index 76bfd04..337f0d7 100644 --- a/Proxmox/Install.pm +++ b/Proxmox/Install.pm @@ -887,9 +887,9 @@ sub generate_ifupdown2_config { my $get_vlan_stanza = sub { my ($raw_device) = @_; - my $config = "auto vlan$vlan_id\niface vlan$vlan_id $ntype static\n\taddress $cidr\n"; + my $config = "auto $raw_device.$vlan_id\niface $raw_device.$vlan_id $ntype static\n\taddress $cidr\n"; $config .= "\tgateway $gateway\n" if !$is_gateway6_from_ra; - return [4, "vlan$vlan_id", $config . "\tvlan-raw-device $raw_device\n"]; + return [4, "$raw_device.$vlan_id", $config . "\tvlan-raw-device $raw_device\n"]; }; if ($iso_env->{cfg}->{bridged_network} && defined($vlan_id)) { diff --git a/test/generate-ifupdown2-config.pl b/test/generate-ifupdown2-config.pl index a3b7bdb..b33f7a7 100755 --- a/test/generate-ifupdown2-config.pl +++ b/test/generate-ifupdown2-config.pl @@ -152,8 +152,8 @@ is_generated( auto eno1 iface eno1 inet manual -auto vlan5 -iface vlan5 inet static +auto eno1.5 +iface eno1.5 inet static address 192.168.0.10/24 gateway 192.168.0.1 vlan-raw-device eno1 @@ -194,8 +194,8 @@ iface bond0 inet manual bond-miimon 100 bond-mode active-backup -auto vlan5 -iface vlan5 inet static +auto bond0.5 +iface bond0.5 inet static address 192.168.0.10/24 gateway 192.168.0.1 vlan-raw-device bond0 @@ -244,8 +244,8 @@ iface vmbr0 inet manual bridge-vlan-aware yes bridge-vids 2-4094 -auto vlan5 -iface vlan5 inet static +auto vmbr0.5 +iface vmbr0.5 inet static address 192.168.0.10/24 gateway 192.168.0.1 vlan-raw-device vmbr0 @@ -304,8 +304,8 @@ iface vmbr0 inet manual bridge-vlan-aware yes bridge-vids 2-4094 -auto vlan5 -iface vlan5 inet static +auto vmbr0.5 +iface vmbr0.5 inet static address 192.168.0.10/24 gateway 192.168.0.1 vlan-raw-device vmbr0 @@ -323,8 +323,8 @@ iface eno1 inet manual iface eno2 inet manual -auto vlan5 -iface vlan5 inet static +auto eno1.5 +iface eno1.5 inet static address 192.168.0.10/24 gateway 192.168.0.1 vlan-raw-device eno1 @@ -347,8 +347,8 @@ iface bond0 inet manual bond-miimon 100 bond-mode active-backup -auto vlan5 -iface vlan5 inet static +auto bond0.5 +iface bond0.5 inet static address 192.168.0.10/24 gateway 192.168.0.1 vlan-raw-device bond0 @@ -363,8 +363,8 @@ is_generated( auto eno1 iface eno1 inet manual -auto vlan5 -iface vlan5 inet static +auto eno1.5 +iface eno1.5 inet static address 192.168.0.10/24 gateway 192.168.0.1 vlan-raw-device eno1 @@ -749,8 +749,8 @@ iface bond0 inet6 manual bond-miimon 100 bond-mode active-backup -auto vlan5 -iface vlan5 inet6 static +auto bond0.5 +iface bond0.5 inet6 static address 2001:db8::1/64 gateway fe80::1 vlan-raw-device bond0 @@ -797,8 +797,8 @@ is_generated( auto eno1 iface eno1 inet6 manual -auto vlan5 -iface vlan5 inet6 static +auto eno1.5 +iface eno1.5 inet6 static address 2001:db8::1/64 vlan-raw-device eno1 @@ -822,8 +822,8 @@ iface vmbr0 inet6 manual bridge-vlan-aware yes bridge-vids 2-4094 -auto vlan5 -iface vlan5 inet6 static +auto vmbr0.5 +iface vmbr0.5 inet6 static address 2001:db8::1/64 vlan-raw-device vmbr0 EOT @@ -834,7 +834,7 @@ set_config(bridge => 0, bond => 0, vlan => 1); Proxmox::Install::Config::merge({ mngmt_vlan => { enabled => 1, vid => 200 } }); like( Proxmox::Install::generate_ifupdown2_config(), - qr/^iface vlan200 inet6 static\n\taddress 2001:db8::1\/64\n\tgateway fe80::1\n/m, + qr/^iface eno1.200 inet6 static\n\taddress 2001:db8::1\/64\n\tgateway fe80::1\n/m, 'management VLAN other than the installation environment one gets the configured gateway', ); -- 2.47.3