From 5c6232e24d008d062bb5e70dae5b111c32e96169 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 31 Jan 2011 16:20:40 -0500 Subject: Force sync in both direction before changing replication agreements Fixes: https://fedorahosted.org/freeipa/ticket/887 --- install/tools/ipa-replica-manage | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'install') diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage index 8f0b7c59c..19ff1f904 100755 --- a/install/tools/ipa-replica-manage +++ b/install/tools/ipa-replica-manage @@ -358,15 +358,7 @@ def re_initialize(realm, options): def force_sync(realm, thishost, fromhost, dirman_passwd): repl = replication.ReplicationManager(realm, fromhost, dirman_passwd) - - filter = "(&(nsDS5ReplicaHost=%s)(|(objectclass=nsDSWindowsReplicationAgreement)(objectclass=nsds5ReplicationAgreement)))" % thishost - entry = repl.conn.search_s("cn=config", ldap.SCOPE_SUBTREE, filter) - if len(entry) == 0: - logging.error("Unable to find %s -> %s replication agreement" % (fromhost, thishost)) - sys.exit(1) - if len(entry) > 1: - logging.error("Found multiple agreements for %s. Only initializing the first one returned: %s" % (thishost, entry[0].dn)) - repl.force_synch(entry[0].dn, entry[0].nsds5replicaupdateschedule) + repl.force_sync(repl.conn, thishost) def main(): options, args = parse_options() -- cgit