[pmg-devel] applied: [PATCH pmg-api v2 1/3] backup: pbs: prevent race in concurrent backups

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Mar 5 22:42:38 CET 2021


On 01.03.21 15:12, Stoiko Ivanov wrote:
> If two pbs backup-creation calls happen simultaneously, it is possible
> that the first removes the backup dir before the other is done
> creating or sending it to the pbs remote.
> 
> This patch takes the same route as non-PBS backups - creating a unique
> tempdir indexed by remote, PID and current time.
> 
> the tmp-dir now also needs to be removed in case of error while
> backing up. (before the next invocation would have wiped it).
> 
> Noticed while having 2 schedules to different PBS instances with the
> same interval and w/o random delay.
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
>  src/PMG/API2/PBS/Job.pm | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
>

applied, thanks!




More information about the pmg-devel mailing list