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 6315860A2D for ; Thu, 3 Sep 2020 11:06:46 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 57714172E8 for ; Thu, 3 Sep 2020 11:06:46 +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 86FB8172DC for ; Thu, 3 Sep 2020 11:06:44 +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 456B6449DA for ; Thu, 3 Sep 2020 11:06:44 +0200 (CEST) To: pve-devel@lists.proxmox.com References: <20200901124421.25901-1-a.lauterer@proxmox.com> <20200901124421.25901-5-a.lauterer@proxmox.com> <1599119807.ye2lhdunc6.astroid@nora.none> <85f08049-a3f1-1be6-4a28-3018c6497b56@proxmox.com> From: Aaron Lauterer Message-ID: <20dddf18-84e8-61ce-0afa-81d0c78d0771@proxmox.com> Date: Thu, 3 Sep 2020 11:06:43 +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: <85f08049-a3f1-1be6-4a28-3018c6497b56@proxmox.com> 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.136 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. [basedirplugin.pm, dirplugin.pm, proxmox.com, 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:06:46 -0000 sent to early without finishing the last sentence... On 9/3/20 11:01 AM, Aaron Lauterer wrote: > > > 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 But this will need the intermediate dir base class so that we can add the feature just for them and not all plugins, especially third party ones which we cannot update. Then again, what if a third party plugin is using the dir based methods in the plugin.pm already? should I just add new things to the intermediate BaseDirPlugin in order to stay compatible? > > > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel