From: Florian Paul Azim Hoberg via pve-devel <pve-devel@lists.proxmox.com>
To: Aaron Lauterer <a.lauterer@proxmox.com>
Cc: Florian Paul Azim Hoberg <florian.hoberg@credativ.de>,
Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH installer 1/1] fix #2164: add option to define a vlan tag within the installer
Date: Wed, 24 Sep 2025 10:06:02 +0000 [thread overview]
Message-ID: <mailman.369.1758725943.390.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <655087f3-a592-43e0-b33b-251d0f1d50d5@proxmox.com>
[-- Attachment #1: Type: message/rfc822, Size: 16973 bytes --]
From: Florian Paul Azim Hoberg <florian.hoberg@credativ.de>
To: Aaron Lauterer <a.lauterer@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>, Christoph Heiss <c.heiss@proxmox.com>
Subject: Re: [pve-devel] [PATCH installer 1/1] fix #2164: add option to define a vlan tag within the installer
Date: Wed, 24 Sep 2025 10:06:02 +0000
Message-ID: <6332E062-AB08-4F81-AA0B-B9D8D1C75B2E@credativ.de>
Hey Aaron, hey Christoph!
Thanks for your inputs. I already adjusted the code by Christoph’s suggestions which ensure that we have a proper validation of vlans (jftr, we start at vlan id 2 instead of 1 which is also special) and made the overview pages dynamically representing the given vlan tag id only when present. At this point, I just want to make sure this also fits your expectations to keep the review rounds short.
> Also; wondering if we maybe should just hide this if no VLAN tag is set,
> no not clutter the summary page unnecessarily?
Honestly, I have no better idea than this approach except of a complete refactor. So, I’m not sure if you’re fine with this approach within the GUI part where the HTML ack page would look like this:
<tr><td>Management Interface:</td> <td>__interface__</td></tr>
__vlan__
<tr><td>Hostname:</td> <td>__hostname__</td></tr>
And the content gets set by:
my $vlan_row = defined $vlan ? "<tr><td>Management Interface VLAN tag:</td><td>$vlan</td></tr>" : '';
Which then gets pushed and set if present:
if let Some(vlan) = self.network.vlan {
summary.push(SummaryOption::new(
"Management interface VLAN tag",
&vlan.to_string(),
));
}
> Instead of the dot notation, I would prefer the vlan-raw-device, vlan-id variant.
> This allows us to give the interface a name that matches the use, and the whole config is more explicit.
Would this fit to you?
my $ifaces = "auto lo\niface lo inet loopback\n\n";
my $ip_version = Proxmox::Install::Config::get_ip_version();
my $ntype = $ip_version == 4 ? 'inet' : 'inet6';
my $cidr = Proxmox::Install::Config::get_cidr();
my $vlan = Proxmox::Install::Config::get_vlan();
my $gateway = Proxmox::Install::Config::get_gateway();
my $ethdev = Proxmox::Install::Config::get_mngmt_nic();
my $bridgedev = "vmbr0";
my $mgmtdev = "management";
if ($iso_env->{cfg}->{bridged_network}) {
$ifaces .= "iface $ethdev $ntype manual\n";
$ifaces .=
"\nauto $bridgedev\n"
. "\tiface $bridgedev $ntype manual\n"
. "\tbridge-ports $ethdev\n"
. "\tbridge-stp off\n"
. "\tbridge-fd 0\n"
. "\n"
"\nauto $mgmtdev\niface $mgmtdev $ntype static\n"
. "\taddress $cidr\n"
. "\tgateway $gateway\n"
. "\tvlan-id $vlan\n"
. "\tvlan-raw-device $bridgedev\n";
} else {
$ifaces .=
"auto $ethdev\n"
. "iface $ethdev $ntype manual\n"
. "\n"
"auto $mgmtdev\n"
. "iface $mgmtdev $ntype static\n"
. "\taddress $cidr\n"
. "\tgateway $gateway\n"
. "\tvlan-id $vlan\n"
. "\tvlan-raw-device $ethdev\n";
}
Happy to hear your feedback.
Thanks!
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
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-09-24 14:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3978889E-73FA-4473-A70B-2C660662CC3D@credativ.de>
2025-09-23 12:07 ` Christoph Heiss
2025-09-24 8:48 ` Aaron Lauterer
2025-09-24 10:06 ` Florian Paul Azim Hoberg via pve-devel [this message]
2025-09-22 12:30 Florian Paul Azim Hoberg via pve-devel
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=mailman.369.1758725943.390.pve-devel@lists.proxmox.com \
--to=pve-devel@lists.proxmox.com \
--cc=a.lauterer@proxmox.com \
--cc=florian.hoberg@credativ.de \
/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 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.