From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 01BBE1FF13C for ; Thu, 11 Jun 2026 18:22:30 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0BDDF11A64; Thu, 11 Jun 2026 18:22:28 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [PATCH pve-network 6/9] fix #7294: sdn: vnet: update pool members on vnet migration and deletion From: Gabriel Goller To: David Riley In-Reply-To: <20260611145935.147788-7-d.riley@proxmox.com> References: <20260611145935.147788-1-d.riley@proxmox.com> <20260611145935.147788-7-d.riley@proxmox.com> Date: Thu, 11 Jun 2026 18:21:47 +0200 Message-Id: <178119490789.310459.3473294597655341044.b4-reply@b4> X-Mailer: b4 0.16-dev X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1781194864476 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com,sdn.pm] Message-ID-Hash: SPBTHMAID5SEQ34GFNUOFMK6ZW3V7Y6W X-Message-ID-Hash: SPBTHMAID5SEQ34GFNUOFMK6ZW3V7Y6W 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 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. > 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 > > > > >