mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
Only create DNS SRV records for ready server
When installing multiple replicas in parallel, one replica may create SRV entries for other replicas, although the replicas aren't fully installed yet. This may cause some services to connect to a server, that isn't ready to serve requests. The DNS IPASystemRecords framework now skips all servers that aren't ready IPA masters. See: https://pagure.io/freeipa/issue/7566 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
parent
7c2ca14118
commit
10457a01bf
@ -96,7 +96,9 @@ class IPASystemRecords(object):
|
||||
self.servers_data = {}
|
||||
|
||||
servers_result = self.api_instance.Command.server_find(
|
||||
no_members=False)['result']
|
||||
no_members=False,
|
||||
servrole=u"IPA master", # only active, fully installed masters
|
||||
)['result']
|
||||
for s in servers_result:
|
||||
weight, location, roles = self.__get_server_attrs(s)
|
||||
self.servers_data[s['cn'][0]] = {
|
||||
@ -348,7 +350,9 @@ class IPASystemRecords(object):
|
||||
zone_obj = zone.Zone(self.domain_abs, relativize=False)
|
||||
if servers is None:
|
||||
servers_result = self.api_instance.Command.server_find(
|
||||
pkey_only=True)['result']
|
||||
pkey_only=True,
|
||||
servrole=u"IPA master", # only fully installed masters
|
||||
)['result']
|
||||
servers = [s['cn'][0] for s in servers_result]
|
||||
|
||||
locations_result = self.api_instance.Command.location_find()['result']
|
||||
|
Loading…
Reference in New Issue
Block a user