[python-ldap] Patch for ReconnectLDAPObject
Michael Ströder
michael at stroeder.com
Mon Jul 8 09:33:36 CEST 2013
Dylan Jay wrote:
> We've discovered either an issue with this patch or another issue with timeouts.
Which patch? Please be more precise.
> The details of how reproduce this are in the post by Maurits van Rees
>
> https://bugs.launchpad.net/ldapuserfolder/+bug/650371
Hmm, I don't know anything about Zope. Nor do I have any knowledge about how
LDAPUserFolder uses python-ldap. Maybe Jens can comment here.
I presume that if updating to 2.4.13 partially solves the issue it's related
to recent changes for ReconnectLDAPObject. I think that Jonathan Giannuzzi's
contribution helped since I could reproduce the problem before and his patch
solved it.
What I see finally in the bug report is a
SERVER_DOWN: {'desc': "Can't contact LDAP server"}
This can happen even with ReconnectLDAPObject. See parameters retry_max and
retry_delay of ReconnectLDAPObject.__init__():
http://www.python-ldap.org/doc/html/ldap.html#ldap.ReconnectLDAPObject
Also note that only synchronous method calls are retried automagically. If
LDAPUserFolder uses asynchronous calls, e.g. to make use of LDAPv3 extended
response controls only returned by result3() and result4(), it has to handle
ldap.SERVER_DOWN itself by invoking ReconnectLDAPObject.reconnect(ls.uri) and
retry the code block.
Ciao, Michael.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2398 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20130708/2e956f88/attachment.bin>
More information about the python-ldap
mailing list