[pbs-devel] [RFC PATCH v2 proxmox-backup{, -qemu}, pve-{qemu, manager}, qemu-server 0/7] fix #4289: Set protected flag on backup creation
Christoph Heiss
c.heiss at proxmox.com
Thu Jan 26 13:44:35 CET 2023
On Wed, Jan 25, 2023 at 05:00:03PM +0100, Thomas Lamprecht wrote:
> Am 25/01/2023 um 13:18 schrieb Christoph Heiss:
> > When a datastore has the "Verify New Snapshots" flag set and a backup
> > with the protected flag set is created (e.g. using `vzdump --protected 1
> > ..`), the job might fail in the final stages due to a locking race. The
> > "Verify New Snapshots" flag means that backups are immediately locked for
> > verification as soon as their transfer is finished and the `/finish`
> > endpoint is called.
> >
> > If vzdump then tries to set the `protected` flag on that backup, it can
> > fail due to being currently locked by the verification task.
>
> but the protection flag resides in the "unprotected" part of the manifest,
> and IMO it seems very odd that I cannot change a protection flag if verification
> is running, which can happen anytime not only on verify-new.
Hm, I did indeed not consider this case - this really seems a bit quirky
then after all.
>
> So why not adapt this that protection can be changed independent of verification,
> which would require zero client changes and make for a better UX in general -
> albeit it certainly needs some well thought out (lock) handling.
I will look into this, thanks for the hint! I tried messing with the
locking before, which wasn't all that fruitfully.
In any case, definitely seems like the right way for this now, plus it
would make things a lot cleaner. Did not know that the protection flag
was generally a "unprotected" part of the manifest, this of course
changes things.
More information about the pbs-devel
mailing list