all lists on 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
  2025-10-02 12:27 ` [pbs-devel] applied: " Fabian Grünbichler
  0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup] verify: silence incorrect backend error message for filesystem stores
  2025-09-24  8:14 [pbs-devel] [PATCH proxmox-backup] verify: silence incorrect backend error message for filesystem stores Christian Ebner
@ 2025-10-02 12:27 ` Fabian Grünbichler
  0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2025-10-02 12:27 UTC (permalink / raw)
  To: pbs-devel, Christian Ebner


On Wed, 24 Sep 2025 10:14:44 +0200, Christian Ebner wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] verify: silence incorrect backend error message for filesystem stores
      commit: 4021fed528e37da53a12a522da39ee3eb523b2b5

Best regards,
-- 
Fabian Grünbichler <f.gruenbichler@proxmox.com>


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

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

end of thread, other threads:[~2025-10-02 12:27 UTC | newest]

Thread overview: 2+ messages (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
2025-10-02 12:27 ` [pbs-devel] applied: " Fabian Grünbichler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal