[pbs-devel] [PATCH proxmox-backup 2/4] api2: DataStoreListItem add maintenance info
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Apr 19 13:19:27 CEST 2022
On April 15, 2022 9:28 am, Hannes Laimer wrote:
> Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
> ---
> pbs-api-types/src/datastore.rs | 5 +++++
> src/api2/admin/datastore.rs | 1 +
> 2 files changed, 6 insertions(+)
>
> diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
> index 01e2319a..0fc5622e 100644
> --- a/pbs-api-types/src/datastore.rs
> +++ b/pbs-api-types/src/datastore.rs
> @@ -330,6 +330,9 @@ impl DataStoreConfig {
> optional: true,
> schema: SINGLE_LINE_COMMENT_SCHEMA,
> },
> + maintenance: {
> + type: bool,
> + }
this breaks remote scanning (of old remotes on new systems) - in this
case annotating it with a (serde) default of false seems sensible (if
the field is missing, it can only be because the other side doesn't have
maintenance mode yet, so it can be treated as 'no maintenance mode'). in
other cases wrapping a newly introduced field in an Option<> might make
more sense.
in general when changing API things (including return value schema)
backwards-compatibility should be kept in mind, even though we don't
have clusters in PBS we do have:
- sync/pull/remote between different versions of PBS
- pbs-client accessing pbs-server with version mismatch
- qemu-lib accessing pbs-server with version mismatch
- third-party clients accessing pbs-server
none of that should break with regular upgrades unless there is a very
good reason.
More information about the pbs-devel
mailing list