public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 0/5] maintenance mode for datastore
Date: Tue, 28 Sep 2021 12:05:43 +0200	[thread overview]
Message-ID: <20210928100548.4873-1-h.laimer@proxmox.com> (raw)

Adds a maintenance mode for datatsores. If a datastore is in maintenance
mode it has a maintenance-type and a maintenance-msg.
The type specifies what is still allowed on the ds and what is not.
Currently there are two types: read only and offline. 'read only' prevents
everything that would write something to the ds, but allows to read from
it. 'offline' prevents everything on the datastore, neither operation
that write nor operations that read form the datastore are allowed.
The message is optional and is a short string that describes the reason
for the maintenance, it is shown whenever an operation is prevented due
to the maintenance.

Here 'read only' is less restrictive than 'offline'. In order to check
if some operation is allowed in the current maintenance mode a function
has to be called before every operation that would be effected by a
maintenance. This function recieves an upper bound for
'restrictiveness', so if we want to get the list of available snapshots
we have to read from the ds, everything that is less
restrictive than 'offline' is fine. Here that means maintenance has to
either be off or 'read only'.

Already running jobs and operations are not affected. Neither are the
modification or creation of jobs, since they just modify a config file
that is stored on the host system.

(It might make sense to add a possibility to shut down running jobs when
maintenance is turned on.)

Hannes Laimer (5):
  pbs-api-types: add maintenance type and msg to ds config
  pbs-datastore: add check_maintenence function
  api2: make maintenance type and msg updatable/deletable
  jobs/api2: add checks for maintenance
  ui: add maintenance to datastore options

 pbs-api-types/src/datastore.rs   | 33 +++++++++++++++++
 pbs-datastore/src/datastore.rs   | 18 ++++++++-
 src/api2/admin/datastore.rs      | 48 +++++++++++++++++++++---
 src/api2/config/datastore.rs     |  8 ++++
 src/api2/pull.rs                 |  5 ++-
 src/server/gc_job.rs             |  5 ++-
 src/server/prune_job.rs          |  4 +-
 src/server/verify_job.rs         |  5 ++-
 www/Makefile                     |  1 +
 www/datastore/OptionView.js      | 10 +++++
 www/window/MaintenanceOptions.js | 63 ++++++++++++++++++++++++++++++++
 11 files changed, 188 insertions(+), 12 deletions(-)
 create mode 100644 www/window/MaintenanceOptions.js

-- 
2.30.2





             reply	other threads:[~2021-09-28 10:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 10:05 Hannes Laimer [this message]
2021-09-28 10:05 ` [pbs-devel] [PATCH proxmox-backup 1/5] pbs-api-types: add maintenance type and msg to ds config Hannes Laimer
2021-10-01  8:23   ` Dominik Csapak
2021-10-01 12:00     ` Wolfgang Bumiller
2021-09-28 10:05 ` [pbs-devel] [PATCH proxmox-backup 2/5] pbs-datastore: add check_maintenence function Hannes Laimer
2021-10-01 12:06   ` Wolfgang Bumiller
2021-09-28 10:05 ` [pbs-devel] [PATCH proxmox-backup 3/5] api2: make maintenance type and msg updatable/deletable Hannes Laimer
2021-09-28 10:05 ` [pbs-devel] [PATCH proxmox-backup 4/5] jobs/api2: add checks for maintenance Hannes Laimer
2021-10-01  8:28   ` Dominik Csapak
2021-09-28 10:05 ` [pbs-devel] [PATCH proxmox-backup 5/5] ui: add maintenance to datastore options Hannes Laimer
2021-10-01  8:36   ` Dominik Csapak
2021-10-01  8:18 ` [pbs-devel] [PATCH proxmox-backup 0/5] maintenance mode for datastore Dominik Csapak
2021-10-01  9:36 ` Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210928100548.4873-1-h.laimer@proxmox.com \
    --to=h.laimer@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal