pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone
Blob Blame History Raw
From bd769b979c26c0c1ff723faca167cd83a27420d5 Mon Sep 17 00:00:00 2001
From: Christian Heimes <cheimes@redhat.com>
Date: Tue, 10 Jul 2018 12:51:36 +0200
Subject: [PATCH] Fix DNSSEC install regression

7284097eedef70dd556270732e6ab8e23501ce09 introduced a regression in
DNSSEC master installation. For standalone and replica installation,
services have to be enabled before checking bind config.

Fixes: https://pagure.io/freeipa/issue/7635
See: https://pagure.io/freeipa/issue/7566
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Tibor Dudlak <tdudlak@redhat.com>
Reviewed-By: Tibor Dudlak <tdudlak@redhat.com>
---
 install/tools/ipa-dns-install | 5 +----
 ipaserver/install/dns.py      | 5 +++++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install
index 04d1b140d2c79a0fa72d7df47d556643751bddb7..e7b6ea3a00468190b8dafe7c696f3bf212f81b9c 100755
--- a/install/tools/ipa-dns-install
+++ b/install/tools/ipa-dns-install
@@ -36,7 +36,6 @@ from ipapython.config import IPAOptionParser
 from ipapython.ipa_log_manager import standard_logging_setup, root_logger
 
 from ipaserver.install import dns as dns_installer
-from ipaserver.install import service
 
 log_file_name = paths.IPASERVER_INSTALL_LOG
 
@@ -146,9 +145,7 @@ def main():
 
     dns_installer.install_check(True, api, False, options, hostname=api.env.host)
     dns_installer.install(True, False, options)
-    # Enable configured services and update DNS SRV records
-    service.enable_services(api.env.host)
-    api.Command.dns_update_system_records()
+    # Services are enabled in dns_installer.install()
 
     # execute ipactl to refresh services status
     ipautil.run(['ipactl', 'start', '--ignore-service-failures'],
diff --git a/ipaserver/install/dns.py b/ipaserver/install/dns.py
index 1c1aac06a18fe3c1f63b5881c7887f6a4cfc9ac2..0046b78066cbb8e4f43e04af86da74118a5aa8c6 100644
--- a/ipaserver/install/dns.py
+++ b/ipaserver/install/dns.py
@@ -43,6 +43,7 @@ from ipaserver.install import bindinstance
 from ipaserver.install import dnskeysyncinstance
 from ipaserver.install import odsexporterinstance
 from ipaserver.install import opendnssecinstance
+from ipaserver.install import service
 
 if six.PY3:
     unicode = str
@@ -355,6 +356,10 @@ def install(standalone, replica, options, api=api):
     dnskeysyncd.start_dnskeysyncd()
     bind.start_named()
 
+    # Enable configured services for standalone check_global_configuration()
+    if standalone:
+        service.enable_services(api.env.host)
+
     # this must be done when bind is started and operational
     bind.update_system_records()
 
-- 
2.17.1