From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: [PATCH network] sdn: fabrics: only warn about a host vrf on a fabric interface
Date: Fri, 20 Nov 2026 15:25:17 +0100 [thread overview]
Message-ID: <20261120142518.201252-1-g.goller@proxmox.com> (raw)
A vrf set on a fabric interface made the whole SDN network config of
the node fail, so zones and other fabrics were not updated either.
Print a warning instead.
Note that this does not resolve the vrf conflict, this means that the
`interface` config has a different vrf entry than the `interfaces.d/sdn`
config. The `interfaces` config runs before, so it wins and the
interface will never be added to the fabric vrf.
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
src/PVE/Network/SDN/Fabrics.pm | 5 +++--
src/test/run_test_fabric_host_vrf.pl | 12 ++----------
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/PVE/Network/SDN/Fabrics.pm b/src/PVE/Network/SDN/Fabrics.pm
index c3a3a8111537..1b1cce3114db 100644
--- a/src/PVE/Network/SDN/Fabrics.pm
+++ b/src/PVE/Network/SDN/Fabrics.pm
@@ -10,6 +10,7 @@ use PVE::Exception qw(raise_param_exc);
use PVE::JSONSchema qw(get_standard_option);
use PVE::INotify;
use PVE::ParseUtils qw($IPV4RE);
+use PVE::RESTEnvironment qw(log_warn);
use PVE::Network::SDN::Formats;
use PVE::Network::SDN::PrefixLists;
@@ -292,8 +293,8 @@ sub generate_etc_network_config {
my $ifaces = PVE::INotify::read_file('interfaces')->{ifaces};
for my $iface (sort keys %$ifaces) {
next if !$ifaces->{$iface}->{vrf};
- die "interface '$iface' - cannot set VRF '$ifaces->{$iface}->{vrf}' on an interface that"
- . " is part of a fabric, remove the VRF from the host interface\n"
+ log_warn("interface '$iface' - cannot set VRF '$ifaces->{$iface}->{vrf}' on an"
+ . " interface that is part of a fabric, remove the VRF from the host interface")
if $fabric_object->is_fabric_interface($nodename, $iface);
}
diff --git a/src/test/run_test_fabric_host_vrf.pl b/src/test/run_test_fabric_host_vrf.pl
index 9ed3f2579d34..730255a988e5 100755
--- a/src/test/run_test_fabric_host_vrf.pl
+++ b/src/test/run_test_fabric_host_vrf.pl
@@ -42,11 +42,7 @@ $inotify->mock(
$interfaces = { ens19 => { vrf => 'vrf_blue' } };
eval { PVE::Network::SDN::Fabrics::generate_etc_network_config($running_cfg) };
-like(
- $@,
- qr/^interface 'ens19' - cannot set VRF 'vrf_blue' on an interface that is part of a fabric/,
- 'VRF on a fabric interface fails',
-);
+is($@, '', 'VRF on a fabric interface does not fail');
$interfaces = { ens20 => { vrf => 'vrf_blue' }, ens19 => {} };
my $config = eval { PVE::Network::SDN::Fabrics::generate_etc_network_config($running_cfg) };
@@ -84,10 +80,6 @@ like(
$interfaces = { ens19 => { vrf => 'vrf_red' } };
eval { PVE::Network::SDN::Fabrics::generate_etc_network_config($zone_cfg) };
-like(
- $@,
- qr/^interface 'ens19' - cannot set VRF 'vrf_red'/,
- 'host VRF on a zone fabric interface fails',
-);
+is($@, '', 'host VRF on a zone fabric interface does not fail');
done_testing();
--
2.47.3
next reply other threads:[~2026-11-20 14:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 14:25 Gabriel Goller [this message]
2026-11-20 18:51 ` [PATCH network] sdn: fabrics: only warn about a host vrf on a fabric interface Gabriel Goller
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=20261120142518.201252-1-g.goller@proxmox.com \
--to=g.goller@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@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 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.