[python-ldap] syncrepl.py demo not picking up changes that happened while disconnected

Thomas Cort thomasc at ssimicro.com
Wed Apr 22 21:53:31 CEST 2015


Hello,

The syncrepl feature is really compelling; I can write a python program
that can react to changes in the LDAP directory.

I'm working on a prototype using the demo (Demo/pyasn1/syncrepl.py), and
I'm running into a bit of a problem (maybe it's a problem with my
understanding?). I do an initial sync, kill the python script, make a
modification in ldap, restart the python script, and I expect it to get
the change that happened while it was disconnect. Unfortunately, I don't
see any indication that it discovers/gets the change. Is it a bug or am
I missing something?

The server is running OpenLDAP 2.4.33. Here's exactly what I'm doing....

$ sudo pip install python-ldap pyasn1

$ curl
https://pypi.python.org/packages/source/p/python-ldap/python-ldap-2.4.19.tar.gz
| tar zvxf -

$ cd python-ldap-2.4.19/Demo/pyasn1/

$ python syncrepl.py
'ldap://server.example.com/dc=2,dc=foobar?*?sub?(objectClass=*)?bindname=cn=thomasc%2cdc=2%2cdc=foobar,X-BINDPW=topSecret'
db.shelve

Connecting to LDAP server now...
Commencing sync process
Detected add of entry: dc=2,dc=foobar
...
Detected add of entry: cn=test01,dc=2,dc=foobar
...
Initial synchronization is now done, persist phase begins
Detected modify of entry: cn=test01,dc=2,dc=foobar                 # I
made a change in LDAP
...
^CShutting down!                      # I killed the script with Ctrl+C

  # Once killed, I made more changes in LDAP and then restarted the script.

$ python syncrepl.py
'ldap://server.example.com/dc=2,dc=foobar?*?sub?(objectClass=*)?bindname=cn=thomasc%2cdc=2%2cdc=foobar,X-BINDPW=topSecret'
db.shelve

Connecting to LDAP server now...
Commencing sync process
             # I expect to see "Detected modify of entry" come up somewhere
Initial synchronization is now done, persist phase begins


Thanks,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20150422/7d99c65b/attachment.html>


More information about the python-ldap mailing list