[pve-devel] [RFC storage/manager 00/20] pveceph storage.cfg management

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Aug 25 13:12:25 CEST 2017


On 08/25/2017 10:48 AM, Fabian Gr├╝nbichler wrote:
> this patch series implements storage.cfg management for pveceph-managed ceph
> clusters. the following is implemented:
> 
> - add new 'pveceph' flag to RBD storages
> - pveceph addstorage/lsstorages/removestorage to add/list/remove storage entries, per pool
> - optionally adding/removing storages when creating/destroying a pool
> - updating managed storage entries when creating/destroying a monitor
> 
> I am not 100% content with the API structure, which is the primary reason for
> RFCing: currently the storage related API paths are located under
> '/nodes/<node>/ceph/pool/<pool>/storage[/<storage>]'. it might be more flexible
> regarding future changes to give them their own 'first-class' API endpoint like
> '/nodes/<node>/ceph/storage[/<storage>]', and make <pool> a parameter?

+1

> 
> that would allow stuff like listing all pveceph-managed storages at once. on
> the other hand, 'pveceph addstorage <storage> -pool <pool>' is less natural
> than 'pveceph addstorage <pool> <storage>' IMHO.
> 

You could still achieve the desired CLI command with the api change,
the $arg_param array (RESTHandler::usage_str), which defines the ordered
parameters can be any parameter in any order of the API calls schema,
it must no be a path placeholder.

> I was also thinking about renaming the API placeholder <name> to <pool_name> or
> <pool> if we keep the current API schema, because with two placeholders/name
> parameters it is better to be explicit.
> 

<pool> would be OK with the now taken API path and the 'first-class' API endpoint,
IMO, so maybe I'd take that one.

> furthermore, the whole PVE/API2/Ceph.pm is long overdue for a refactoring into
> individual API modules and paths IMHO. I wonder whether it would be okay to
> break backwards compatibility here since PVE 5.x does not (yet) have stable
> pveceph support?
> 

Refactoring/splitting out would be great. I'm bit unsure about API (path) changes,
but yes it is not marked as stable, so either now or with PVE 6.




More information about the pve-devel mailing list