Make ipa-replica-manage del actually remove all replication agreements

The previous code was removing only one agreement, leaving all other in place.
This would leave dangling replication agreements once the replica is
uninstalled.

Fixes: https://fedorahosted.org/freeipa/ticket/624
This commit is contained in:
Simo Sorce
2010-12-21 11:07:39 -05:00
parent ad25fc07a0
commit 3f3de618ae
2 changed files with 54 additions and 57 deletions

View File

@@ -537,8 +537,10 @@ class ReplicationManager:
# allow connections using two different CA certs
other_conn = ipaldap.IPAdmin(other_hostname, port=oth_port, cacert=oth_cacert)
try:
# For now we always require a password to set up new replica
other_conn.do_simple_bind(binddn=oth_binddn, bindpw=oth_bindpw)
if oth_bindpw:
other_conn.do_simple_bind(binddn=oth_binddn, bindpw=oth_bindpw)
else:
other_conn.sasl_interactive_bind_s('', SASL_AUTH)
except Exception, e:
if iswinsync:
logging.info("Could not validate connection to remote server %s:%d - continuing" %