From d01a35cadda98dcfe62dee31ee01a10f804b81cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 8 Oct 2020 16:20:00 +0200 Subject: [PATCH] ceph: reduce s3 max retry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When rgw is not responding the aws-sdk retries using exponential backoff. Having 20 retries means we would wait for a while (hours) to eventually fail. This is a problem as we cannot reflect the status of the bucket properly. Now we use 5 max retries which means around 8 seconds. Signed-off-by: Sébastien Han --- pkg/operator/ceph/object/s3-handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/operator/ceph/object/s3-handlers.go b/pkg/operator/ceph/object/s3-handlers.go index d4ebd037f..0452843c5 100644 --- a/pkg/operator/ceph/object/s3-handlers.go +++ b/pkg/operator/ceph/object/s3-handlers.go @@ -48,7 +48,7 @@ func NewS3Agent(accessKey, secretKey, endpoint string, debug bool) (*S3Agent, er WithCredentials(credentials.NewStaticCredentials(accessKey, secretKey, "")). WithEndpoint(endpoint). WithS3ForcePathStyle(true). - WithMaxRetries(20). + WithMaxRetries(5). WithDisableSSL(true). WithHTTPClient(&http.Client{ Timeout: time.Second * 15,