From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 85D3E1FF150 for ; Mon, 06 Jul 2026 14:30:10 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 50C4A21463; Mon, 06 Jul 2026 14:30:10 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 06 Jul 2026 14:29:36 +0200 Message-Id: Subject: Re: [PATCH pve-network v2 07/10] fix #7294: sdn: vnet: update pool members on vnet migration and deletion From: "Daniel Kral" To: "David Riley" , X-Mailer: aerc 0.21.0-147-g43ac7b685014-dirty References: <20260626131035.112374-1-d.riley@proxmox.com> <20260626131035.112374-8-d.riley@proxmox.com> In-Reply-To: <20260626131035.112374-8-d.riley@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783340970426 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.020 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: N5DFHCQJQ42TUB2EWKEUBM2NXFYRP4SV X-Message-ID-Hash: N5DFHCQJQ42TUB2EWKEUBM2NXFYRP4SV X-MailFrom: d.kral@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri Jun 26, 2026 at 3:10 PM CEST, David Riley wrote: > 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=3D7294 > Signed-off-by: David Riley > --- > 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 cd563d2..81f5d9a 100644 > --- a/src/PVE/Network/SDN.pm > +++ b/src/PVE/Network/SDN.pm > @@ -261,11 +261,26 @@ sub cleanup { > PVE::AccessControl::migrate_sdn_resource_access($vnet_move_paths= ); > } > =20 > + for my $move (@$vnet_move_paths) { > + my ($src_type, $src_zone, $vnet) =3D @{ $move->{src_path} }; > + my ($dest_type, $dest_zone, $dest_vnet) =3D @{ $move->{dest_path= } }; > + > + if (defined($src_type) && $src_type eq 'zones' && $src_zone && $= vnet && $dest_zone) { Will there ever be any VNet paths to be moved, that are not zones? Otherwise, I think the checks are a little overkill here. Since there already quite a lot of definedness checks in diff_vnets(), these might be redundant here. > + PVE::AccessControl::migrate_vnet_zone_in_pool($src_zone, $de= st_zone, $vnet); > + } > + } > + > my @paths_to_delete =3D (@$vnet_delete_paths, @$route_map_paths, @$g= eneric_paths); > if (@paths_to_delete) { > PVE::AccessControl::remove_sdn_resource_access(\@paths_to_delete= ); > } > =20 > + for my $path (@$vnet_delete_paths) { > + my ($type, $zone, $vnet) =3D @$path; > + if ($type && $type eq 'zones' && $zone && $vnet) { > + PVE::AccessControl::remove_vnet_from_pool($zone, $vnet); > + } Same here. > + } > } > =20 > sub diff_generic_resources {