BIND starting before we apply LDAP updates and restart kdc and directory
server causes trouble. We resolve this for now by postponing BIND start
to the end of installation.

Martin
>From 6cbe66165d4a17fd4f1b5d9e259ac71dce53df2d Mon Sep 17 00:00:00 2001
From: Martin Nagy <mn...@redhat.com>
Date: Wed, 2 Sep 2009 01:05:41 +0200
Subject: [PATCH] Start bind only after restarting kdc and dirsrv

BIND starting before we apply LDAP updates and restart kdc and directory
server causes trouble. We resolve this for now by postponing BIND start
to the end of installation.
---
 install/tools/ipa-replica-install |    2 ++
 install/tools/ipa-server-install  |    4 ++++
 ipaserver/install/bindinstance.py |   15 +++++++--------
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index d76ec05..14de8da 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -343,6 +343,8 @@ def main():
 
     service.restart("dirsrv")
     service.restart("krb5kdc")
+    if options.setup_dns:
+        service.restart("bind")
 
     # Call client install script
     try:
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 2c890b4..27a5e13 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -653,6 +653,10 @@ def main():
     service.print_msg("restarting the KDC")
     krb.restart()
 
+    if options.setup_dns:
+        service.print_msg("restarting BIND")
+        bind.start()
+
     # Set the admin user kerberos password
     ds.change_admin_password(admin_password)
 
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index e2c91f3..45bbb1e 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -97,7 +97,6 @@ class BindInstance(service.Service):
         self.step("setting up kerberos principal", self.__setup_principal)
         self.step("setting up named.conf", self.__setup_named_conf)
 
-        self.step("restarting named", self.__start)
         self.step("configuring named to start on boot", self.__enable)
 
         self.step("changing resolv.conf to point to ourselves", self.__setup_resolv_conf)
@@ -136,13 +135,6 @@ class BindInstance(service.Service):
 
         server.unbind_s()
 
-    def __start(self):
-        try:
-            self.backup_state("running", self.is_running())
-            self.restart()
-        except:
-            print "named service failed to start"
-
     def __enable(self):
         self.backup_state("enabled", self.is_running())
         self.chkconfig_on()
@@ -237,6 +229,13 @@ class BindInstance(service.Service):
         resolv_fd.write(resolv_txt)
         resolv_fd.close()
 
+    def start(self):
+        try:
+            self.backup_state("running", self.is_running())
+            self.restart()
+        except:
+            print "named service failed to start"
+
     def uninstall(self):
         running = self.restore_state("running")
         enabled = self.restore_state("enabled")
-- 
1.6.0.6

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to