public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-backup 1/2] group: lock: use group path instead of debug for error message
@ 2026-04-28 11:02 Fabian Grünbichler
  2026-04-28 11:02 ` [PATCH proxmox-backup 2/2] group: lock: inline error instead of using context Fabian Grünbichler
  2026-04-28 13:45 ` applied: [PATCH proxmox-backup 1/2] group: lock: use group path instead of debug for error message Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2026-04-28 11:02 UTC (permalink / raw)
  To: pbs-devel

this changes the error from:

  Error: while creating locked backup group 'BackupGroup { store: "store", ns: BackupNamespace { inner: ["namespace"], len: 6 }, group: BackupGroup { ty: Host, id: "group" } }'

to

  Error: while creating locked backup group "/store/pbs/ns/namespace/host/group"'

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 pbs-datastore/src/datastore.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
index 292c56bff..6fbd18aa0 100644
--- a/pbs-datastore/src/datastore.rs
+++ b/pbs-datastore/src/datastore.rs
@@ -1826,7 +1826,7 @@ impl DataStore {
                 let _ = std::fs::remove_dir(&full_path);
             }
             BackupGroupOpError::Soft(err.context(format!(
-                "while {} locked backup group '{backup_group:?}'",
+                "while {} locked backup group {full_path:?}",
                 if created { "creating new" } else { "creating" },
             )))
         })?;
-- 
2.47.3





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

* [PATCH proxmox-backup 2/2] group: lock: inline error instead of using context
  2026-04-28 11:02 [PATCH proxmox-backup 1/2] group: lock: use group path instead of debug for error message Fabian Grünbichler
@ 2026-04-28 11:02 ` Fabian Grünbichler
  2026-04-28 13:45 ` applied: [PATCH proxmox-backup 1/2] group: lock: use group path instead of debug for error message Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2026-04-28 11:02 UTC (permalink / raw)
  To: pbs-devel

all the other errors here are constructed like this, and call sites do not log
the context yet, so the error is incomplete otherwise..

this changes the error for concurrent group/snapshot creation from:

  Error: while creating locked backup group "/store/pbs/ns/namespace/host/group"'

to:

  Error: unable to acquire backup group lock "/run/proxmox-backup/locks/store/namespace/host-group" while creating locked backup group "/store/pbs/ns/namespace/host/group"

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 pbs-datastore/src/datastore.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
index 6fbd18aa0..a94211f91 100644
--- a/pbs-datastore/src/datastore.rs
+++ b/pbs-datastore/src/datastore.rs
@@ -1825,10 +1825,10 @@ impl DataStore {
             if created {
                 let _ = std::fs::remove_dir(&full_path);
             }
-            BackupGroupOpError::Soft(err.context(format!(
-                "while {} locked backup group {full_path:?}",
+            BackupGroupOpError::Soft(format_err!(
+                "{err} while {} locked backup group {full_path:?}",
                 if created { "creating new" } else { "creating" },
-            )))
+            ))
         })?;
 
         if created {
-- 
2.47.3





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

* applied: [PATCH proxmox-backup 1/2] group: lock: use group path instead of debug for error message
  2026-04-28 11:02 [PATCH proxmox-backup 1/2] group: lock: use group path instead of debug for error message Fabian Grünbichler
  2026-04-28 11:02 ` [PATCH proxmox-backup 2/2] group: lock: inline error instead of using context Fabian Grünbichler
@ 2026-04-28 13:45 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2026-04-28 13:45 UTC (permalink / raw)
  To: pbs-devel, Fabian Grünbichler

On Tue, 28 Apr 2026 13:02:47 +0200, Fabian Grünbichler wrote:
> this changes the error from:
> 
>   Error: while creating locked backup group 'BackupGroup { store: "store", ns: BackupNamespace { inner: ["namespace"], len: 6 }, group: BackupGroup { ty: Host, id: "group" } }'
> 
> to
> 
>   Error: while creating locked backup group "/store/pbs/ns/namespace/host/group"'
> 
> [...]

Applied, thanks!

[1/2] group: lock: use group path instead of debug for error message
      commit: ce767a864dcd8c3b0859cf1c2a6f3ccd4bb9ead5
[2/2] group: lock: inline error instead of using context
      commit: 6a6e2d5829c2767e3c07fdef876d52fb14a30e55




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

end of thread, other threads:[~2026-04-28 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 11:02 [PATCH proxmox-backup 1/2] group: lock: use group path instead of debug for error message Fabian Grünbichler
2026-04-28 11:02 ` [PATCH proxmox-backup 2/2] group: lock: inline error instead of using context Fabian Grünbichler
2026-04-28 13:45 ` applied: [PATCH proxmox-backup 1/2] group: lock: use group path instead of debug for error message Thomas Lamprecht

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