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 975E21FF0E5 for ; Wed, 15 Jul 2026 15:45:57 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id F131E21430; Wed, 15 Jul 2026 15:45:56 +0200 (CEST) Message-ID: <69b374b5-d86a-490d-8acf-eafbbccba6a1@proxmox.com> Date: Wed, 15 Jul 2026 15:45:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH-SERIES network 0/2] assert vnet zone exists on create and update To: pve-devel@lists.proxmox.com References: <20260703104750.117988-1-d.kral@proxmox.com> Content-Language: en-US From: Stefan Hanreich In-Reply-To: <20260703104750.117988-1-d.kral@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.175 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) 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: NUCFPKGXWEOSXDBNRQJEMI5OWRVB6IAZ X-Message-ID-Hash: NUCFPKGXWEOSXDBNRQJEMI5OWRVB6IAZ 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: On 7/3/26 12:47 PM, Daniel Kral wrote: > If a VNet is created or updated with an empty zone '' or a non-existing > zone identifier, the API handler will die with a slighly confusing error > message: > > create sdn vnet object failed: cannot lookup undefined type! at > /usr/share/perl5/PVE/API2/Network/SDN/Vnets.pm line 326. > > Therefore, use the helper sdn_zones_config(), which asserts whether the > zone identifier is non-empty and existing. Thanks for the patch! Reproduced this locally and then tested with those patches applied. Does what it says on the tin and improves error messages. Code lgtm as well - consider this: Tested-by: Stefan Hanreich Reviewed-by: Stefan Hanreich