I am interacting with Oracle Cloud (OCI) using OCI CLI (Command Line Interface), but I dont know how to implement a retry strategy for making api calls. I know how to build a custom retry strategy using oci sdk for python. I am attaching the command reference for oci cli oci cli reference Please help
Asked
Active
Viewed 355 times
0
-
"I am attaching the command..." please try to include the command in your question directly rather than providing a link. This helps in proper readability. – Sanip Jan 03 '22 at 08:43
-
Hi @sanip I have asked the above question because I couldn't find any command in oci cli reference using which I can implement retry strategy and I need help with finding the retry strategy command in oci cli – ashishpm Jan 03 '22 at 09:04
-
CLI internally calls SDK that handles the retry strategy. What exact CLI command are you trying to use? Are you getting an error? – urawesome Jan 04 '22 at 20:56
-
@urawesome No I am not getting any error, I want to use CLI commands with custom retry strategy. Can I do that? – ashishpm Jan 05 '22 at 06:01
-
@ashishpm why do you want to use a custom retry strategy? what is the use case? – urawesome Jan 05 '22 at 23:41
-
@urawesome I have a user configured in OCI, when I try to use the oci cli command 'oci search resource structured-search' I am getting throttling issue probably bcoz this oci user is used simultaneously by multiple clients. So I wanted to use a custom retry strategy and set the sleep parameter accordingly – ashishpm Jan 06 '22 at 06:07
-
1Currently OCI CLI doesn't support custom retry. Have you tried SDK using DEFAULT_RETRY_STRATEGY vs Custom retry strategy? does default retry strategy in sdk is causing throttling issue? Can you confirm? https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/sdk_behaviors/retries.html – urawesome Jan 06 '22 at 18:21
-
@urawesome, in OCI CLI if we don't use the --no-retry argument then by default internally the code makes sdk commands with default retry strategy, so yes throttling issue happens with DEFAULT_RETRY_STRATEGY. Using sdk custom strategy when I increase the base sleep value then the problem is solved – ashishpm Jan 09 '22 at 08:23