From db730e39f504b60a5555702f99516d3e282bc2e9 Mon Sep 17 00:00:00 2001 From: Kevin Adams Date: Mon, 8 Jun 2026 12:09:48 -0400 Subject: [PATCH] fix: only declare new properties in TrueNASMultipath::properties() PVE::SectionConfig registers properties globally across all plugin types. Re-declaring the inherited TrueNAS.pm properties (truenas_host, truenas_pool, etc.) caused a "duplicate property" error at pvedaemon startup when both plugins are loaded. TrueNASMultipath::properties() now returns only the new truenas_portals property; all inherited properties remain registered by TrueNAS.pm. Co-Authored-By: Claude Sonnet 4.6 --- perl5/PVE/Storage/Custom/TrueNASMultipath.pm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/perl5/PVE/Storage/Custom/TrueNASMultipath.pm b/perl5/PVE/Storage/Custom/TrueNASMultipath.pm index 1c07c41..477a494 100644 --- a/perl5/PVE/Storage/Custom/TrueNASMultipath.pm +++ b/perl5/PVE/Storage/Custom/TrueNASMultipath.pm @@ -28,15 +28,18 @@ sub plugindata { # ── Config properties (extends parent) ─────────────────────────────────────── +# Only declare NEW properties here. Inherited TrueNAS.pm properties (truenas_host, +# truenas_pool, etc.) are already registered globally by TrueNAS.pm — re-declaring +# them would cause a "duplicate property" error in PVE::SectionConfig. sub properties { - my $props = PVE::Storage::Custom::TrueNAS::properties(); - $props->{truenas_portals} = { - description => "Comma-separated iSCSI portal IP addresses for multipath " - . "(e.g. '172.31.69.91,192.168.69.91'). Each portal is logged " - . "into separately; dm-multipath aggregates the sessions.", - type => 'string', + return { + truenas_portals => { + description => "Comma-separated iSCSI portal IP addresses for multipath " + . "(e.g. '172.31.69.91,192.168.69.91'). Each portal is logged " + . "into separately; dm-multipath aggregates the sessions.", + type => 'string', + }, }; - return $props; } sub options {