[pbs-devel] [RFC PATCH v2 proxmox-backup 1/7] api2: Introduce server features discovery mechanism

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jan 25 16:56:26 CET 2023


Am 25/01/2023 um 13:18 schrieb Christoph Heiss:
> This is vaguely based on the idea to introduce some sort of API
> compatibility mechansim, to detect whether e.g. a new API parameter is
> supported by the server or not. [0]
> 
> Essentially, a new `features` field is added to the `/version` endpoint,
> which is an array (of strings) of supported (backwards-incompatible)
> features by the server. Clients can retrieve this and act accordingly.
> Features are internally described as an enum, with kebab-case'd names
> for external consumption through the API.
> 
> Some inspriration was taken from how proxmox backup support in QEMU
> works, using `query-proxmox-support` command.
> 
> This is intended as a first proposal on how this mechanism could work.

you could also just check the version? that's already there, no need for
adding extra complexity.

tbh, I'd be fine without any such check, as new *client* needing newer
server is fine; one just does need to ensure that old clients still work
with new server.

If you want, you could catch the parameter exception in the PVE call
site, either adding a hint about "new server required" or falling back
there (albeit I'm not so liking that).

After all immediate protection of backups is only relevant for manual
trigerring that, not for the scheduled backup jobs, so it won't affect
existing PVE jobs anyway.





More information about the pbs-devel mailing list