2737e7
From bd769b979c26c0c1ff723faca167cd83a27420d5 Mon Sep 17 00:00:00 2001
2737e7
From: Christian Heimes <cheimes@redhat.com>
2737e7
Date: Tue, 10 Jul 2018 12:51:36 +0200
2737e7
Subject: [PATCH] Fix DNSSEC install regression
2737e7
2737e7
7284097eedef70dd556270732e6ab8e23501ce09 introduced a regression in
2737e7
DNSSEC master installation. For standalone and replica installation,
2737e7
services have to be enabled before checking bind config.
2737e7
2737e7
Fixes: https://pagure.io/freeipa/issue/7635
2737e7
See: https://pagure.io/freeipa/issue/7566
2737e7
Signed-off-by: Christian Heimes <cheimes@redhat.com>
2737e7
Reviewed-By: Tibor Dudlak <tdudlak@redhat.com>
2737e7
Reviewed-By: Tibor Dudlak <tdudlak@redhat.com>
2737e7
---
2737e7
 install/tools/ipa-dns-install | 5 +----
2737e7
 ipaserver/install/dns.py      | 5 +++++
2737e7
 2 files changed, 6 insertions(+), 4 deletions(-)
2737e7
2737e7
diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install
2737e7
index 04d1b140d2c79a0fa72d7df47d556643751bddb7..e7b6ea3a00468190b8dafe7c696f3bf212f81b9c 100755
2737e7
--- a/install/tools/ipa-dns-install
2737e7
+++ b/install/tools/ipa-dns-install
2737e7
@@ -36,7 +36,6 @@ from ipapython.config import IPAOptionParser
2737e7
 from ipapython.ipa_log_manager import standard_logging_setup, root_logger
2737e7
 
2737e7
 from ipaserver.install import dns as dns_installer
2737e7
-from ipaserver.install import service
2737e7
 
2737e7
 log_file_name = paths.IPASERVER_INSTALL_LOG
2737e7
 
2737e7
@@ -146,9 +145,7 @@ def main():
2737e7
 
2737e7
     dns_installer.install_check(True, api, False, options, hostname=api.env.host)
2737e7
     dns_installer.install(True, False, options)
2737e7
-    # Enable configured services and update DNS SRV records
2737e7
-    service.enable_services(api.env.host)
2737e7
-    api.Command.dns_update_system_records()
2737e7
+    # Services are enabled in dns_installer.install()
2737e7
 
2737e7
     # execute ipactl to refresh services status
2737e7
     ipautil.run(['ipactl', 'start', '--ignore-service-failures'],
2737e7
diff --git a/ipaserver/install/dns.py b/ipaserver/install/dns.py
2737e7
index 1c1aac06a18fe3c1f63b5881c7887f6a4cfc9ac2..0046b78066cbb8e4f43e04af86da74118a5aa8c6 100644
2737e7
--- a/ipaserver/install/dns.py
2737e7
+++ b/ipaserver/install/dns.py
2737e7
@@ -43,6 +43,7 @@ from ipaserver.install import bindinstance
2737e7
 from ipaserver.install import dnskeysyncinstance
2737e7
 from ipaserver.install import odsexporterinstance
2737e7
 from ipaserver.install import opendnssecinstance
2737e7
+from ipaserver.install import service
2737e7
 
2737e7
 if six.PY3:
2737e7
     unicode = str
2737e7
@@ -355,6 +356,10 @@ def install(standalone, replica, options, api=api):
2737e7
     dnskeysyncd.start_dnskeysyncd()
2737e7
     bind.start_named()
2737e7
 
2737e7
+    # Enable configured services for standalone check_global_configuration()
2737e7
+    if standalone:
2737e7
+        service.enable_services(api.env.host)
2737e7
+
2737e7
     # this must be done when bind is started and operational
2737e7
     bind.update_system_records()
2737e7
 
2737e7
-- 
2737e7
2.17.1
2737e7