From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 5D01C1FF14C for ; Fri, 12 Jun 2026 10:41:58 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DB243C6EC; Fri, 12 Jun 2026 10:41:56 +0200 (CEST) Date: Fri, 12 Jun 2026 10:41:17 +0200 From: Gabriel Goller To: David Riley Subject: Re: [PATCH pve-network 6/9] fix #7294: sdn: vnet: update pool members on vnet migration and deletion Message-ID: Mail-Followup-To: David Riley , pve-devel@lists.proxmox.com References: <20260611145935.147788-1-d.riley@proxmox.com> <20260611145935.147788-7-d.riley@proxmox.com> <178119490789.310459.3473294597655341044.b4-reply@b4> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20241002-35-39f9a6 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1781253628747 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.028 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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: N52MTGFSVGKJBGRDO2QUPNH5NTS3LA44 X-Message-ID-Hash: N52MTGFSVGKJBGRDO2QUPNH5NTS3LA44 X-MailFrom: g.goller@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 CC: pve-devel@lists.proxmox.com 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 12.06.2026 08:37, David Riley wrote: > > On 6/11/26 6:21 PM, Gabriel Goller wrote: > > On 2026-06-11 16:59 +0200, 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=7294 > > > Signed-off-by: David Riley > > > --- > > This patch doesn't apply on latest master. > > Thanks for taking a look at it. > You are completely right that it fails on the current master. As mentioned in the > cover letter, this series depends on my earlier patch series [0]. > Just tested it locally and it should apply cleanly after applying this series first. > > [0] https://lore.proxmox.com/pve-devel/20260603145523.120075-1-d.riley@proxmox.com/ Turns out I can't read. Sorry for the noise. > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > >