From 2255479ef0e69bc966f9027f21faf7b14635227c Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 10 Jan 2011 10:57:43 -0500 Subject: Refactor some replication code This simplifies or rationalizes some code in order to make it easier to change it to fix bug #690 --- ipaserver/install/dsinstance.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'ipaserver/install/dsinstance.py') 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()) -- cgit