From: Jakob Klocker <j.klocker@proxmox.com>
To: David Riley <d.riley@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH access-control/network v3 0/5] fix #7520: sdn: prune orphaned ACLs and handle VNet migrations
Date: Tue, 9 Jun 2026 12:07:56 +0200 [thread overview]
Message-ID: <e55d530a-19dd-4ac7-a821-ca2f5020d9d9@proxmox.com> (raw)
In-Reply-To: <20260603145523.120075-1-d.riley@proxmox.com>
I reproduced the orphaned ACL entry problem for:
* Zones (Simple, VLAN, QinQ, VXLAN, EVPN)
* VNets
* Controllers
* Fabrics
* Route Maps
* Prefix Lists
The patch fixes this for me. After removing any of the above, the
corresponding ACL entry is now deleted as well.
I also tested whether moving a VNet between zones adapts the
permissions. Before the patch it didn't, after the patch it does.
That said, I'd question whether blindly moving and removing
permissions is the expected behaviour, since permissions can be
created for SDN paths that don't actually exist yet. Maybe a checkbox
controlling whether the permissions should be deleted/moved/copied
would be the way to go here.
One unrelated thing I noticed while testing: when removing a VNet, the
associated firewall config isn't deleted. This could cause problems if
a new VNet with the same name is created later, since it would pick up
the stale config.
Tested-by: Jakob Klocker <j.klocker@proxmox.com>
On 6/3/26 4:55 PM, David Riley wrote:
> 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.
>
> 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
>
> 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 (4):
> fix: #7520: sdn: prune orphaned ACLs on resource deletion
> fix #7520: test: add unit tests for sdn acl pruning logic
> fix: #7520: sdn: add VNet ACL migration
> fix #7520: test: add unit tests for sdn acl migration logic
>
> src/PVE/AccessControl.pm | 132 +++++++++++++++++++++++++++++
> src/test/Makefile | 3 +
> src/test/sdn_acl_migration.cfg | 13 +++
> src/test/sdn_acl_migration_test.pl | 118 ++++++++++++++++++++++++++
> src/test/sdn_acl_pruning.cfg | 22 +++++
> src/test/sdn_acl_pruning_test.pl | 116 +++++++++++++++++++++++++
> 6 files changed, 404 insertions(+)
> create mode 100644 src/test/sdn_acl_migration.cfg
> create mode 100644 src/test/sdn_acl_migration_test.pl
> create mode 100644 src/test/sdn_acl_pruning.cfg
> create mode 100644 src/test/sdn_acl_pruning_test.pl
>
>
> pve-network:
>
> David Riley (1):
> fix #7520: config: prune orphaned ACLs and relocate moved VNets
>
> src/PVE/Network/SDN.pm | 123 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 123 insertions(+)
>
>
> Summary over all repositories:
> 7 files changed, 527 insertions(+), 0 deletions(-)
>
prev parent reply other threads:[~2026-06-09 10:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 14:55 [PATCH access-control/network v3 0/5] fix #7520: sdn: prune orphaned ACLs and handle VNet migrations David Riley
2026-06-03 14:55 ` [PATCH pve-access-control v3 1/5] fix: #7520: sdn: prune orphaned ACLs on resource deletion David Riley
2026-06-03 14:55 ` [PATCH pve-access-control v3 2/5] fix #7520: test: add unit tests for sdn acl pruning logic David Riley
2026-06-03 14:55 ` [PATCH pve-access-control v3 3/5] fix: #7520: sdn: add VNet ACL migration David Riley
2026-06-03 14:55 ` [PATCH pve-access-control v3 4/5] fix #7520: test: add unit tests for sdn acl migration logic David Riley
2026-06-03 14:55 ` [PATCH pve-network v3 5/5] fix #7520: config: prune orphaned ACLs and relocate moved VNets David Riley
2026-06-09 10:07 ` Jakob Klocker [this message]
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=e55d530a-19dd-4ac7-a821-ca2f5020d9d9@proxmox.com \
--to=j.klocker@proxmox.com \
--cc=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