public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] datastore: add additional context for get_owner parsing error
@ 2024-01-09 17:13 Christian Ebner
  2024-01-10  9:46 ` [pbs-devel] applied: " Wolfgang Bumiller
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Ebner @ 2024-01-09 17:13 UTC (permalink / raw)
  To: pbs-devel

By this it becomes clear that the error stems from a parsing error when
getting the backup group owner.

See also: https://forum.proxmox.com/threads/139482/

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 pbs-datastore/src/datastore.rs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
index 41c9f4f2..a78f44aa 100644
--- a/pbs-datastore/src/datastore.rs
+++ b/pbs-datastore/src/datastore.rs
@@ -602,7 +602,12 @@ impl DataStore {
     ) -> Result<Authid, Error> {
         let full_path = self.owner_path(ns, backup_group);
         let owner = proxmox_sys::fs::file_read_firstline(full_path)?;
-        owner.trim_end().parse() // remove trailing newline
+        owner
+            .trim_end() // remove trailing newline
+            .parse()
+            .map_err(|err| {
+                format_err!("parsing owner for {backup_group} failed: {err}")
+            })
     }
 
     pub fn owns_backup(
-- 
2.39.2





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

end of thread, other threads:[~2024-01-10  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-09 17:13 [pbs-devel] [PATCH proxmox-backup] datastore: add additional context for get_owner parsing error Christian Ebner
2024-01-10  9:46 ` [pbs-devel] applied: " Wolfgang Bumiller

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