[pbs-devel] [PATCH proxmox-backup 0/5] maintenance mode for datastore
Hannes Laimer
h.laimer at proxmox.com
Tue Sep 28 12:05:43 CEST 2021
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
More information about the pbs-devel
mailing list