summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-manage
diff options
context:
space:
mode:
authorMartin Babinsky <mbabinsk@redhat.com>2015-12-08 17:24:36 +0100
committerMartin Basti <mbasti@redhat.com>2015-12-21 12:12:04 +0100
commit66de9a6c9b148043e7ee244f2fe6932d0b87aebb (patch)
tree1add63d6134fd3207cb3f4c6b46928fc3287d5ce /install/tools/ipa-replica-manage
parentcd5fa389450d15d5bc696131f73d062000d3558f (diff)
downloadfreeipa-66de9a6c9b148043e7ee244f2fe6932d0b87aebb.tar.gz
freeipa-66de9a6c9b148043e7ee244f2fe6932d0b87aebb.tar.xz
freeipa-66de9a6c9b148043e7ee244f2fe6932d0b87aebb.zip
harden domain level 1 topology connectivity checks
this patch makes the check_last_link_managed() function more resistant to both orphaned topology suffixes and also to cases when there are IPA masters do not seem to manage any suffix. The function will now only complain loudly about these cases and not cause crashes. Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'install/tools/ipa-replica-manage')
-rwxr-xr-xinstall/tools/ipa-replica-manage6
1 files changed, 2 insertions, 4 deletions
diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage
index 512473125..81a133192 100755
--- a/install/tools/ipa-replica-manage
+++ b/install/tools/ipa-replica-manage
@@ -785,11 +785,9 @@ def check_deleted_segments(hostname, masters, topo_errors, starting_host):
hostname))
return
- suffixes = api.Command.topologysuffix_find('', sizelimit=0)['result']
- suffix_to_masters = replication.map_masters_to_suffixes(masters, suffixes)
+ suffix_to_masters = replication.map_masters_to_suffixes(masters)
- for suffix in suffixes:
- suffix_name = suffix['cn'][0]
+ for suffix_name in suffix_to_masters:
suffix_member_cns = [
m['cn'][0] for m in suffix_to_masters[suffix_name]
]