public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] verify: silence incorrect backend error message for filesystem stores
@ 2025-09-24  8:14 Christian Ebner
  0 siblings, 0 replies; only message in thread
From: Christian Ebner @ 2025-09-24  8:14 UTC (permalink / raw)
  To: pbs-devel

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-24  8:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-24  8:14 [pbs-devel] [PATCH proxmox-backup] verify: silence incorrect backend error message for filesystem stores Christian Ebner

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