summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-slapi-plugins/topology/topology_init.c
diff options
context:
space:
mode:
authorLudwig Krispenz <lkrispen@redhat.com>2015-06-30 11:27:50 +0200
committerTomas Babej <tbabej@redhat.com>2015-06-30 12:47:50 +0200
commitbb1f45b7f093bcc07094cf65b66189125fa44bc7 (patch)
treef0be686532fceb3ce7a38a1709bc6c1b239e496e /daemons/ipa-slapi-plugins/topology/topology_init.c
parent0bf4e7fb4ae1e32bfd8fe9f92fd9ebed7f4cad93 (diff)
downloadfreeipa-bb1f45b7f093bcc07094cf65b66189125fa44bc7.tar.gz
freeipa-bb1f45b7f093bcc07094cf65b66189125fa44bc7.tar.xz
freeipa-bb1f45b7f093bcc07094cf65b66189125fa44bc7.zip
v2 clear start attr from segment after initialization
Online initialization can be triggered by setting "nsds5BeginReplicaRefresh[;left|;right]": start to a segment. But this field remained in the segment and after restart the init would be executed again. see Ticket #5065 To fix this the field is cleared: - after a backend comes back online after being initialized - since there is a delay and the sending server could be restarted in between, the field is also scheced and renḿoved at startup Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
Diffstat (limited to 'daemons/ipa-slapi-plugins/topology/topology_init.c')
-rw-r--r--daemons/ipa-slapi-plugins/topology/topology_init.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/daemons/ipa-slapi-plugins/topology/topology_init.c b/daemons/ipa-slapi-plugins/topology/topology_init.c
index af5b8021f..073e4bf42 100644
--- a/daemons/ipa-slapi-plugins/topology/topology_init.c
+++ b/daemons/ipa-slapi-plugins/topology/topology_init.c
@@ -160,6 +160,18 @@ ipa_topo_apply_shared_config(void)
/* initialize the list of managed servers */
rc = ipa_topo_setup_managed_servers();
+ if (ipa_topo_get_post_init()) {
+ /* this server has just been initialized, we reset the init
+ * flag in the segments which triggered this init
+ */
+ i = 0;
+ while(shared_replica_root[i]) {
+ ipa_topo_util_reset_init(shared_replica_root[i]);
+ i++;
+ }
+ ipa_topo_set_post_init(0);
+ }
+
ipa_topo_release_startup_inprogress();
return (rc);
}
@@ -295,6 +307,7 @@ ipa_topo_be_state_change(void *handle, char *be_name,
ipa_topo_util_set_domain_level();
ipa_topo_util_check_plugin_active();
if (ipa_topo_get_plugin_active()) {
+ ipa_topo_set_post_init(1);
ipa_topo_util_start(1);
}
} else if (new_be_state == SLAPI_BE_STATE_OFFLINE) {