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