summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislav Laznicka <slaznick@redhat.com>2016-06-23 16:07:18 +0200
committerPetr Vobornik <pvoborni@redhat.com>2016-06-24 13:32:02 +0200
commit5b5258b01081aa9ad4bf83907941c1c2d8a47722 (patch)
tree8aaf86fe5e73daab1240e667e559d59bd48ba0e9
parentb081023c3af8e001a16377d129f41c5a201d56be (diff)
downloadfreeipa-5b5258b01081aa9ad4bf83907941c1c2d8a47722.tar.gz
freeipa-5b5258b01081aa9ad4bf83907941c1c2d8a47722.tar.xz
freeipa-5b5258b01081aa9ad4bf83907941c1c2d8a47722.zip
Fix topologysuffix-verify failing connections
topologysuffix-verify would have checked connectivity even between hosts that are not managed by the given suffix. https://fedorahosted.org/freeipa/ticket/5967 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
-rw-r--r--ipaserver/plugins/topology.py4
-rw-r--r--ipaserver/topology.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/ipaserver/plugins/topology.py b/ipaserver/plugins/topology.py
index c1848f0cc..0d0b3c084 100644
--- a/ipaserver/plugins/topology.py
+++ b/ipaserver/plugins/topology.py
@@ -14,7 +14,8 @@ from ipalib import _, ngettext
from ipalib import output
from ipalib.constants import DOMAIN_LEVEL_1
from ipaserver.topology import (
- create_topology_graph, get_topology_connection_errors)
+ create_topology_graph, get_topology_connection_errors,
+ map_masters_to_suffixes)
from ipapython.dn import DN
if six.PY3:
@@ -476,6 +477,7 @@ Checks done:
masters = self.api.Command.server_find(
'', sizelimit=0, no_members=False)['result']
+ masters = map_masters_to_suffixes(masters).get(keys[0], [])
segments = self.api.Command.topologysegment_find(
keys[0], sizelimit=0)['result']
graph = create_topology_graph(masters, segments)
diff --git a/ipaserver/topology.py b/ipaserver/topology.py
index 27c3b29a4..385da29a6 100644
--- a/ipaserver/topology.py
+++ b/ipaserver/topology.py
@@ -70,7 +70,7 @@ def get_topology_connection_errors(graph):
return connect_errors
-def _map_masters_to_suffixes(masters):
+def map_masters_to_suffixes(masters):
masters_to_suffix = {}
for master in masters:
@@ -97,7 +97,7 @@ def _create_topology_graphs(api_instance):
masters = api_instance.Command.server_find(
u'', sizelimit=0, no_members=False)['result']
- suffix_to_masters = _map_masters_to_suffixes(masters)
+ suffix_to_masters = map_masters_to_suffixes(masters)
topology_graphs = {}