From 244c94076765f106bce892e03da6d57e0f0bd86e Mon Sep 17 00:00:00 2001 From: Thierry Bordaz Date: Jul 10 2018 13:51:59 +0000 Subject: Ticket 48818 - For a replica bindDNGroup, should be fetched the first time it is used not when the replica is started Bug Description: The fetching of the bindDNGroup is working as designed but this ticket is to make it more flexible At startup, if the group does not contain the replica_mgr. No replication session will succeed until bindDnGroupCheckInterval delay. updatedn_group_last_check is the timestamp of the last fetch. At startup updatedn_group_last_check is set to the current time. So the next fetch will happen not before updatedn_group_last_check+bindDnGroupCheckInterval. If the groupDn is changed after startup, no incoming replication can happen for the first bindDnGroupCheckInterval seconds Fix Description: The fix consist to unset updatedn_group_last_check so that the group will be fetch when the first incoming replication session will happen. https://pagure.io/389-ds-base/issue/49818 Reviewed by: Mark Reynolds, Simon Spichugi (thanks !!!) Platforms tested: F27 Flag Day: no Doc impact: no --- diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c index 62bd84e..595c646 100644 --- a/ldap/servers/plugins/replication/repl5_replica.c +++ b/ldap/servers/plugins/replication/repl5_replica.c @@ -2026,7 +2026,7 @@ _replica_init_from_config(Replica *r, Slapi_Entry *e, char *errortext) /* get replication bind dn groups */ r->updatedn_groups = replica_updatedn_group_new(e); r->groupdn_list = replica_groupdn_list_new(r->updatedn_groups); - r->updatedn_group_last_check = time(NULL); + r->updatedn_group_last_check = 0; /* get groupdn check interval */ if ((val = slapi_entry_attr_get_charptr(e, attr_replicaBindDnGroupCheckInterval))) { if (repl_config_valid_num(attr_replicaBindDnGroupCheckInterval, val, -1, INT_MAX, &rc, errormsg, &interval) != 0) {