all lists on 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] proxy: reduce log level for api_service() errors to log
Date: Fri,  8 Aug 2025 09:23:56 +0200	[thread overview]
Message-ID: <20250808072356.90478-1-c.ebner@proxmox.com> (raw)

Since commit 9cf80dc6 ("proxy: avoid exiting connection acceptor loop
in error case") errors occurring during REST server's api_service
calls are logged as warning. The chosen warning log level is however
a bit to eager, as errors are now logged to the systemd journal as
well. This is not an issue per-se and can help debug connection
issues. However, most health check tools such as e.g. HAProxy's
backend health check periodically establish a connection and simply
disconnect if successful, therefore spamming the journal with the
following log lines:
```
...
Failed to get api service: Transport endpoint is not connected (os error 107)
Failed to get api service: Transport endpoint is not connected (os error 107)
...
```

Therefore, lower the log level to debug which nevertheless allows to
inspect possible errors when invoking the proxy with the respective
log level, but does not spam the systemd journal by default.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 src/bin/proxmox-backup-proxy.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs
index cfd93f928..edd4871b8 100644
--- a/src/bin/proxmox-backup-proxy.rs
+++ b/src/bin/proxmox-backup-proxy.rs
@@ -313,7 +313,7 @@ async fn run() -> Result<(), Error> {
                                                     api_service.serve(conn, Some(watcher)).await
                                                 });
                                             }
-                                            Err(err) => log::warn!("Failed to get api service: {err:?}"),
+                                            Err(err) => log::debug!("Failed to get api service: {err:?}"),
                                         }
                                     },
                                     Err(err) => { log::warn!("Failed to accept secure connection: {err:?}"); }
-- 
2.47.2



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


                 reply	other threads:[~2025-08-08  7:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250808072356.90478-1-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal