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 A1D411FF09D for ; Sun, 01 Nov 2026 22:39:29 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 398B7216E9; Sun, 01 Nov 2026 22:38:53 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH common 01/10] section config: do not add isolated property lists on lookups Date: Sun, 1 Nov 2026 22:34:50 +0100 Message-ID: <20261101213835.353604-2-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261101213835.353604-1-t.lamprecht@proxmox.com> References: <20261101213835.353604-1-t.lamprecht@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793569120828 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.422 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: R5K7VQKFBELJHRHSWKEIFLZEVHURRU6J X-Message-ID-Hash: R5K7VQKFBELJHRHSWKEIFLZEVHURRU6J X-MailFrom: t.lamprecht@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: With isolated properties in use, looking up a property of a type that has no isolated property list, like a plugin that is not isolated or an unknown type, created an empty list for that type as a side effect. Only init() reads these lists, and it starts from scratch, so nothing depended on the extra entries. Still, a lookup should not modify the plugin data, especially when the type comes from a config file. No semantic change intended. Signed-off-by: Thomas Lamprecht --- src/PVE/SectionConfig.pm | 3 ++- test/section_config_property_isolation_test.pl | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/PVE/SectionConfig.pm b/src/PVE/SectionConfig.pm index 66375ac..1febf76 100644 --- a/src/PVE/SectionConfig.pm +++ b/src/PVE/SectionConfig.pm @@ -1306,7 +1306,8 @@ sub get_property_schema { my $schema; if ($class->has_isolated_properties()) { - $schema = $pdata->{isolatedPropertyList}->{$type}->{$key}; + my $isolated = $pdata->{isolatedPropertyList}->{$type}; + $schema = $isolated->{$key} if $isolated; } $schema //= $pdata->{propertyList}->{$key}; diff --git a/test/section_config_property_isolation_test.pl b/test/section_config_property_isolation_test.pl index 4c999c1..11b3142 100755 --- a/test/section_config_property_isolation_test.pl +++ b/test/section_config_property_isolation_test.pl @@ -472,6 +472,15 @@ my $update_schema = Conf->updateSchema(); my $expected_update_schema = make_schema(1); is_deeply($update_schema, $expected_update_schema, "property-isolation update schema test"); +ok( + !defined(Conf->get_property_schema('unknown', 'another')), + "unknown type has no isolated properties", +); +ok( + !exists(Conf->private()->{isolatedPropertyList}->{unknown}), + "property lookup does not add a property list", +); + done_testing(); 1; -- 2.47.3