all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox 3/3] fix #6858: s3-client: retry request on 500 and 503 response status
Date: Tue, 24 Feb 2026 13:05:23 +0100	[thread overview]
Message-ID: <1771934648.hk9upfhes9.astroid@yuna.none> (raw)
In-Reply-To: <20260123145835.625914-4-c.ebner@proxmox.com>

On January 23, 2026 3:58 pm, Christian Ebner wrote:
> Follow the best practices for AWS S3 error handling [0] and perform
> retries on requests with http status code 500 or 503 in the response.
> 
> This is done for all requests unconditionally, maximum number of
> retires and optional request timeout being honored.
> 
> [0] https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorBestPractices.html
> 
> Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=6858
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
>  proxmox-s3-client/src/client.rs | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/proxmox-s3-client/src/client.rs b/proxmox-s3-client/src/client.rs
> index f3e5eb45..f8cae7da 100644
> --- a/proxmox-s3-client/src/client.rs
> +++ b/proxmox-s3-client/src/client.rs
> @@ -389,7 +389,14 @@ impl S3Client {
>              };
>  
>              match response {
> -                Ok(response) => return Ok(response),
> +                Ok(response) => match response.status() {
> +                    StatusCode::INTERNAL_SERVER_ERROR | StatusCode::SERVICE_UNAVAILABLE => {
> +                        if retry >= MAX_S3_HTTP_REQUEST_RETRY - 1 {
> +                            bail!("request failed exceeding retries");

it would be less of a change in behaviour and provide more context to
callers if we returned Ok(response) here, like before?

> +                        }
> +                    }
> +                    _ => return Ok(response),
> +                },
>                  Err(err) => {
>                      if retry >= MAX_S3_HTTP_REQUEST_RETRY - 1 {
>                          return Err(err.into());
> -- 
> 2.47.3
> 
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
> 
> 
> 




  reply	other threads:[~2026-02-24 12:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 14:58 [pbs-devel] [PATCH proxmox 0/3] fix #6858: implement retry logic for transient API errors Christian Ebner
2026-01-23 14:58 ` [pbs-devel] [PATCH proxmox 1/3] s3-client: early return when request timeout deadline reached Christian Ebner
2026-01-23 14:58 ` [pbs-devel] [PATCH proxmox 2/3] s3-client: move exponential backoff to after the response state check Christian Ebner
2026-01-23 14:58 ` [pbs-devel] [PATCH proxmox 3/3] fix #6858: s3-client: retry request on 500 and 503 response status Christian Ebner
2026-02-24 12:05   ` Fabian Grünbichler [this message]
2026-02-24 12:17     ` Christian Ebner
2026-02-24 13:51 ` superseded: [PATCH proxmox 0/3] fix #6858: implement retry logic for transient API errors Christian Ebner

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=1771934648.hk9upfhes9.astroid@yuna.none \
    --to=f.gruenbichler@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