summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/replication.py
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2012-01-04 13:50:19 -0500
committerSimo Sorce <ssorce@redhat.com>2012-01-13 10:22:38 -0500
commit0d3cd4c3840c1e67adc85f17debe0f6c5f04b309 (patch)
tree2e1899fa286ebdac1c6d1cf4677b29e57a3f577d /ipaserver/install/replication.py
parent95f3ec5d7053a54a393daf1f7d9a93be9d8a64fe (diff)
downloadfreeipa-0d3cd4c3840c1e67adc85f17debe0f6c5f04b309.tar.gz
freeipa-0d3cd4c3840c1e67adc85f17debe0f6c5f04b309.tar.xz
freeipa-0d3cd4c3840c1e67adc85f17debe0f6c5f04b309.zip
Fix replication setup
Changes to add a cs-replication management tool mistakenly always set a flag that caused replicas to not add the list of attribute we exclude from replication.
Diffstat (limited to 'ipaserver/install/replication.py')
-rw-r--r--ipaserver/install/replication.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py
index 74685ef0f..3ac99e6bd 100644
--- a/ipaserver/install/replication.py
+++ b/ipaserver/install/replication.py
@@ -673,7 +673,9 @@ class ReplicationManager(object):
self.replica_config(conn, replica_id, repldn)
self.setup_changelog(conn)
- def setup_replication(self, r_hostname, r_port=389, r_sslport=636, r_binddn=None, r_bindpw=None, starttls=False):
+ def setup_replication(self, r_hostname, r_port=389, r_sslport=636,
+ r_binddn=None, r_bindpw=None, starttls=False,
+ is_cs_replica=False):
# note - there appears to be a bug in python-ldap - it does not
# allow connections using two different CA certs
if starttls:
@@ -698,14 +700,22 @@ class ReplicationManager(object):
self.basic_replication_setup(r_conn, r_id,
self.repl_man_dn, self.repl_man_passwd)
- self.setup_agreement(r_conn, self.conn.host, port=r_port,
- repl_man_dn=self.repl_man_dn,
- repl_man_passwd=self.repl_man_passwd,
- master=True)
- self.setup_agreement(self.conn, r_hostname, port=r_port,
- repl_man_dn=self.repl_man_dn,
- repl_man_passwd=self.repl_man_passwd,
- master=False)
+ if is_cs_replica:
+ self.setup_agreement(r_conn, self.conn.host, port=r_port,
+ repl_man_dn=self.repl_man_dn,
+ repl_man_passwd=self.repl_man_passwd,
+ master=True)
+ self.setup_agreement(self.conn, r_hostname, port=r_port,
+ repl_man_dn=self.repl_man_dn,
+ repl_man_passwd=self.repl_man_passwd,
+ master=False)
+ else:
+ self.setup_agreement(r_conn, self.conn.host, port=r_port,
+ repl_man_dn=self.repl_man_dn,
+ repl_man_passwd=self.repl_man_passwd)
+ self.setup_agreement(self.conn, r_hostname, port=r_port,
+ repl_man_dn=self.repl_man_dn,
+ repl_man_passwd=self.repl_man_passwd)
#Finally start replication
ret = self.start_replication(r_conn, master=True)