From: David Riley <d.riley@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-network 6/9] fix #7294: sdn: vnet: update pool members on vnet migration and deletion
Date: Thu, 11 Jun 2026 16:59:32 +0200 [thread overview]
Message-ID: <20260611145935.147788-7-d.riley@proxmox.com> (raw)
In-Reply-To: <20260611145935.147788-1-d.riley@proxmox.com>
Update or remove corresponding resource pool allocations in user.cfg
whenever a VNet is altered or deleted. This prevents stale paths and
dangling references from breaking the configuration integrity.
Link: https://bugzilla.proxmox.com/show_bug.cgi?id=7294
Signed-off-by: David Riley <d.riley@proxmox.com>
---
src/PVE/Network/SDN.pm | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm
index 6a49621..1541f8e 100644
--- a/src/PVE/Network/SDN.pm
+++ b/src/PVE/Network/SDN.pm
@@ -259,11 +259,26 @@ sub cleanup {
PVE::AccessControl::migrate_sdn_resource_access($vnet_move_paths);
}
+ foreach my $move (@$vnet_move_paths) {
+ my ($src_type, $src_zone, $vnet) = @{ $move->{src_path} };
+ my ($dest_type, $dest_zone, $dest_vnet) = @{ $move->{dest_path} };
+
+ if (defined($src_type) && $src_type eq 'zones' && $src_zone && $vnet && $dest_zone) {
+ PVE::AccessControl::migrate_vnet_zone_in_pool($src_zone, $dest_zone, $vnet);
+ }
+ }
+
my @paths_to_delete = (@$vnet_delete_paths, @$route_map_paths, @$generic_paths);
if (@paths_to_delete) {
PVE::AccessControl::remove_sdn_resource_access(\@paths_to_delete);
}
+ foreach my $path (@$vnet_delete_paths) {
+ my ($type, $zone, $vnet) = @$path;
+ if ($type && $type eq 'zones' && $zone && $vnet) {
+ PVE::AccessControl::remove_vnet_from_pool($zone, $vnet);
+ }
+ }
}
sub diff_generic_resources {
--
2.47.3
next prev parent reply other threads:[~2026-06-11 15:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 14:59 [PATCH access-control/cluster/manager/network/qemu-server 0/9] fix #7294: pool: add SDN VNets as pool members David Riley
2026-06-11 14:59 ` [PATCH pve-manager 1/9] ui: replace var with let to match style guide for variable declaration David Riley
2026-06-11 14:59 ` [PATCH pve-manager 2/9] fix #7294: api: pool: add SDN VNets as pool members David Riley
2026-06-11 14:59 ` [PATCH pve-manager 3/9] fix #7294: ui: " David Riley
2026-06-11 14:59 ` [PATCH pve-access-control 4/9] fix #7294: acl: " David Riley
2026-06-11 14:59 ` [PATCH pve-network 5/9] fix #7294: sdn: register api formats for zones and vnets David Riley
2026-06-12 12:18 ` Gabriel Goller
2026-06-12 12:51 ` David Riley
2026-06-12 13:46 ` Gabriel Goller
2026-06-12 14:17 ` David Riley
2026-06-11 14:59 ` David Riley [this message]
2026-06-11 16:21 ` [PATCH pve-network 6/9] fix #7294: sdn: vnet: update pool members on vnet migration and deletion Gabriel Goller
2026-06-12 6:37 ` David Riley
2026-06-12 8:41 ` Gabriel Goller
2026-06-11 14:59 ` [PATCH pve-cluster 7/9] cluster: add helpers module with version comparison functions David Riley
2026-06-11 14:59 ` [PATCH pve-cluster 8/9] fix #7294: cluster: helpers: add cluster-wide version assertion David Riley
2026-06-11 14:59 ` [PATCH qemu-server 9/9] fix #7294: helpers: use cluster-wide version helper David Riley
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=20260611145935.147788-7-d.riley@proxmox.com \
--to=d.riley@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