From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id B198D1FF168 for ; Tue, 26 Nov 2024 16:55:37 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 07C05691A; Tue, 26 Nov 2024 16:55:38 +0100 (CET) From: Gabriel Goller To: pbs-devel@lists.proxmox.com Date: Tue, 26 Nov 2024 16:55:00 +0100 Message-Id: <20241126155500.457797-1-g.goller@proxmox.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.037 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [pull.rs, push.rs] Subject: [pbs-devel] [PATCH proxmox-backup] log: adjust log level on sync job messages X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Some messages printed on a sync push job should have been logged in the syslog as well. These are clearly errors, so they should also be printed accordingly. Signed-off-by: Gabriel Goller --- src/server/pull.rs | 4 ++-- src/server/push.rs | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/server/pull.rs b/src/server/pull.rs index 9abb673aea00..8afeec46350a 100644 --- a/src/server/pull.rs +++ b/src/server/pull.rs @@ -8,7 +8,7 @@ use std::time::SystemTime; use anyhow::{bail, format_err, Error}; use proxmox_human_byte::HumanByte; -use tracing::info; +use tracing::{info, error}; use pbs_api_types::{ print_store_and_ns, ArchiveType, Authid, BackupArchiveName, BackupDir, BackupGroup, @@ -837,7 +837,7 @@ pub(crate) async fn pull_store(mut params: PullParameters) -> Result { errors = true; - info!( + error!( "Encountered errors while syncing namespace {} - {err}", &namespace, ); diff --git a/src/server/push.rs b/src/server/push.rs index 99757a3cc355..dcb238c06190 100644 --- a/src/server/push.rs +++ b/src/server/push.rs @@ -7,7 +7,7 @@ use anyhow::{bail, Context, Error}; use futures::stream::{self, StreamExt, TryStreamExt}; use tokio::sync::mpsc; use tokio_stream::wrappers::ReceiverStream; -use tracing::{info, warn}; +use tracing::{info, warn, error}; use pbs_api_types::{ print_store_and_ns, ApiVersion, ApiVersionInfo, ArchiveType, Authid, BackupArchiveName, @@ -429,8 +429,8 @@ pub(crate) async fn push_store(mut params: PushParameters) -> Result { errors = true; - info!("Encountered errors: {err:#}"); - info!("Failed to sync {source_store_and_ns} into {target_store_and_ns}!"); + error!("Encountered errors: {err:#}"); + error!("Failed to sync {source_store_and_ns} into {target_store_and_ns}!"); } } } @@ -478,8 +478,8 @@ pub(crate) async fn push_store(mut params: PushParameters) -> Result { - warn!("Encountered errors: {err:#}"); - warn!("Failed to remove vanished namespace {target_namespace} from remote!"); + error!("Encountered errors: {err:#}"); + error!("Failed to remove vanished namespace {target_namespace} from remote!"); continue; } } @@ -554,8 +554,8 @@ pub(crate) async fn push_namespace( match push_group(params, namespace, &group, &mut progress).await { Ok(sync_stats) => stats.add(sync_stats), Err(err) => { - warn!("Encountered errors: {err:#}"); - warn!("Failed to push group {group} to remote!"); + error!("Encountered errors: {err:#}"); + error!("Failed to push group {group} to remote!"); errors = true; } } @@ -587,8 +587,8 @@ pub(crate) async fn push_namespace( })); } Err(err) => { - warn!("Encountered errors: {err:#}"); - warn!("Failed to remove vanished group {target_group} from remote!"); + error!("Encountered errors: {err:#}"); + error!("Failed to remove vanished group {target_group} from remote!"); errors = true; continue; } @@ -748,8 +748,8 @@ pub(crate) async fn push_group( ); } Err(err) => { - warn!("Encountered errors: {err:#}"); - warn!( + error!("Encountered errors: {err:#}"); + error!( "Failed to remove vanished snapshot {name} from remote!", name = snapshot.backup ); @@ -793,8 +793,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!("Encountered errors: {err:#}"); - log::warn!("Failed to load manifest for '{snapshot}'!"); + error!("Encountered errors: {err:#}"); + error!("Failed to load manifest for '{snapshot}'!"); return Ok(stats); } }; @@ -816,7 +816,7 @@ pub(crate) async fn push_snapshot( if fetch_previous_manifest { match backup_writer.download_previous_manifest().await { Ok(manifest) => previous_manifest = Some(Arc::new(manifest)), - Err(err) => log::info!("Could not download previous manifest - {err}"), + Err(err) => info!("Could not download previous manifest - {err}"), } }; -- 2.39.5 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel