[pve-devel] Custom storage plugins API

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Jan 18 12:04:52 CET 2017


On Wed, Jan 18, 2017 at 10:34:05AM +0100, Alexander Schmid wrote:
> Hello Dietmar,
> has someone found time to have a look at this ?

could you send changes as patch or patch series for the respective git
repository - qemu-server in this case I think? see [1] for a short
howto. this makes it easy to review changes using our standard workflows
and tools, and is a requirement for getting any non-trivial changes
merged anyway.

please include the rationale behind the change, and split unrelated
changes into separate commits. if your changes are of the "what do you
think of this?" rather than the "please merge this" kind, mark the patch
(series) as RFC instead of / in addition to PATCH.

> For finishing my SCST-Plugin it would be good to know if there will be a way
> to catch qemu-img convert from a custom implementation.
> Also, as my plugin activates snaps temporary via a clone of the snap and
> exposes this as an iscsi-target, it would be crucial that deactivate_volume
> is called for cleanup.
> 
> Really would love a way to clone from older Snapshots with ZFS over iSCSI
> but don't feel very comfortable with the situation that the storage-plugin
> needs patching other parts like QemuServer.pm

not sure if the above is part of the rationale for the changes you did,
or additional wishlist items? feel free to clarify, especially if you
think we missed something after you have received feedback on the
patches you resent in the format mentioned above.

> 
> Worst-case, i`d think about bundling the plugin in a .deb with dependencys
> and post-install triggers that do the patch to prevent breaking the storage
> with an PVE-Update. But this is really not what i want to do ...

that sounds like a very ugly hack ;) I think establishing what kind of
additional features / Storage API methods / .. would be needed so you
don't need to carry extra patches for qemu-server (and if possible
implementing them) is the way to go, and only if your proposed changes
are not possible within stock PVE should you resort to such workarounds.

> Guess some of the things how it allows to access older snapshots in ZFS
> might also be a nice addition to the zfsplugin in general.
> I think it should work with the bundled iscsi-targets, too.

see above - feel free to propose changes either as patches (if you have
them implemented already) or as rough drafts / ideas / proposal.

> Best regards,
> Alex

I hope this doesn't disencourage you - please keep in mind that we need
to care about all the use cases and side effects, and not just your
concrete setup. reviewing and iterating changes until they fit is part
of ensuring that PVE gets better over time, instead of worse - even if
it sometimes requires extra work both by contributors and reviewers.

1: http://pve.proxmox.com/wiki/Developer_Documentation#Preparing_Patches




More information about the pve-devel mailing list