public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 4/4] server: push: various smaller improvements to error messages
Date: Thu, 21 Nov 2024 16:43:37 +0100	[thread overview]
Message-ID: <20241121154337.471425-5-c.ebner@proxmox.com> (raw)
In-Reply-To: <20241121154337.471425-1-c.ebner@proxmox.com>

Various smaller adaptions such as capitalization of the start of
sentences, expansion of abbreviations and shortening of to long
error messages.

To improve consistency with the rest of the error messages for the
sync job in push direction.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 src/server/push.rs | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/server/push.rs b/src/server/push.rs
index fe2e11220..7a4e21f37 100644
--- a/src/server/push.rs
+++ b/src/server/push.rs
@@ -129,7 +129,7 @@ impl PushParameters {
 
         // push assumes namespace support on the remote side, fail early if missing
         if api_version.major < 2 || (api_version.major == 2 && api_version.minor < 2) {
-            bail!("unsupported remote api version, minimum v2.2 required");
+            bail!("Unsupported remote api version, minimum v2.2 required");
         }
 
         let supports_prune_delete_stats = api_version.major > 3
@@ -408,7 +408,8 @@ pub(crate) async fn push_store(mut params: PushParameters) -> Result<SyncStats,
             }
             Err(err) => {
                 errors = true;
-                info!("Encountered errors while syncing namespace {source_namespace} - {err}");
+                info!("Encountered errors: {err}");
+                info!("Failed to sync {source_store_and_ns} into {target_store_and_ns}!");
             }
         }
     }
@@ -465,12 +466,12 @@ pub(crate) async fn push_store(mut params: PushParameters) -> Result<SyncStats,
         }
 
         if !params.target.supports_prune_delete_stats {
-            info!("Older api version on remote detected, delete stats might be incomplete");
+            info!("Older api version on remote detected, deletion statistics might be incomplete");
         }
     }
 
     if errors {
-        bail!("sync failed with some errors.");
+        bail!("Sync failed with some errors!");
     }
 
     Ok(stats)
@@ -502,7 +503,7 @@ pub(crate) async fn push_namespace(
         .collect();
 
     info!(
-        "found {filtered} groups to sync (out of {total} total)",
+        "Found {filtered} groups to sync (out of {total} total)",
         filtered = list.len()
     );
 
@@ -522,7 +523,7 @@ pub(crate) async fn push_namespace(
 
         if not_owned_target_groups.contains(&group) {
             warn!(
-                "group '{group}' not owned by remote user '{}' on target, skip",
+                "Group '{group}' not owned by remote user '{}' on target, aborting upload",
                 params.target.remote_user(),
             );
             continue;
@@ -692,7 +693,7 @@ pub(crate) async fn push_group(
         fetch_previous_manifest = true;
 
         progress.done_snapshots = pos as u64 + 1;
-        info!("percentage done: {progress}");
+        info!("Percentage done: {progress}");
 
         // stop on error
         let sync_stats = result?;
@@ -762,7 +763,8 @@ pub(crate) async fn push_snapshot(
         Ok((manifest, _raw_size)) => manifest,
         Err(err) => {
             // No manifest in snapshot or failed to read, warn and skip
-            log::warn!("failed to load manifest - {err}");
+            log::warn!("Encountered errors: {err}");
+            log::warn!("Failed to load manifest for '{snapshot}'!");
             return Ok(stats);
         }
     };
-- 
2.39.5



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


  parent reply	other threads:[~2024-11-21 15:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21 15:43 [pbs-devel] [PATCH proxmox-backup 0/4] improve push sync job log messages Christian Ebner
2024-11-21 15:43 ` [pbs-devel] [PATCH proxmox-backup 1/4] server: push: fix needless borrow clippy warning Christian Ebner
2024-11-21 15:43 ` [pbs-devel] [PATCH proxmox-backup 2/4] server: push: consistently use remote over target for error messages Christian Ebner
2024-11-21 15:43 ` [pbs-devel] [PATCH proxmox-backup 3/4] server: push: add error context to all target api calls Christian Ebner
2024-11-22  9:01   ` Fabian Grünbichler
2024-11-22 10:11     ` Christian Ebner
2024-11-21 15:43 ` Christian Ebner [this message]
2024-11-21 16:06 ` [pbs-devel] [PATCH proxmox-backup 0/4] improve push sync job log messages Gabriel Goller
2024-11-21 16:26   ` Christian Ebner
2024-11-21 17:04     ` Gabriel Goller
2024-11-21 19:32       ` Fabian Grünbichler
2024-11-22  8:41         ` Christian Ebner
2024-11-22 12:28   ` Christian Ebner
2024-11-22  9:04 ` [pbs-devel] partially-applied: " Fabian Grünbichler

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=20241121154337.471425-5-c.ebner@proxmox.com \
    --to=c.ebner@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 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