[pbs-devel] [PATCH proxmox-backup 0/5] maintenance mode for datastore

Dominik Csapak d.csapak at proxmox.com
Fri Oct 1 10:18:01 CEST 2021

high level comment here, rest in the individual patches following

i like the idea, but i find some things a bit clunky:

* what gets saved is the maintenance mode (which is okay) but the
interface to check it is confusing since the user has to give the mode
that is *not* enough. IMHO it would be better if the check would require
the least mode it requires instead. this could either be a "none" (or
"writable") mode of the enum, or making the parameter an Option where
None represents needing write access.

* the check requiring an addition call to the storage seems like a thing
one can easily forget. instead we could make our intent clear on the
lookup part, which could do the check for us. if we then need elevated
access, we can still have the check function. this way we cannot even
request a datastore if its in offline mode anywhere in the code.

i know this would require more code changes possibly, but i think
this would provide a safer interface for this feature

More information about the pbs-devel mailing list