summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/bindinstance.py
diff options
context:
space:
mode:
authorAdam Misnyovszki <amisnyov@redhat.com>2014-04-18 15:44:11 +0200
committerMartin Kosek <mkosek@redhat.com>2014-05-27 13:05:53 +0200
commit71c6d2f1eb9610a0e0a994a6cfd78fdf9bb9d1fa (patch)
tree1c176584565a174bdf47cc3e9a318b609bc3b11e /ipaserver/install/bindinstance.py
parentd6a4da30de37b2a3f1a3b4b8f8dd6dc0da3e1b50 (diff)
downloadfreeipa-71c6d2f1eb9610a0e0a994a6cfd78fdf9bb9d1fa.tar.gz
freeipa-71c6d2f1eb9610a0e0a994a6cfd78fdf9bb9d1fa.tar.xz
freeipa-71c6d2f1eb9610a0e0a994a6cfd78fdf9bb9d1fa.zip
Call generate-rndc-key.sh during ipa-server-install
Since systemd has by default a 2 minute timeout to start a service, the end of ipa-server-install might fail because starting named times out. This patch ensures that generate-rndc-key.sh runs before named service restart. Also, warning message is displayed before KDC install and generate-rndc-key.sh, if there is a lack of entropy, to notify the user that the process could take more time than expected. Modifications done by Martin Kosek: - removed whitespace at the end of installutils.py - the warning in krbinstance.py moved right before the step requiring entropy - slightly reworded the warning message https://fedorahosted.org/freeipa/ticket/4210 Reviewed-By: Martin Kosek <mkosek@redhat.com>
Diffstat (limited to 'ipaserver/install/bindinstance.py')
-rw-r--r--ipaserver/install/bindinstance.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index 613af5c91..c5ff76726 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -523,6 +523,9 @@ class BindInstance(service.Service):
if installutils.record_in_hosts(self.ip_address, self.fqdn) is None:
installutils.add_record_to_hosts(self.ip_address, self.fqdn)
+ # Make sure generate-rndc-key.sh runs before named restart
+ self.step("generating rndc key file", self.__generate_rndc_key)
+
if self.first_instance:
self.step("adding DNS container", self.__setup_dns_container)
@@ -820,6 +823,10 @@ class BindInstance(service.Service):
except IOError as e:
root_logger.error('Could not write to resolv.conf: %s', e)
+ def __generate_rndc_key(self):
+ installutils.check_entropy()
+ ipautil.run(['/usr/libexec/generate-rndc-key.sh'])
+
def add_master_dns_records(self, fqdn, ip_address, realm_name, domain_name,
reverse_zone, ntp=False, ca_configured=None):
self.fqdn = fqdn