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 CE52560979 for ; Thu, 3 Sep 2020 11:01:18 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CBC3817263 for ; Thu, 3 Sep 2020 11:01:18 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 id 51FCB17258 for ; Thu, 3 Sep 2020 11:01:18 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 1CA56449A5 for ; Thu, 3 Sep 2020 11:01:18 +0200 (CEST) To: Proxmox VE development discussion , =?UTF-8?Q?Fabian_Gr=c3=bcnbichler?= References: <20200901124421.25901-1-a.lauterer@proxmox.com> <20200901124421.25901-5-a.lauterer@proxmox.com> <1599119807.ye2lhdunc6.astroid@nora.none> From: Aaron Lauterer Message-ID: <85f08049-a3f1-1be6-4a28-3018c6497b56@proxmox.com> Date: Thu, 3 Sep 2020 11:01:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.2.1 MIME-Version: 1.0 In-Reply-To: <1599119807.ye2lhdunc6.astroid@nora.none> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.138 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.324 Looks like a legit reply (A) 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [dirplugin.pm, basedirplugin.pm, nfsplugin.pm, plugin.pm, cifsplugin.pm] Subject: Re: [pve-devel] [PATCH v2 storage 4/5] disk reassign: add not implemented yet message to storages 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, 03 Sep 2020 09:01:18 -0000 On 9/3/20 9:58 AM, Fabian Grünbichler wrote: > wouldn't it make more sense to implement it in Dir/NFS/CIFSPlugin, and > add this 'implement me' into Plugin itself? otherwise this breaks > external plugins. also, would it make sense to add a feature for this so > that we can check in the calling code with a meaningful error message > before attempting and die-ing? The storage plugins are a bit of a mess hierarchically. The base plugin (Plugin.pm) implements quite a few methods for the dir based plugins (dir, nfs, cifs) like `find_free_diskname` for example. The other plugins overwrite these methods. If we want to do it properly and to avoid code duplication, we should probably add another class in between to which me move the common file based operations which are used by all the dir based plugins. Plugin.pm BaseDirPlugin.pm DirPlugin.pm NFSPlugin.pm CIFSPlugin.pm Having the reassigning as additional feature sounds good. I will try that. But this will need