summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/dsinstance.py
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2011-01-10 10:57:43 -0500
committerSimo Sorce <ssorce@redhat.com>2011-01-14 14:06:56 -0500
commit2255479ef0e69bc966f9027f21faf7b14635227c (patch)
tree5141c49f408020b8469371791253ce8bb52cd80d /ipaserver/install/dsinstance.py
parenta68b2d2aa37e748c2d00b70bd7d1ea114a4488be (diff)
downloadfreeipa-2255479ef0e69bc966f9027f21faf7b14635227c.tar.gz
freeipa-2255479ef0e69bc966f9027f21faf7b14635227c.tar.xz
freeipa-2255479ef0e69bc966f9027f21faf7b14635227c.zip
Refactor some replication code
This simplifies or rationalizes some code in order to make it easier to change it to fix bug #690
Diffstat (limited to 'ipaserver/install/dsinstance.py')
-rw-r--r--ipaserver/install/dsinstance.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index 73bc8b0c1..284bf2429 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -287,14 +287,12 @@ class DsInstance(service.Service):
def __setup_replica(self):
- try:
- repl = replication.ReplicationManager(self.fqdn, self.dm_password)
- ret = repl.setup_replication(self.master_fqdn, self.realm_name)
- except Exception, e:
- logging.debug("Connection error: %s" % e)
- raise RuntimeError("Unable to connect to LDAP server %s." % self.fqdn)
- if ret != 0:
- raise RuntimeError("Failed to start replication")
+ repl = replication.ReplicationManager(self.realm_name,
+ self.fqdn,
+ self.dm_password)
+ repl.setup_replication(self.master_fqdn,
+ "cn=Directory Manager",
+ self.dm_password)
def __enable(self):
self.backup_state("enabled", self.is_enabled())