public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] verify: silence incorrect backend error message for filesystem stores
Date: Wed, 24 Sep 2025 10:14:44 +0200	[thread overview]
Message-ID: <20250924081444.129412-1-c.ebner@proxmox.com> (raw)

An incomplete check leads to the error messages of the form
```
failed to get s3 backend while trying to rename bad chunk: 4e4a...
```
when renaming a corrupt chunk on datastores with filesystem backend.

Silence this message by correctly distinguishing the filesystem
backend and backend error case.

Fixes: https://forum.proxmox.com/threads/172579/
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 src/backup/verify.rs | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/backup/verify.rs b/src/backup/verify.rs
index b1452f267..f588f038c 100644
--- a/src/backup/verify.rs
+++ b/src/backup/verify.rs
@@ -90,7 +90,17 @@ impl VerifyWorker {
             }
         }
 
-        if let Ok(DatastoreBackend::S3(s3_client)) = datastore.backend() {
+        let backend = match datastore.backend() {
+            Ok(backend) => backend,
+            Err(err) => {
+                info!(
+                    "failed to get backend while trying to rename bad chunk: {digest_str} - {err}"
+                );
+                return;
+            }
+        };
+
+        if let DatastoreBackend::S3(s3_client) = backend {
             let suffix = format!(".{}.bad", counter);
             let target_key =
                 match pbs_datastore::s3::object_key_from_digest_with_suffix(digest, &suffix) {
@@ -122,8 +132,6 @@ impl VerifyWorker {
                 // after all.
                 return;
             }
-        } else {
-            info!("failed to get s3 backend while trying to rename bad chunk: {digest_str}");
         }
 
         match std::fs::rename(&path, &new_path) {
-- 
2.47.3



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


                 reply	other threads:[~2025-09-24  8:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250924081444.129412-1-c.ebner@proxmox.com \
    --to=c.ebner@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