all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox-backup 2/2] group: lock: inline error instead of using context
Date: Tue, 28 Apr 2026 13:02:48 +0200	[thread overview]
Message-ID: <20260428110259.766084-2-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20260428110259.766084-1-f.gruenbichler@proxmox.com>

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





  reply	other threads:[~2026-04-28 11:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-04-28 13:45 ` applied: " 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=20260428110259.766084-2-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@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 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