On Wed, Sep 08, 2021 at 11:30:57AM +0200, David Coutadeur wrote:
Hi,
I am trying to get the synchronization status of a given consumer for each of his declared provider.
Synchronization status = Is this provider synchronized with the current consumer? (TRUE / FALSE)
Currently, I can do that by comparing contextCSN stored into consumers and providers.
I have noted that in OpenLDAP 2.5 there are new piece of information into cn=monitor: 1/ I haven't found any documentation about these attributes in OpenLDAP manual. Is there something in progress ?
There is no documentation on any of this yet. Feel free to write something up for the admin guide, perhaps?
2/ if I understand correctly the meaning of olmSRLastCookieRcvd, it should be the best candidate for computing the synchronization status. However, this attribut is empty at OpenLDAP startup, so I can't really rely on it. Do anyone see other means to get the synchronization status?
I guess you could go that way, my approach[1] is to observe the cookies directly (via syncrepl) where that of Howard's slapd-watcher[2] is to read the contextCSN from the DB/syncprov.
As I usually mention in similar discussions, be wary of interpreting short-lived large differences between CSNs as long replication delays, you would emit many false positives.
[1]. https://git.openldap.org/openldap/syncmonitor [2]. https://git.openldap.org/openldap/openldap/-/blob/master/tests/progs/slapd-w...
Regards,