diff options
author | Simo Sorce <ssorce@redhat.com> | 2011-01-31 16:20:40 -0500 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2011-02-01 13:49:41 -0500 |
commit | 5c6232e24d008d062bb5e70dae5b111c32e96169 (patch) | |
tree | c614c3f714292e2e6e69779f33aaf72b1c9035f9 /install | |
parent | 8cff0812d5121601a860e8521d0e0d94797fa0f0 (diff) | |
download | freeipa-5c6232e24d008d062bb5e70dae5b111c32e96169.tar.gz freeipa-5c6232e24d008d062bb5e70dae5b111c32e96169.tar.xz freeipa-5c6232e24d008d062bb5e70dae5b111c32e96169.zip |
Force sync in both direction before changing replication agreements
Fixes: https://fedorahosted.org/freeipa/ticket/887
Diffstat (limited to 'install')
-rwxr-xr-x | install/tools/ipa-replica-manage | 10 |
1 files changed, 1 insertions, 9 deletions
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() |