[pve-devel] [PATCH storage] fix #4289: pbs: wait for backup verification to finish before updating volume attribute

Fiona Ebner f.ebner at proxmox.com
Tue Jan 10 14:06:31 CET 2023


Am 10.01.23 um 13:44 schrieb Christoph Heiss:
> On Tue, Jan 10, 2023 at 01:34:14PM +0100, Fiona Ebner wrote:
>> Am 10.01.23 um 12:11 schrieb Christoph Heiss:
>>> On Wed, Jan 04, 2023 at 11:50:38AM +0100, Fiona Ebner wrote:
>> Regarding the API, maybe it can be its own endpoint in the backup API
>> (alongside endpoints like 'blob' and 'finish')? As long as we protect
>> the backup before marking it as finished it should be good. Just an
>> idea, not sure if it would be better.
> After looking into it, my first though was maybe to add a (boolean)
> parameter to the `finish` endpoint.
> But creating a separate endpoint and calling that before `finish` sounds
> very reasonable as well.
> Any thoughts on what would be more idiomatic/reasonable?
> 

Having a parameter for 'finish' seems a bit cleaner to me. I'm sure the
PBS people will complain if they are not happy with it ;)

>>> And I guess I need to figure out a way how to detect whether the new
>>> parameter is supported or not?
>>
>> If there is no straightforward way to make that information available in
>> VZDump.pm, we could also just base the decision off of the PBS version.
> Thanks for the idea, that may be doable!
> 
>>
>> One way to decide if the current behavior should be used as a fallback
>> would be to check the protected status after finishing the backup. That
>> is slightly racy though, because something else could've already changed
>> the protection between finishing and the check.
> I'd base it off the decision from above - if the `proxmox-backup-client`
> version supports setting it directly, use that, otherwise simply fall
> back.
It's not just the client, but the server that needs to support it too.
To make sure that the client/QEMU/etc. support it, we can just have
pve-manager depend on a recent enough version. For the server, there is
a /version API endpoint we can query.





More information about the pve-devel mailing list