Forum Discussion
better error handling on pycontrol auth errors?
One thing I've noticed when working with the pycontrol v2 libraries is that if you don't set up your BIGIP object with correct username/password credentials, two things happen:
1. There is a timeout of almost three and a half minutes before any response is registered.
2. The returned error is not the documented Common::AccessDenied exception. Consider the following code:
---
import pycontrol.pycontrol as pc
user = 'cwoodfield'
passwd = 'incorrect_passwd'
lb = 'lb_hostname'
b = pc.BIGIP(hostname = lb, username = user, password = passwd,
fromurl = True, wsdls = ['LocalLB.Pool'])
try:
list = b.LocalLB.Pool.get_list()
print list
except Exception, e:
print e
---
When I run this with "time" I get:
$ time python2.6 test_failed_login.py
maximum recursion depth exceeded while calling a Python object
real 3m28.308s
user 0m1.002s
sys 0m0.074s
---
Is this a known issue? Are there any additional parameters I can set to reduce the timeout here? Thanks!
1 Reply
- Marc_Chisinevsk
Nimbostratus