From 434517313428578176bd206652d629d84c88c9f0 Mon Sep 17 00:00:00 2001 From: MosheFriedland Date: Mon, 4 Sep 2023 20:14:15 +0300 Subject: [PATCH 1/2] aws: provider: add new `ec2_retries_value` config option --- cloudbridge/providers/aws/provider.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cloudbridge/providers/aws/provider.py b/cloudbridge/providers/aws/provider.py index ea14f705..f369e41f 100644 --- a/cloudbridge/providers/aws/provider.py +++ b/cloudbridge/providers/aws/provider.py @@ -41,7 +41,11 @@ def __init__(self, config): self.ec2_cfg = { 'use_ssl': self._get_config_value('ec2_is_secure', True), 'verify': self._get_config_value('ec2_validate_certs', True), - 'endpoint_url': self._get_config_value('ec2_endpoint_url') + 'endpoint_url': self._get_config_value('ec2_endpoint_url'), + 'config': Config( + retries={ + 'max_attempts': self._get_config_value('ec2_retries_value', 4), + 'mode': 'standard'}) } self.s3_cfg = { 'use_ssl': self._get_config_value('s3_is_secure', True), From 0079c7f132b86d86e00e77de07405cebf8806172 Mon Sep 17 00:00:00 2001 From: MosheFriedland Date: Mon, 4 Sep 2023 20:14:45 +0300 Subject: [PATCH 2/2] docs: topics: setup: document new `ec2_retries_value` option --- docs/topics/setup.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/topics/setup.rst b/docs/topics/setup.rst index 041babac..04c473c7 100644 --- a/docs/topics/setup.rst +++ b/docs/topics/setup.rst @@ -106,6 +106,9 @@ AWS | ec2_validate_certs | Whether to use SSL certificate verification. Default is | | | ``False``. | +---------------------+--------------------------------------------------------------+ +| ec2_retries_value | The number of retries to configure boto ec2 client with | +| | Default is ``4``. | ++---------------------+--------------------------------------------------------------+ | s3_endpoint_url | Host connection endpoint. Default is ``s3.amazonaws.com``. | +---------------------+--------------------------------------------------------------+ | s3_is_secure | True to use an SSL connection. Default is ``True``. |