[pbs-devel] [PATCH proxmox-backup 5/5] api: include store in invalid owner errors

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Nov 12 11:30:34 CET 2020


since a group might exist in plenty stores

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 src/api2/admin/datastore.rs | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs
index 6d9de4e4..872d081e 100644
--- a/src/api2/admin/datastore.rs
+++ b/src/api2/admin/datastore.rs
@@ -168,7 +168,10 @@ fn list_groups(
             let owner = match datastore.get_owner(&group) {
                 Ok(auth_id) => auth_id,
                 Err(err) => {
-                    println!("Failed to get owner of group '{}' - {}", group, err);
+                    eprintln!("Failed to get owner of group '{}/{}' - {}",
+                             &store,
+                             group,
+                             err);
                     return group_info;
                 },
             };
@@ -481,7 +484,10 @@ fn get_snapshots_count(store: &DataStore, filter_owner: Option<&Authid>) -> Resu
             let owner = match store.get_owner(&group) {
                 Ok(owner) => owner,
                 Err(err) => {
-                    eprintln!("Failed to get owner of group '{}' - {}", group, err);
+                    eprintln!("Failed to get owner of group '{}/{}' - {}",
+                              store.name(),
+                              group,
+                              err);
                     return false;
                 },
             };
-- 
2.20.1






More information about the pbs-devel mailing list