[pbs-devel] [RFC proxmox-backup 05/24] server: pull: fix sync info message for root namespace

Christian Ebner c.ebner at proxmox.com
Mon Jul 15 12:15:43 CEST 2024


The root namespace is displayed as empty string when used in the
format string. Distinguish and explicitly write out the root namespace
in the sync info message shown in the sync jobs task log.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 src/server/pull.rs | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/server/pull.rs b/src/server/pull.rs
index e8b1d0013..823515e9a 100644
--- a/src/server/pull.rs
+++ b/src/server/pull.rs
@@ -1311,8 +1311,14 @@ pub(crate) async fn pull_store(mut params: PullParameters) -> Result<PullStats,
                 if params.max_depth != Some(0) {
                     groups += ns_progress.done_groups;
                     snapshots += ns_progress.done_snapshots;
+
+                    let ns = if namespace.is_root() {
+                        "root namespace".into()
+                    } else {
+                        format!("namespace {namespace}")
+                    };
                     info!(
-                        "Finished syncing namespace {namespace}, current progress: {groups} groups, {snapshots} snapshots"
+                        "Finished syncing {ns}, current progress: {groups} groups, {snapshots} snapshots"
                     );
                 }
             }
-- 
2.39.2





More information about the pbs-devel mailing list