Summary
Error 111 - Connection refused is raised immediatly without retry during secret retrieval due to no handling for this exception in
|
def retry(retries, retry_interval): |
Same issues occur for other kind of errors out of urllib_error.HTTPError or socket.timeout already handled.
Could you add a default base Exception to let the retry perform the secret retrieval when the retry_count is not reached ?
Thanks for your support.
Steps to Reproduce
- Having Conjur serving server returning Error 111 - Connection refused frequently.
- Running several times the lookup conjur_variable to retrieve a host password on this Conjur server until the error is encountered.
Expected Results
Keep retrying to get the host password until the retry_count is reached even when Error 111 - Connection refused is encountered.
Actual Results
Lookup fails immediatly with message:
"msg": "An unhandled exception occurred while running the lookup plugin 'cyberark.conjur.conjur_variable'. Error was a <class 'urllib.error.URLError'>, original message: <urlopen error [Errno 111] Connection refused>. <urlopen error [Errno 111] Connection refused>"
Reproducible
Version/Tag number
v1.2.0
Environment setup
Ansible Automation Platform v2.4 On Premise
Ansible [core 2.15.0]
Conjur Pods On Premise with 2 active nodes seems to increase the number of connection refused versus 1 active - 1 passive node.
Additional Information
In same parameters_wrapper method: missing alias 'e' in
|
except socket.timeout: |
|
if retry_count >= retries: |
|
raise e |
Summary
Error 111 - Connection refused is raised immediatly without retry during secret retrieval due to no handling for this exception in
ansible-conjur-collection/plugins/lookup/conjur_variable.py
Line 185 in cb3facc
Same issues occur for other kind of errors out of
urllib_error.HTTPErrororsocket.timeoutalready handled.Could you add a default base Exception to let the retry perform the secret retrieval when the retry_count is not reached ?
Thanks for your support.
Steps to Reproduce
Expected Results
Keep retrying to get the host password until the retry_count is reached even when Error 111 - Connection refused is encountered.
Actual Results
Lookup fails immediatly with message:
"msg": "An unhandled exception occurred while running the lookup plugin 'cyberark.conjur.conjur_variable'. Error was a <class 'urllib.error.URLError'>, original message: <urlopen error [Errno 111] Connection refused>. <urlopen error [Errno 111] Connection refused>"Reproducible
Version/Tag number
v1.2.0
Environment setup
Ansible Automation Platform v2.4 On Premise
Ansible [core 2.15.0]
Conjur Pods On Premise with 2 active nodes seems to increase the number of connection refused versus 1 active - 1 passive node.
Additional Information
In same parameters_wrapper method: missing alias 'e' in
ansible-conjur-collection/plugins/lookup/conjur_variable.py
Lines 205 to 207 in cb3facc