[pve-devel] [PATCH cluster/storage/manager] refactor ceph code

Dominik Csapak d.csapak at proxmox.com
Wed Dec 19 11:24:36 CET 2018


The aim of this series is to improve the perl package division of our
ceph related code, and to prepare it for use of proper locks.

We want to use cfs_read/write/lock_file for the ceph.conf but for dependency
reasons this cannot be in pve-manager and at least below pve-storage.

For this we first have to add ceph.conf to the observed files of pmxcfs.

The last and biggest part of this series is the moving of the code
of the various ceph services/parts ot its own module, namely
cephosd to ceph/osd and the mon/mgr related code to ceph/mon and ceph/mgr

Also I split CephTools into Ceph::Tools and Ceph::Services.

Package dependency is left as an exercise for the reader.

pve-cluster:

Dominik Csapak (2):
  add ceph.conf to observed files
  add explaining comment for observed files

 data/PVE/Cluster.pm | 4 ++++
 data/src/status.c   | 1 +
 2 files changed, 5 insertions(+)

pve-storage:

Dominik Csapak (2):
  move Storage/CephTools to CephConfig
  register ceph.conf parser/writer

 PVE/{Storage/CephTools.pm => CephConfig.pm} | 62 +++++++++++++++++++++++++----
 PVE/Makefile                                |  1 +
 PVE/Storage/CephFSPlugin.pm                 | 14 +++----
 PVE/Storage/Makefile                        |  2 +-
 PVE/Storage/RBDPlugin.pm                    | 14 +++----
 5 files changed, 71 insertions(+), 22 deletions(-)
 rename PVE/{Storage/CephTools.pm => CephConfig.pm} (81%)

pve-manager:

Dominik Csapak (7):
  ceph: use cfs_read/write_file for ceph.conf
  ceph: move CephTools into Ceph/Tools.pm
  ceph: move service_cmd and MDS related code to Services.pm
  ceph: move API2::CephOSD to API2::Ceph::OSD
  ceph: move mgr create/destroy to Ceph::Services
  ceph: move MGR API calls to API2/Ceph/MGR.pm
  ceph: move Monitor API calls to API2/Ceph/MON.pm

 PVE/API2/Ceph.pm       | 1109 +++---------------------------------------------
 PVE/API2/Ceph/FS.pm    |   21 +-
 PVE/API2/Ceph/MDS.pm   |   36 +-
 PVE/API2/Ceph/MGR.pm   |  104 +++++
 PVE/API2/Ceph/MON.pm   |  369 ++++++++++++++++
 PVE/API2/Ceph/Makefile |    3 +
 PVE/API2/Ceph/OSD.pm   |  532 +++++++++++++++++++++++
 PVE/CLI/pveceph.pm     |   21 +-
 PVE/Ceph/Makefile      |   16 +
 PVE/Ceph/Services.pm   |  251 +++++++++++
 PVE/Ceph/Tools.pm      |  243 +++++++++++
 PVE/CephTools.pm       |  485 ---------------------
 PVE/Makefile           |    3 +-
 13 files changed, 1615 insertions(+), 1578 deletions(-)
 create mode 100644 PVE/API2/Ceph/MGR.pm
 create mode 100644 PVE/API2/Ceph/MON.pm
 create mode 100644 PVE/API2/Ceph/OSD.pm
 create mode 100644 PVE/Ceph/Makefile
 create mode 100644 PVE/Ceph/Services.pm
 create mode 100644 PVE/Ceph/Tools.pm
 delete mode 100644 PVE/CephTools.pm

-- 
2.11.0





More information about the pve-devel mailing list