public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Max Carrara <m.carrara@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup/pve-container 0/5] improve error handling of pxar extractor
Date: Wed,  7 Jun 2023 18:34:23 +0200	[thread overview]
Message-ID: <20230607163428.1154123-1-m.carrara@proxmox.com> (raw)

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





             reply	other threads:[~2023-06-07 16:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 16:34 Max Carrara [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230607163428.1154123-1-m.carrara@proxmox.com \
    --to=m.carrara@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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