public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/2] api: tape/restore: skip snapshot if owner check failed
Date: Mon,  9 May 2022 12:41:19 +0200	[thread overview]
Message-ID: <20220509104119.1953106-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20220509104119.1953106-1-d.csapak@proxmox.com>

instead of aborting the whole restore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/api2/tape/restore.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/api2/tape/restore.rs b/src/api2/tape/restore.rs
index f24ae23c..a7ed119a 100644
--- a/src/api2/tape/restore.rs
+++ b/src/api2/tape/restore.rs
@@ -433,12 +433,14 @@ fn restore_list_worker(
                 datastore.create_locked_backup_group(backup_dir.as_ref(), restore_owner)?;
             if restore_owner != &owner {
                 // only the owner is allowed to create additional snapshots
-                bail!(
+                task_warn!(
+                    worker,
                     "restore '{}' failed - owner check failed ({} != {})",
                     snapshot,
                     restore_owner,
                     owner
                 );
+                continue;
             }
 
             let (media_id, file_num) = if let Some((media_uuid, file_num)) =
-- 
2.30.2





  reply	other threads:[~2022-05-09 10:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 10:41 [pbs-devel] [PATCH proxmox-backup 1/2] api: tape/restore: fix wrong datastore locking Dominik Csapak
2022-05-09 10:41 ` Dominik Csapak [this message]
2022-05-09 11:57 ` [pbs-devel] applied-series: " 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=20220509104119.1953106-2-d.csapak@proxmox.com \
    --to=d.csapak@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