[pbs-devel] [PATCH v4 proxmox-backup 0/5] handle reader client disconnects
Christian Ebner
c.ebner at proxmox.com
Wed Apr 9 15:25:54 CEST 2025
On 4/9/25 14:53, Fiona Ebner wrote:
> Am 08.04.25 um 14:58 schrieb Christian Ebner:
>> These patches attempt to improve the server side error handling for
>> backukp reader client disconnects.
>>
>> During regular operation, the server currently cannot distinguish a
>> disconnect because of error from a disconnect because of finished
>> operation. This leaves behind a task in failed state, which is
>> unexpected and might cause confusion [0].
>>
>> To improve error handling, follow the approach taken for the backup
>> writer tasks, letting the client signal it has successfully finished
>> via an api call and catch the disconnect error for that case.
>>
>> The signaling of messages/warnings in case of client side aborts
>> triggered by the user as suggested by Fabian has not been
>> implemented, as that is currently not transparently handled by the
>> client (only handled by BackupReader's Drop impl), therefore seemed
>> out of scope for this patch series.
>>
>> changes since version 3:
>> - rebased onto current master
>>
>> Reported in the community forum:
>> [0] https://forum.proxmox.com/threads/158306/
>>
>
> While I wasn't able to reproduce the exact issue as reported in the
> forum thread I was able to run into a slightly different one by issuing
> the following two commands
>
> proxmox-backup-client backup --repository 10.10.100.180:bigone
> ex.pxar:example
> proxmox-backup-client backup --repository 10.10.100.180:bigone
> ex.pxar:example --change-detection-mode metadata
>
> resulting in a backup reader task that had to read no chunks (and that
> was the correct timing for me to trigger the race I guess):
>
>> 2025-04-09T14:36:21+02:00: starting new backup reader datastore 'bigone': "/mnt/datastore/bigone"
>> 2025-04-09T14:36:21+02:00: protocol upgrade done
>> 2025-04-09T14:36:21+02:00: TASK ERROR: connection error: connection reset: connection reset
>
> While testing that the refactor for "proxmox-backup-debug diff" did not
> mess anything up I ran into a completely different issue, namely, that
> it doesn't work for split archives:
>
>> root at pbs1:~# proxmox-backup-debug diff archive ct/131/2025-02-11T12:40:25Z ct/131/2025-04-09T11:29:09Z root.pxar --repository localhost:bigone
>> Error: Unable to open dynamic index "/mnt/datastore/bigone/ct/131/2025-04-09T11:29:09Z/root.pxar.didx" - No such file or directory (os error 2)
>> root at pbs1:~# ls /mnt/datastore/bigone/ct/131/2025-04-09T11:29:09Z
>> client.log.blob index.json.blob pct.conf.blob root.mpxar.didx root.ppxar.didx
Hmm, okay will open an issue for this, as this will require bigger changes.
>
>
> Another issue I found is that using a patched client but unpatched
> server will result in a client error:
>
>> Error: Path '/finish' not found.
>
> and non-zero exit code. Can the client check whether the server supports
> the new endpoint and handle this gracefully?
Yeah, good point! I will see how to fix this, should be able to extract
the information I need from the version endpoint.
More information about the pbs-devel
mailing list