From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-network 1/1] api2: evpn status: properly handle nodes field of evpn zones
Date: Thu, 28 May 2026 15:39:46 +0200 [thread overview]
Message-ID: <20260528133947.309145-1-s.hanreich@proxmox.com> (raw)
When querying the status of EVPN IP/MAC-VRFs, the nodes field of the
zone configuration is read. The nodes are returned as a dictionary,
but the API endpoints are treating the field as an array. This leads
to an error when trying to obtain the status of an EVPN zone with
nodes configured explicitly:
Not an ARRAY reference at /usr/share/perl5/PVE/API2/Network/SDN/Nodes/Zone.pm line 379.
or
Not an ARRAY reference at /usr/share/perl5/PVE/API2/Network/SDN/Nodes/Vnet.pm line 141.
This has been reported by a user in the forum [1].
[1] https://forum.proxmox.com/threads/sdn-evpn-ip-vrf-and-mac-vrf-panels-are-empty-but-vtysh-shows-correct-routes.183897/
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
src/PVE/API2/Network/SDN/Nodes/Vnet.pm | 2 +-
src/PVE/API2/Network/SDN/Nodes/Zone.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PVE/API2/Network/SDN/Nodes/Vnet.pm b/src/PVE/API2/Network/SDN/Nodes/Vnet.pm
index d5dae56b..8cbf1e5e 100644
--- a/src/PVE/API2/Network/SDN/Nodes/Vnet.pm
+++ b/src/PVE/API2/Network/SDN/Nodes/Vnet.pm
@@ -138,7 +138,7 @@ __PACKAGE__->register_method({
raise_param_exc({
zone => "zone $vnet->{zone} of vnet $vnet_id does not exist on node $node_id",
})
- if defined($zone->{nodes}) && !grep { $_ eq $node_id } $zone->{nodes}->@*;
+ if defined($zone->{nodes}) && !$zone->{nodes}->{$node_id};
return PVE::RS::SDN::Fabrics::l2vpn_routes($vnet_id);
},
diff --git a/src/PVE/API2/Network/SDN/Nodes/Zone.pm b/src/PVE/API2/Network/SDN/Nodes/Zone.pm
index c1e48da7..a4e72c50 100644
--- a/src/PVE/API2/Network/SDN/Nodes/Zone.pm
+++ b/src/PVE/API2/Network/SDN/Nodes/Zone.pm
@@ -376,7 +376,7 @@ __PACKAGE__->register_method({
raise_param_exc({
zone => "zone does not exist on node $node_id",
})
- if defined($zone->{nodes}) && !grep { $_ eq $node_id } $zone->{nodes}->@*;
+ if defined($zone->{nodes}) && !$zone->{nodes}->{$node_id};
return PVE::RS::SDN::Fabrics::l3vpn_routes($zone_id);
},
--
2.47.3
reply other threads:[~2026-05-28 13:39 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=20260528133947.309145-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