mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
committed by
Petr Vobornik
parent
b081023c3a
commit
5b5258b010
@@ -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)
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user