#Hi , is there a way to control behavior of retry strategy in SDK? I

1 messages · Page 1 of 1 (latest)

weak orchid
#

Retry is defined in config.py at the root of the package and then fed into retry stratecy in the host connection.py. But we need to adjust retry values without having to manually package on each deployment.(at a minimum our customer wants to set RETRY_API_ON_ERROR to True. But also, possible RETRY_API_ATTEMPTS & RETRY_API_BACKOFF_FACTOR.)/

pliant notch
#

Hmm this is interesting... I tried to look into this and find any reference to 'retry' and was not able to, it appears there is no mention of RETRY anywhere in python client apis... Only in the documentation... This is how I searched for it: grep -rl RETRY /home/user/.local/lib/python3.10/site-packages/netapp_ontap

Edited: Discard all of the above, this was valid many versions ago, latest ontap_api contains all of the RETRY variables...

pliant notch
#

Another hmm after peeking into latest package sources, because unable to figure out 1)is RETRY_API_ON_ERROR actually doing something other than setting up LoggingRetry() and 2)way to set it outside of package config.py ... apologizes for not being helpful here...

nocturne pelican
#

Hey @pliant notch this is for one of my customer's. They're not able to use discord. If there's anyone else you can think of that we could reach out to to help with this please let me know. Thanks!

snow holly
#

Hi @nocturne pelican , I will look more into this tomorrow and give a response. If the customer is interested in reaching out directly to us (the netapp_ontap team), they can send an email here: ng-ontap-rest-python-lib@netapp.com

nocturne pelican
#

Thanks @snow holly will do!

weak orchid
#

Thanks @nocturne pelican for jumping in. Thanks @snow holly , please ler us know if you need any additional information .

snow holly
#

Hello,

I'm currently looking into this.
Did the user try to set RETRY_API_ON_ERROR or any of the other config by doing this?

import netapp_ontap.config
config.RETRY_API_ON_ERROR = True

If so, what was the result? These are global configurations that can be set or changed during runtime with hopefully no issues.
More info on config.py here: https://library.netapp.com/ecmdocs/ECMLP2886776/html/config.html

#

I'm not sure what was meant in the question by "without having to manually package on each deployment"
These variables can be changed without needing to repackage the library. I would appreciate some clarifications. Thanks!

weak orchid
#

Hi @snow holly , atleast from the email , I don't think customer tried the option. But we will check it further.
import netapp_ontap.config
config.RETRY_API_ON_ERROR = True

weak orchid
#

Hi @snow holly , as per customer,
He is aware of the option RETRY_API_ON_ERROR to True. Also he want to understand whether there are any values that he can set for RETRY_API_ATTEMPTS & RETRY_API_BACKOFF_FACTOR parameters so he doesn't need to manually patching the package on each deployment.

snow holly
#

Hi,
All these values can be set without needing to re-package netapp_ontap

#

They are meant as global config for the library during the runtime of the script

#

Does that help clarify?

weak orchid
#

Thanks @snow holly , do you have any exampls that can be shared with our client?