public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-network 1/1] fix #7672: evpn zone: dont generate frr vrfs on excluded nodes
Date: Fri,  5 Jun 2026 16:18:09 +0200	[thread overview]
Message-ID: <20260605141811.269424-1-s.hanreich@proxmox.com> (raw)

If the main EVPN controller of a EVPN zone is restricted to specific
nodes, then applying the SDN configuration still tries to generate the
FRR configuration for the zone and its vnets on the excluded nodes.
This is because the functions generating the FRR configuration for the
VRF of the zone and the vnets does not check the 'nodes' property of
the EVPN controller. Avoid this situation by checking the setting in
the controller and returning early to avoid generating any
configuration.

Fixes: e388f01fd85469e809982e71c84cc06a781899bb
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index 4220cb67..d744e882 100644
--- a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -324,6 +324,11 @@ sub generate_zone_frr_config {
 
     my $local_node = PVE::INotify::nodename();
 
+    if (defined($controller->{nodes})) {
+        my @nodes = PVE::Tools::split_list($controller->{nodes});
+        return if !grep { $_ eq $local_node } @nodes;
+    }
+
     my $vrf = "vrf_$id";
     my $vrfvxlan = $plugin_config->{'vrf-vxlan'};
     my $exitnodes = $plugin_config->{'exitnodes'};
@@ -586,12 +591,18 @@ sub generate_zone_frr_config {
 sub generate_vnet_frr_config {
     my ($class, $plugin_config, $controller, $zone, $zoneid, $vnetid, $config) = @_;
 
+    my $local_node = PVE::INotify::nodename();
+
+    if (defined($controller->{nodes})) {
+        my @nodes = PVE::Tools::split_list($controller->{nodes});
+        return if !grep { $_ eq $local_node } @nodes;
+    }
+
     my $exitnodes = $zone->{'exitnodes'};
     my $exitnodes_local_routing = $zone->{'exitnodes-local-routing'};
 
     return if !$exitnodes_local_routing;
 
-    my $local_node = PVE::INotify::nodename();
     my $is_gateway = $exitnodes->{$local_node};
 
     return if !$is_gateway;
-- 
2.47.3





                 reply	other threads:[~2026-06-05 14:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260605141811.269424-1-s.hanreich@proxmox.com \
    --to=s.hanreich@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