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

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Aug 25 10:48:02 CEST 2017


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?

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.

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.

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?

pve-storage:

Fabian Grünbichler (2):
  rbd: add pveceph storage option
  rbd: allow modification of monhost option

 PVE/Storage/RBDPlugin.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

pve-manager:

Fabian Grünbichler (18):
  ceph: refactor mon info retrieval
  ceph: add /etc/pve/priv/ceph path
  ceph: add monhash to monhost string helper
  ceph: add add_storage helper
  ceph: add get_storages helper
  ceph: add update_storage helper
  ceph: add remove_storage helper
  ceph: implement addstorage API path
  pveceph: add addstorage CLI command
  ceph: implement lsstorages API path
  pveceph: add lsstorages CLI command
  ceph: implement removestorage API path
  pveceph: add removestorage CLI command
  ceph/createpool: shorten pool variable name
  ceph/createpool: optionally add storages
  ceph/destroypool: optionally remove storages
  ceph/destroypool: refactor to use get_storages
  ceph: update storages after create/destroymon

 PVE/API2/Ceph.pm   | 396 ++++++++++++++++++++++++++++++++++++++++++++++-------
 PVE/CLI/pveceph.pm |  22 +++
 PVE/CephTools.pm   |   2 +
 3 files changed, 370 insertions(+), 50 deletions(-)

-- 
2.11.0




More information about the pve-devel mailing list