summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-manage
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2013-04-08 14:09:16 +0200
committerRob Crittenden <rcritten@redhat.com>2013-04-16 10:05:43 -0400
commitfe3ba33d263a985f12c6b7b1ec342cde2babd830 (patch)
tree8f9721727120ec0f6b8c28e9942cb752147eb514 /install/tools/ipa-replica-manage
parenta730b6e7b5e4eca754022fd3e0112ef597888c3b (diff)
downloadfreeipa-fe3ba33d263a985f12c6b7b1ec342cde2babd830.tar.gz
freeipa-fe3ba33d263a985f12c6b7b1ec342cde2babd830.tar.xz
freeipa-fe3ba33d263a985f12c6b7b1ec342cde2babd830.zip
Update only selected attributes for winsync agreement
Trying to insert nsDS5ReplicatedAttributeListTotal and nsds5ReplicaStripAttrs to winsync agreements caused upgrade errors. With this patch, these attributes are skipped for winsync agreements. Made find_ipa_replication_agreements() in replication.py more corresponding to find_replication_agreements. It returns list of entries instead of unicode strings now. https://fedorahosted.org/freeipa/ticket/3522
Diffstat (limited to 'install/tools/ipa-replica-manage')
-rwxr-xr-xinstall/tools/ipa-replica-manage15
1 files changed, 12 insertions, 3 deletions
diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage
index 8ab4dc547..ecb263813 100755
--- a/install/tools/ipa-replica-manage
+++ b/install/tools/ipa-replica-manage
@@ -518,7 +518,10 @@ def check_last_link(delrepl, realm, dirman_passwd, force):
returns: hostname of orphaned server or None
"""
- replica_names = delrepl.find_ipa_replication_agreements()
+ replica_entries = delrepl.find_ipa_replication_agreements()
+
+ replica_names = [rep.single_value('nsds5replicahost', None)
+ for rep in replica_entries]
orphaned = []
# Connect to each remote server and see what agreements it has
@@ -531,7 +534,11 @@ def check_last_link(delrepl, realm, dirman_passwd, force):
if not force and not ipautil.user_input("Continue to delete?", False):
sys.exit("Aborted")
continue
- names = repl.find_ipa_replication_agreements()
+
+ entries = repl.find_ipa_replication_agreements()
+ names = [rep.single_value('nsds5replicahost', None)
+ for rep in entries]
+
if len(names) == 1 and names[0] == delrepl.hostname:
orphaned.append(replica)
@@ -611,7 +618,9 @@ def del_master(realm, hostname, options):
pass
else:
# Get list of agreements.
- replica_names = delrepl.find_ipa_replication_agreements()
+ replica_entries = delrepl.find_ipa_replication_agreements()
+ replica_names = [rep.single_value('nsds5replicahost', None)
+ for rep in replica_entries]
else:
# WINSYNC replica, delete agreement from current host
winsync = True