public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup 0/5] maintenance mode for datastore
@ 2021-09-28 10:05 Hannes Laimer
  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
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Hannes Laimer @ 2021-09-28 10:05 UTC (permalink / raw)
  To: pbs-devel

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





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-10-01 12:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 10:05 [pbs-devel] [PATCH proxmox-backup 0/5] maintenance mode for datastore Hannes Laimer
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

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