summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2011-02-28 17:35:44 -0500
committerSimo Sorce <ssorce@redhat.com>2011-03-02 09:46:46 -0500
commit54b26270186422607ef52b9b408326744b2d86d1 (patch)
tree79af223f7a47592e3ada31111feec40b004d897b /ipaserver
parent998dd701a728465aa70fe8041aa8daf8c0f1eefc (diff)
downloadfreeipa-54b26270186422607ef52b9b408326744b2d86d1.tar.gz
freeipa-54b26270186422607ef52b9b408326744b2d86d1.tar.xz
freeipa-54b26270186422607ef52b9b408326744b2d86d1.zip
Store list of non-master replicas in DIT and provide way to list them
Fixes: https://fedorahosted.org/freeipa/ticket/1007
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/replication.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py
index c9afc5d43..091a4de03 100644
--- a/ipaserver/install/replication.py
+++ b/ipaserver/install/replication.py
@@ -673,6 +673,18 @@ class ReplicationManager:
self.wait_for_repl_update(self.conn, dn, 30)
logging.info("Agreement is ready, starting replication . . .")
+ # Add winsync replica to the public DIT
+ dn = 'cn=%s,cn=replicas,cn=ipa,cn=etc,%s' % (ad_dc_name, self.suffix)
+ entry = ipaldap.Entry(dn)
+ entry.setValues("objectclass", ["nsContainer", "ipaConfigObject"])
+ entry.setValues("cn", ad_dc_name)
+ entry.setValues("ipaConfigString", "winsync:%s" % self.hostname)
+
+ try:
+ self.conn.add_s(entry)
+ except Exception, e:
+ logging.info("Failed to create public entry for winsync replica")
+
#Finally start replication
ret = self.start_replication(self.conn, ad_dc_name)
if ret != 0: