"retry_policy" supports only one "retry_on" condition
See original GitHub issueDescription Envoy allows to provide more than one “retry_on” condition in “retry_policy” i.e.
"retry_policy": {
"retry_on": "connect-failure,retriable-status-codes,refused-stream",
"num_retries": 2
}
However, using
"retry_on": "connect-failure,retriable-status-codes,refused-stream"
in Ambassador’s mapping config results in error in Ambassador retry policy configuration.
Steps to reproduce the behavior:
- Create mapping with specified “retry_policy” with more than one “retry_on” condition i.e.
apiVersion: ambassador/v1
kind: Mapping
name: {{ include "xxx.yyy.zzz .}}_mapping
prefix: /{{ include "ccc.vvv.bbb" .}}
service: https://{{ include "ccc.vvv.bbb" .}}.{{ .Release.Namespace }}.svc.cluster.local.:80
tls: upstream
retry_policy:
retry_on: "connect-failure,5xx,retriable-4xx,"
num_retries: 2
-
Apply mapping from above.
-
See error in Ambassador Diagnostic Overview -> ir.retrypolicy: Invalid retry policy specified: <IRRetryPolicy ir.retrypolicy>
Expected behavior Ambassador’s retry policy should be able to handle multiple values in “retry_on” to reflect Envoy retry capabilities.
Affected version Affected version -> Ambassador: 0.61.1
Additional context Method that validates “retry_on” value:
ambassador/ambassador/ir/irretrypolicy.py
def validate_retry_policy(self) -> bool:
retry_on = self.get('retry_on', None)
is_valid = False
if retry_on in [ '5xx', 'gateway-error', 'connect-failure', 'retriable-4xx', 'refused-stream', 'retriable-status-codes' ]:
return True
return is_valid
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:17 (5 by maintainers)
Top Results From Across the Web
"retry_policy" supports only one "retry_on" condition #1570
Steps to reproduce the behavior: Create mapping with specified "retry_policy" with more than one "retry_on" condition i.e. ... Apply mapping from ...
Read more >RetryPolicy (AWS SDK for Java - 1.12.367)
Parameters: retryCondition - Retry condition on whether a specific request and exception should be retried. If null value is specified, the SDK' default ......
Read more >net.jodah.failsafe.RetryPolicy java code examples
Copy constructor. withMaxRetries. Sets the max number of retries to perform when an execution attempt fails. -1 indicates no limit. Th. withBackoff ·...
Read more >Retry guidance for Azure services
The Azure Cosmos DB SDKs automatically retry on certain error conditions, and user applications are encouraged to have their own retry ...
Read more >failsafe-lib/failsafe
@sahihaimanish_twitter Failsafe will only perform one retry at a time for some ... On 1.1.0 I used to use RetryPolicy with retryOn with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, let me see how to get this in…
Can we reopen this? We would also like to be able to specify multiple retry_on values. In particular, is there any way to retry on just
502
and503
andconnect-failure
andrefused-stream
? i.e. I don’t want to retry on504
’s or500
’s