From de6b0ea35acf1c23ac4e754ede21cf5ff9505be1 Mon Sep 17 00:00:00 2001 From: Christian Ebner Date: Tue, 9 Jan 2024 18:13:05 +0100 Subject: [PATCH] datastore: add additional context for get_owner parsing error 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 --- 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 { 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(