From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [RFC PATCH datacenter-manager 1/4] server: connection: multi client: use correct client error for retrying
Date: Fri, 29 May 2026 15:30:17 +0200 [thread overview]
Message-ID: <20260529133026.3149896-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260529133026.3149896-1-d.csapak@proxmox.com>
Since commit
8e3b1f06 (client: split out Connect error and factor out error classification)
in the proxmox workspace, Connection errors are split out to it's own
type of `proxmox_client::Error`s. Since then, every connection error
was returned normally and not retried via other hosts from the remote
config.
Use the correct error type to only retry when the actual connection is
not working, not if the api or the server returns an issue.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
Not sure if just changing this is a good idea, or if we want to catch
both connect and client errors? tracking only connect errors seemed
the correct way to me here, but maybe someone has a different opinion.
server/src/connection.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/src/connection.rs b/server/src/connection.rs
index 93f173e6..28e4799f 100644
--- a/server/src/connection.rs
+++ b/server/src/connection.rs
@@ -744,7 +744,7 @@ macro_rules! try_request {
let request = client.$how($method.clone(), $path_and_query, params.as_ref());
match tokio::time::timeout($self.timeout, request).await {
- Ok(Err(proxmox_client::Error::Client(err))) => {
+ Ok(Err(proxmox_client::Error::Connect(err))) => {
last_err = Some(err);
}
Ok(result) => {
--
2.47.3
next prev parent reply other threads:[~2026-05-29 13:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 13:30 [PATCH datacenter-manager 0/4] implement back-off mechanism for Dominik Csapak
2026-05-29 13:30 ` Dominik Csapak [this message]
2026-05-29 23:25 ` [RFC PATCH datacenter-manager 1/4] server: connection: multi client: use correct client error for retrying Thomas Lamprecht
2026-05-29 13:30 ` [PATCH datacenter-manager 2/4] server: remote cache: prepare for back-off mechanism Dominik Csapak
2026-05-29 23:40 ` Thomas Lamprecht
2026-05-29 13:30 ` [PATCH datacenter-manager 3/4] server: connection: multi-client: use back-off state from remote cache Dominik Csapak
2026-05-29 13:30 ` [PATCH datacenter-manager 4/4] server: pbs client: rework to use the back-off mechanism " Dominik Csapak
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=20260529133026.3149896-2-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pdm-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.