diff options
author | Karl MacMillan <kmacmill@redhat.com> | 2007-12-20 17:05:16 -0500 |
---|---|---|
committer | Karl MacMillan <kmacmill@redhat.com> | 2007-12-20 17:05:16 -0500 |
commit | ac0fb8ea524dcc86f358f405ba233c8dcbef71ed (patch) | |
tree | ff12b4ddea8f4779fa4e603e10ae1d17b6ce3baf /ipa-server/ipaserver/replication.py | |
parent | 6d9974dd95aa5e9e8578c61a3dd71b2a530f1412 (diff) | |
download | freeipa.git-ac0fb8ea524dcc86f358f405ba233c8dcbef71ed.tar.gz freeipa.git-ac0fb8ea524dcc86f358f405ba233c8dcbef71ed.tar.xz freeipa.git-ac0fb8ea524dcc86f358f405ba233c8dcbef71ed.zip |
Convert replication to use the new cert infrastructure and
correctly issue certs from the same authority. Also remove
support for read-only replicas since that work will not
be finished and tested for 1.0.
Diffstat (limited to 'ipa-server/ipaserver/replication.py')
-rw-r--r-- | ipa-server/ipaserver/replication.py | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/ipa-server/ipaserver/replication.py b/ipa-server/ipaserver/replication.py index 580ec27b..df2b0288 100644 --- a/ipa-server/ipaserver/replication.py +++ b/ipa-server/ipaserver/replication.py @@ -77,7 +77,7 @@ class ReplicationManager: except ldap.NO_SUCH_OBJECT: pass - def get_replica_type(self, master): + def get_replica_type(self, master=True): if master: return "3" else: @@ -87,7 +87,7 @@ class ReplicationManager: return 'cn=replica, cn="%s", cn=mapping tree, cn=config' % self.suffix - def local_replica_config(self, conn, master, replica_id): + def local_replica_config(self, conn, replica_id): dn = self.replica_dn() try: @@ -97,7 +97,7 @@ class ReplicationManager: except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND): pass - replica_type = self.get_replica_type(master) + replica_type = self.get_replica_type() entry = ipaldap.Entry(dn) entry.setValues('objectclass', "top", "nsds5replica", "extensibleobject") @@ -284,13 +284,12 @@ class ReplicationManager: return self.wait_for_repl_init(other_conn, dn) - def basic_replication_setup(self, conn, master, replica_id): + def basic_replication_setup(self, conn, replica_id): self.add_replication_manager(conn) - self.local_replica_config(conn, master, replica_id) - if master: - self.setup_changelog(conn) + self.local_replica_config(conn, replica_id) + self.setup_changelog(conn) - def setup_replication(self, other_hostname, realm_name, master=True): + def setup_replication(self, other_hostname, realm_name): """ NOTES: - the directory manager password needs to be the same on @@ -300,15 +299,11 @@ class ReplicationManager: other_conn.do_simple_bind(bindpw=self.dirman_passwd) self.suffix = ipaldap.IPAdmin.normalizeDN(dsinstance.realm_to_suffix(realm_name)) - self.basic_replication_setup(self.conn, master, 1) - self.basic_replication_setup(other_conn, True, 2) + self.basic_replication_setup(self.conn, 1) + self.basic_replication_setup(other_conn, 2) self.setup_agreement(other_conn, self.conn) - if master: - self.setup_agreement(self.conn, other_conn) - else: - self.setup_chaining_farm(other_conn) - self.setup_chain_on_update(other_conn) + self.setup_agreement(self.conn, other_conn) return self.start_replication(other_conn) |