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 9154A1FF0C5 for ; Fri, 28 Aug 2026 10:41:52 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 512CE2142C; Fri, 28 Aug 2026 10:41:52 +0200 (CEST) From: Daniel Herzig To: Hannes Laimer Subject: Re: [pve-network 2/2] fix #7837: simpleplugin: make use of get_subnets_with_config In-Reply-To: References: <20260826154318.618730-1-d.herzig@proxmox.com> <20260826154318.618730-2-d.herzig@proxmox.com> Date: Fri, 28 Aug 2026 10:41:41 +0200 Message-ID: <87y0dq4oxm.fsf@proxmox.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787906492214 X-SPAM-LEVEL: Spam detection results: 0 AWL 1.530 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_MED -2.3 Sender listed at https://www.dnswl.org/, medium 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: JZJYHZ7J52ZMG3GWKF4XRYIWYJ7HJQPD X-Message-ID-Hash: JZJYHZ7J52ZMG3GWKF4XRYIWYJ7HJQPD X-MailFrom: d.herzig@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: Hannes Laimer writes: > Generally this LGTM! EVPN has the same problem[1], so fixing it > there as well would make sense for this series. > > Aside from that, for more than one patch a `--cover-letter` would be > nice, that simplifies answering. Also allows to add some extra context > if needed. > > nit: the commit messages mostly describe what the code does, ideally > they would include more of the _why_, something like: > > ``` > Subnets were read from the running config instead of the one passed in, > so callers that generate without committing first, like the dry-run, > never saw pending subnet changes in the result. > ``` > > for the commit that mentions the bugzilla issue. > Agreed, apparently I was too deep in it so I missed adding the cover letter. Absolutely makes sense, will be added in v2. I'll also look into the call from the Evpnplugin module, thanks for the headsup! > > [1] > https://git.proxmox.com/?p=pve-network.git;a=blob;f=src/PVE/Network/SDN/Zones/EvpnPlugin.pm;h=0e79707c374609f2505d842f99633e6311794f15;hb=refs/heads/master#l242 > > On 2026-08-26 17:43, Daniel Herzig wrote: >> At the given point we already have the subnet configuration by hand, so >> make sure to use it, instead of inherently falling back to >> re-reading '/etc/pve/sdn/.running-config'. >> >> Signed-off-by: Daniel Herzig >> --- >> src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/PVE/Network/SDN/Zones/SimplePlugin.pm b/src/PVE/Network/SDN/Zones/SimplePlugin.pm >> index 347eee9..d922035 100644 >> --- a/src/PVE/Network/SDN/Zones/SimplePlugin.pm >> +++ b/src/PVE/Network/SDN/Zones/SimplePlugin.pm >> @@ -75,7 +75,7 @@ sub generate_sdn_config { >> my @iface_config = (); >> >> my $address = {}; >> - my $subnets = PVE::Network::SDN::Vnets::get_subnets($vnetid, 1); >> + my $subnets = PVE::Network::SDN::Vnets::get_subnets_with_config($vnetid, $subnet_cfg); >> >> my $ipv4 = undef; >> my $ipv6 = undef;