[pbs-devel] [RFC proxmox-backup 0/8] implement sanity check jobs

Christian Ebner c.ebner at proxmox.com
Wed Dec 13 16:38:11 CET 2023


This series of patches implements the logic to run regular sanity
check job, with the intention to check various states of e.g.
datastores, verification states of backups, possibly missing jobs
for datastores, uncovered namespace, load metrics exceeding some
threshold values, ecc. and allow to send a user notification on
success or error state, in an automated fashion.

Currently, only a datastore usage check is implemented as prove of
concept.

The intenition of this patch series is to get some feedback on the
implementation approach and find possible shortcommings in design
decisions.

Christian Ebner (8):
  api-types: jobs: add sanity checks job types
  config: implement sanity check job configuration
  api: config: sanity check jobs api endpoints
  server: add sanity check job email notifications
  server: implement sanity check job
  api: admin: add sanity check job api endpoints
  manager: add sanity check jobs management cli commands
  proxy: add sanity check task to scheduler

 pbs-api-types/src/jobs.rs                     | 106 +++++++
 pbs-config/src/lib.rs                         |   1 +
 pbs-config/src/sanity_check.rs                |  57 ++++
 src/api2/admin/mod.rs                         |   2 +
 src/api2/admin/sanity_check.rs                | 111 +++++++
 src/api2/config/mod.rs                        |   2 +
 src/api2/config/sanity_check.rs               | 296 ++++++++++++++++++
 src/bin/proxmox-backup-manager.rs             |   3 +-
 src/bin/proxmox-backup-proxy.rs               |  41 ++-
 src/bin/proxmox_backup_manager/mod.rs         |   2 +
 .../proxmox_backup_manager/sanity_check.rs    | 126 ++++++++
 src/server/email_notifications.rs             |  78 +++++
 src/server/mod.rs                             |   3 +
 src/server/sanity_check_job.rs                | 131 ++++++++
 14 files changed, 957 insertions(+), 2 deletions(-)
 create mode 100644 pbs-config/src/sanity_check.rs
 create mode 100644 src/api2/admin/sanity_check.rs
 create mode 100644 src/api2/config/sanity_check.rs
 create mode 100644 src/bin/proxmox_backup_manager/sanity_check.rs
 create mode 100644 src/server/sanity_check_job.rs

-- 
2.39.2





More information about the pbs-devel mailing list