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) server-digest SHA256)
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id DE6C0DA0D
 for <pve-devel@lists.proxmox.com>; Tue, 19 Apr 2022 10:13:25 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id D111825317
 for <pve-devel@lists.proxmox.com>; Tue, 19 Apr 2022 10:13:25 +0200 (CEST)
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) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 0A93425309
 for <pve-devel@lists.proxmox.com>; Tue, 19 Apr 2022 10:13:24 +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 CDC53421BD;
 Tue, 19 Apr 2022 10:13:17 +0200 (CEST)
Message-ID: <b9ed9c3d-24a4-3f56-7902-af50a61ee935@proxmox.com>
Date: Tue, 19 Apr 2022 10:13:15 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101
 Thunderbird/99.0
Content-Language: en-GB
To: Benjamin <zorlin@gmail.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <mailman.321.1650311387.377.pve-devel@lists.proxmox.com>
 <CAGwEZW+ZM+OQ311gRfeK2x5secP-2qSKwUZ3i78dWJMqq1qkAg@mail.gmail.com>
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
In-Reply-To: <CAGwEZW+ZM+OQ311gRfeK2x5secP-2qSKwUZ3i78dWJMqq1qkAg@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 1.665 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           -3.247 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
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: Re: [pve-devel] MooseFS storage plugin
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: Tue, 19 Apr 2022 08:13:25 -0000

Hi,

> On Tue, Apr 19, 2022 at 3:49 AM Benjamin via pve-devel
>> I'd like to try developing a MooseFS storage plugin for Proxmox, ideally
>> getting it good enough to be A) included by the project B) supported in
>> some way by the MooseFS folks.

For Storage plugins the basic rules to be considered included are:
* Plugin code itself must be AGPLv3, if it's self written that'd be already
  covered by submitting it for inclusion alongside the CLA.

* The underlying storage tech must be open source, as while some provider allow
  an open API or FOSS client, the backend needs to be FOSS too. This is no "legal
  issue" per se, but otherwise we cannot test it freely nor recommend to our
  users, and at that point its better to have it as external plugin.

* Must be actively developed

* Ideally brings some features/characteristics that the existing storage
  plugins don't have.

MooseFS seems to be split into the core GPLv2 licensed part and a proprietary
one, fwict. How big is the difference there, can someone use the free part to
build a enterprise-grade service without needing to get proprietary code?
(spending money is naturally fine, don't get me wrong).

Also, its feature set reminds a bit of ceph, which we already have support for
not only accessing but also managing. Is there an advantage of MooseFS over
ceph RBD and cephFS technology or is it more preference?

With that info it could be easier to decide if we'd include a MooseFS plugin
directly, for now I cannot answer that. But even if we wouldn't include it,
the external plugin mechanism makes it relatively easy to make PVE support it
nonetheless.

>> As a long-time user of Proxmox but a newbie to Proxmox development I'm not
>> completely sure where to start, but
>> https://pve.proxmox.com/wiki/Developer_Documentation says I should email
>> here before I do anything.
>>
>> I've looked at the code for the GlusterFS and CephFS plugins and they don't
>> look *too* complicated, although I'm fairly new to Perl so I can't say for
>> sure.

Yes, the plugin ABI isn't that complex, and we often avoid more complex or
unordinary perl language features; albeit I may be biased with that :)

On 19/04/2022 04:15, Benjamin wrote:
> I've hacked together a really basic first try.
> 
> https://github.com/Zorlin/pve-moosefs/blob/main/MooseFSPlugin.pm
> 
> I'm getting this error which I don't fully understand -
> 
> Can't locate object method "mkpath" via package "/mnt/mfs" (perhaps you
> forgot to load "/mnt/mfs"?) at
> /usr/share/perl5/PVE/Storage/Custom/MooseFSPlugin.pm line 111. (500)
> 

I guess that got now already fixed by your commit that actually imports
File::Path[0], which provides mkpath() and auto-exports it.

https://github.com/Zorlin/pve-moosefs/commit/a1621cfba41c88414e1bdc8fd857fa341d62bbf2

cheers,
Thomas