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