|
|
95ea96 |
From 7297060d59534cff6a703ad95c68bf20e53c14ae Mon Sep 17 00:00:00 2001
|
|
|
2737e7 |
From: Christian Heimes <cheimes@redhat.com>
|
|
|
2737e7 |
Date: Thu, 5 Jul 2018 23:59:06 +0200
|
|
|
2737e7 |
Subject: [PATCH] Only create DNS SRV records for ready server
|
|
|
2737e7 |
|
|
|
2737e7 |
When installing multiple replicas in parallel, one replica may create
|
|
|
2737e7 |
SRV entries for other replicas, although the replicas aren't fully
|
|
|
2737e7 |
installed yet. This may cause some services to connect to a server, that
|
|
|
2737e7 |
isn't ready to serve requests.
|
|
|
2737e7 |
|
|
|
2737e7 |
The DNS IPASystemRecords framework now skips all servers that aren't
|
|
|
2737e7 |
ready IPA masters.
|
|
|
2737e7 |
|
|
|
2737e7 |
See: https://pagure.io/freeipa/issue/7566
|
|
|
2737e7 |
Signed-off-by: Christian Heimes <cheimes@redhat.com>
|
|
|
2737e7 |
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
|
|
|
2737e7 |
---
|
|
|
2737e7 |
ipaserver/dns_data_management.py | 8 ++++++--
|
|
|
2737e7 |
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
2737e7 |
|
|
|
2737e7 |
diff --git a/ipaserver/dns_data_management.py b/ipaserver/dns_data_management.py
|
|
|
95ea96 |
index bdf83de0cd76d8b571b5c2190ef8c4d63bcbf2d7..675dd481b461aa14d8adf8393a2168ac84ecac86 100644
|
|
|
2737e7 |
--- a/ipaserver/dns_data_management.py
|
|
|
2737e7 |
+++ b/ipaserver/dns_data_management.py
|
|
|
95ea96 |
@@ -96,7 +96,9 @@ class IPASystemRecords(object):
|
|
|
2737e7 |
self.servers_data = {}
|
|
|
2737e7 |
|
|
|
2737e7 |
servers_result = self.api_instance.Command.server_find(
|
|
|
2737e7 |
- no_members=False)['result']
|
|
|
2737e7 |
+ no_members=False,
|
|
|
2737e7 |
+ servrole=u"IPA master", # only active, fully installed masters
|
|
|
2737e7 |
+ )['result']
|
|
|
2737e7 |
for s in servers_result:
|
|
|
2737e7 |
weight, location, roles = self.__get_server_attrs(s)
|
|
|
2737e7 |
self.servers_data[s['cn'][0]] = {
|
|
|
95ea96 |
@@ -348,7 +350,9 @@ class IPASystemRecords(object):
|
|
|
2737e7 |
zone_obj = zone.Zone(self.domain_abs, relativize=False)
|
|
|
2737e7 |
if servers is None:
|
|
|
2737e7 |
servers_result = self.api_instance.Command.server_find(
|
|
|
2737e7 |
- pkey_only=True)['result']
|
|
|
2737e7 |
+ pkey_only=True,
|
|
|
2737e7 |
+ servrole=u"IPA master", # only fully installed masters
|
|
|
2737e7 |
+ )['result']
|
|
|
2737e7 |
servers = [s['cn'][0] for s in servers_result]
|
|
|
2737e7 |
|
|
|
2737e7 |
locations_result = self.api_instance.Command.location_find()['result']
|
|
|
2737e7 |
--
|
|
|
2737e7 |
2.17.1
|
|
|
2737e7 |
|