public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup/pve-container 0/5] improve error handling of pxar extractor
@ 2023-06-07 16:34 Max Carrara
  2023-06-07 16:34 ` [pbs-devel] [PATCH proxmox-backup 1/5] pbs-client: pxar: preserve error context Max Carrara
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Max Carrara @ 2023-06-07 16:34 UTC (permalink / raw)
  To: pbs-devel

The goal of this series is to improve how errors occurring during
the extraction of pxar archives are propagated and handled.

This is mainly done through leveraging the `anyhow::Context` trait [0],
which makes it possible to provide and propagate context-dependent error
information (hence its name), while simultaneously preserving the
original error that caused an execution path to fail in the first place.

Furthermore, the existing error handler and its related mechanisms
are now also used during the overall process of extraction.
Together with the introduction of a new type of context variable,
errors that happen during the extraction can now be handled for each
type of entry individually (if desired).

This is demonstrated by adding a new flag to the `proxmox-backup-client`
CLI tool, which appends a handler that ignores errors which occur
during the extraction of a device node. This also fixes #3460. [1] 

[0]: https://docs.rs/anyhow/latest/anyhow/trait.Context.html
[1]: https://bugzilla.proxmox.com/show_bug.cgi?id=3460


proxmox-backup:

Max Carrara (4):
  pbs-client: pxar: preserve error context
  pbs-client: pxar: refactor body of `extract_archive` to
    `ExtractorIter`
  pbs-client: pxar: add `PxarExtractContext`
  proxmox-backup-client: restore: add 'ignore-extract-device-errors'
    flag

 pbs-client/src/pxar/create.rs     |  22 +-
 pbs-client/src/pxar/dir_stack.rs  |   8 +-
 pbs-client/src/pxar/extract.rs    | 573 +++++++++++++++++++++---------
 pbs-client/src/pxar/metadata.rs   |  44 +--
 pbs-client/src/pxar/mod.rs        |   2 +-
 pbs-client/src/pxar/tools.rs      |  13 +-
 proxmox-backup-client/src/main.rs |  61 +++-
 7 files changed, 505 insertions(+), 218 deletions(-)


pve-container:

Max Carrara (1):
  fix #3460: restore: honor '--ignore-unpack-errors' flag for pbs

 src/PVE/LXC/Create.pm | 4 ++++
 1 file changed, 4 insertions(+)
-- 
2.30.2





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-11 14:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-07 16:34 [pbs-devel] [PATCH proxmox-backup/pve-container 0/5] improve error handling of pxar extractor Max Carrara
2023-06-07 16:34 ` [pbs-devel] [PATCH proxmox-backup 1/5] pbs-client: pxar: preserve error context Max Carrara
2023-07-11 12:54   ` Wolfgang Bumiller
2023-06-07 16:34 ` [pbs-devel] [PATCH proxmox-backup 2/5] pbs-client: pxar: refactor body of `extract_archive` to `ExtractorIter` Max Carrara
2023-07-11 13:24   ` Wolfgang Bumiller
2023-06-07 16:34 ` [pbs-devel] [PATCH proxmox-backup 3/5] pbs-client: pxar: add `PxarExtractContext` Max Carrara
2023-06-07 16:34 ` [pbs-devel] [PATCH proxmox-backup 4/5] proxmox-backup-client: restore: add 'ignore-extract-device-errors' flag Max Carrara
2023-07-11 14:17   ` Wolfgang Bumiller
2023-06-07 16:34 ` [pbs-devel] [PATCH pve-container 5/5] fix #3460: restore: honor '--ignore-unpack-errors' flag for pbs Max Carrara
2023-06-08 13:47   ` Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal