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:
|dn: cn=Consumer 000,cn=Database 1,cn=Databases,cn=Monitor objectClass: olmSyncReplInstance structuralObjectClass: olmSyncReplInstance cn: Consumer 000 creatorsName: cn=monitor modifiersName: cn=monitor createTimestamp: 20210908075111Z modifyTimestamp: 20210908075111Z olmSRProviderURIList: ldap://localhost:3389 olmSRConnection: IP=127.0.0.1:40908 olmSRSyncPhase: Persist olmSRNextConnect: 00000101000000Z olmSRLastConnect: 20210908075211Z olmSRLastContact: 20210908082522Z olmSRLastCookieRcvd: rid=000,csn=20210908082522.652290Z#000000#000#000000 olmSRLastCookieSent: rid=000,sid=000,csn=20210907161949.876119Z#000000#000#000 000 entryDN: cn=Consumer 000,cn=Database 1,cn=Databases,cn=Monitor subschemaSubentry: cn=Subschema hasSubordinates: FALSE|
1/ I haven't found any documentation about these attributes in OpenLDAP manual. Is there something in progress ?
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?
Regards,
David
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,
openldap-technical@openldap.org