From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id A3DB61FF0E5 for ; Wed, 15 Jul 2026 17:11:55 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id DAC1121450; Wed, 15 Jul 2026 17:11:54 +0200 (CEST) Message-ID: Date: Wed, 15 Jul 2026 17:11:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH access-control/network v5 0/7] fix #7520: sdn: prune orphaned ACLs and handle VNet migrations To: pve-devel@lists.proxmox.com References: <20260707120404.73072-1-d.riley@proxmox.com> Content-Language: en-US From: Stefan Hanreich In-Reply-To: <20260707120404.73072-1-d.riley@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.153 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) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust 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: S6XG55M73BNBL6NH4CKJB4H4EPDPV5FX X-Message-ID-Hash: S6XG55M73BNBL6NH4CKJB4H4EPDPV5FX X-MailFrom: s.hanreich@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: Thanks for tackling this! Tested the following things: * Removing Zone / VNet / Fabric / Controller / Route Map / Prefix List * Moving a VNet to another zone * collision detection Took a look at the code as well, some nits but no real blockers from my POV. Consider this: Reviewed-by: Stefan Hanreich Tested-by: Stefan Hanreich On 7/7/26 2:04 PM, David Riley wrote: > Thanks @Daniel K. for the thorough review. > > Difference from v4: > * Instead of passing arrays of path segments [, ], paths > are now passed as strings / to match the actual ACL > paths as there was no real benefit of using arrays. > * Moved helper functions into seperate commits and updated the commit > messages accordingly. > * Fix: style nits (post if, for loop dereferencing, ...) > * Fix: tests nits (grouped mocking, removed main subroutine) > > Difference from v3: > * Refactored tests > * Perl style guide refactor (for instead of foreach) > * Update: route_map_suffix regex used for detecting digits to match > style guide recommendation > > Difference from v2: > * Relocate VNet ACLs to the new zone path when a VNet is moved, > including a validation check to abort on path conflicts. > * Refactor diff generation in preparation for an upcoming patch > series, resolving #7294 [0]. The upcoming series will hook into the > VNet diff to clean up pool members. > * Add unit testing for pruning and migration mechanism > > === Original Cover Letter === > > Implement a pruning mechanism to clean up orphaned SDN ACL entries by > comparing the running configuration with the newly compiled state > during configuration commit. > > This ensures state consistency for manual applies via the UI/API > as well as during the automatic configuration reload on system boot. > The pruning covers: > * Zones > * VNets > * Fabrics > * Controllers > * Route maps > * Prefix lists > > IPAMs and DNS are excluded as they are not staged. > > Link: https://bugzilla.proxmox.com/show_bug.cgi?id=7520 > > [0] https://bugzilla.proxmox.com/show_bug.cgi?id=7294 > > > pve-access-control: > > David Riley (6): > permission: add acl tree node parent lookup without node creation > fix #7520: sdn: add pruning SDN resources ACLs > test: add sdn acl pruning tests > permission: add helper to check for active permissions > fix #7520: sdn: add VNet ACL migration > test: add sdn acl migration tests > > src/PVE/AccessControl.pm | 155 ++++++++++++++++++++++++++ > src/test/Makefile | 3 + > src/test/sdn_acl_migration_test.pl | 171 +++++++++++++++++++++++++++++ > src/test/sdn_acl_pruning_test.pl | 134 ++++++++++++++++++++++ > 4 files changed, 463 insertions(+) > create mode 100644 src/test/sdn_acl_migration_test.pl > create mode 100644 src/test/sdn_acl_pruning_test.pl > > > pve-network: > > David Riley (1): > fix #7520: config: prune orphaned and relocate moved VNet ACLs > > src/PVE/Network/SDN.pm | 115 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 115 insertions(+) > > > Summary over all repositories: > 5 files changed, 578 insertions(+), 0 deletions(-) >