From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <t.lamprecht@proxmox.com>
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 6F54F7354B
 for <pve-devel@lists.proxmox.com>; Thu, 15 Apr 2021 14:20:42 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 649FD19ADB
 for <pve-devel@lists.proxmox.com>; Thu, 15 Apr 2021 14:20:42 +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 CA0BE19ACE
 for <pve-devel@lists.proxmox.com>; Thu, 15 Apr 2021 14:20:41 +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 941C545ADF
 for <pve-devel@lists.proxmox.com>; Thu, 15 Apr 2021 14:20:41 +0200 (CEST)
Message-ID: <bc4ad6ef-6eb8-7770-366f-9381f69b8130@proxmox.com>
Date: Thu, 15 Apr 2021 14:20:40 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101
 Thunderbird/88.0
Content-Language: en-US
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
 Aaron Lauterer <a.lauterer@proxmox.com>, Fabian Ebner <f.ebner@proxmox.com>
References: <20210402101923.13050-1-a.lauterer@proxmox.com>
 <20210402101923.13050-2-a.lauterer@proxmox.com>
 <f9a58dbd-9b10-52de-30a3-0be95cf020c3@proxmox.com>
 <b557a2f6-cb5f-86c4-8ecf-f3cd2049fe8a@proxmox.com>
 <3a122331-1f39-5e52-bcff-8ed28f763a2c@proxmox.com>
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
In-Reply-To: <3a122331-1f39-5e52-bcff-8ed28f763a2c@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.041 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.001 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. [plugin.pm]
Subject: Re: [pve-devel] [PATCH v6 storage 1/1] add disk reassign feature
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 15 Apr 2021 12:20:42 -0000

On 15.04.21 13:53, Aaron Lauterer wrote:
> Just adding the functionality on the top level Plugin.pm could have some
> potential ugly side effects for 3rd party plugins that do not yet handle that
> call themselves. So to be on the safe side, by default we rather fail right
> there (was discussed a versions ago).

I may have forgotten the old discussion, but I do not think that this is a problem.

External plugins can detect if they require it and implement it, and actually,
we could just check the ABI version a plugin provides on calling the base method
and error out if it's less than the one where we introduced this method.

> IMHO it would be nice though to change the structure of the storage plugins a
> bit. E.g. instead of assuming dir/file storages for Plugin.pm, having a basic
> abstraction specifically for any directory/file based storage which handles
> all the common tasks and further down the hierarchy the specific
> implementations regarding mounting and such. But that would mean a hard break
> of the current approach, especially for 3rd party plugins.

That sounds actually quite like what we already have, rather the base plugin
module should just provide the set of methods with a `die "implement me"`, and
probably only that, i.e., be a plain abstract interface.

But that's quite some change involved and requires a ABI version break as all
plugins would need to adapt to that one, and the benefit is meh, at least for
our internal ones; and after all those are the ones we actually support.