From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 327BB93896 for ; Thu, 5 Jan 2023 14:54:59 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 14CAE397E for ; Thu, 5 Jan 2023 14:54:29 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 5 Jan 2023 14:54:28 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 34039440DA for ; Thu, 5 Jan 2023 14:54:28 +0100 (CET) Message-ID: <27a763c0-95ff-d1c4-e88a-07eb87ca3e13@proxmox.com> Date: Thu, 5 Jan 2023 14:54:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0 Content-Language: en-GB To: Proxmox VE development discussion , Leo Nunner References: <20230102160438.180285-1-l.nunner@proxmox.com> <20230102160438.180285-2-l.nunner@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20230102160438.180285-2-l.nunner@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 1.434 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -2.939 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [plugin.pm, cifsplugin.pm, nfsplugin.pm, dirplugin.pm] Subject: Re: [pve-devel] [PATCH v2 storage] config: add overrides for default directory locations X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2023 13:54:59 -0000 Am 02/01/2023 um 17:04 schrieb Leo Nunner: > Allowing overrides for the default directory locations seems to > integrate rather well into the existing system. Custom locations > are specified using the "dirs" parameter as a comma-separated list > of "vtype:/location" values. > > For now, the option has been enabled for the Directory, CIFS and NFS > backends. > > Signed-off-by: Leo Nunner > --- > PVE/Storage/CIFSPlugin.pm | 1 + > PVE/Storage/DirPlugin.pm | 1 + > PVE/Storage/NFSPlugin.pm | 1 + > PVE/Storage/Plugin.pm | 49 +++++++++++++++++++++++++++++++++++---- > test/get_subdir_test.pm | 7 ++++++ > 5 files changed, 55 insertions(+), 4 deletions(-) > > diff --git a/PVE/Storage/CIFSPlugin.pm b/PVE/Storage/CIFSPlugin.pm > index 982040a..4284c35 100644 > --- a/PVE/Storage/CIFSPlugin.pm > +++ b/PVE/Storage/CIFSPlugin.pm > @@ -128,6 +128,7 @@ sub properties { > sub options { > return { > path => { fixed => 1 }, > + dirs => { optional => 1 }, > server => { fixed => 1 }, > share => { fixed => 1 }, > nodes => { optional => 1 }, > diff --git a/PVE/Storage/DirPlugin.pm b/PVE/Storage/DirPlugin.pm > index 8715a9d..3c907ca 100644 > --- a/PVE/Storage/DirPlugin.pm > +++ b/PVE/Storage/DirPlugin.pm > @@ -54,6 +54,7 @@ sub properties { > sub options { > return { > path => { fixed => 1 }, > + dirs => { optional => 1 }, > nodes => { optional => 1 }, > shared => { optional => 1 }, > disable => { optional => 1 }, > diff --git a/PVE/Storage/NFSPlugin.pm b/PVE/Storage/NFSPlugin.pm > index 5bd7313..b7e8318 100644 > --- a/PVE/Storage/NFSPlugin.pm > +++ b/PVE/Storage/NFSPlugin.pm > @@ -79,6 +79,7 @@ sub properties { > sub options { > return { > path => { fixed => 1 }, > + dirs => { optional => 1 }, > server => { fixed => 1 }, > export => { fixed => 1 }, > nodes => { optional => 1 }, > diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm > index 8a41df1..5cb3d90 100644 > --- a/PVE/Storage/Plugin.pm > +++ b/PVE/Storage/Plugin.pm > @@ -181,6 +181,11 @@ my $defaultData = { > default => 'metadata', > optional => 1, > }, > + dirs => { "content-dirs" for more clarity? > + description => "Overrides for default directories", "[...] default content type directories" > + type => "string", format => "pve-dir-override-list", please also add the default value here