summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/bindinstance.py
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-11-09 09:25:43 +0100
committerMartin Kosek <mkosek@redhat.com>2012-11-09 14:21:34 +0100
commit215fcdfd5e9e0cd26cf5d60254343e11c9148a1c (patch)
treea1dd5844ecf4127fabc1b5f4325632e0a7555d18 /ipaserver/install/bindinstance.py
parentb204881ab989aa8287897711358189b687fb3996 (diff)
downloadfreeipa-215fcdfd5e9e0cd26cf5d60254343e11c9148a1c.tar.gz
freeipa-215fcdfd5e9e0cd26cf5d60254343e11c9148a1c.tar.xz
freeipa-215fcdfd5e9e0cd26cf5d60254343e11c9148a1c.zip
Do not require resolvable nameserver in DNS install
As named.conf and bind-dyndb-plugin is not set up yet during DNS configuration phase, IPA hostname (i.e. the nameserver) should not be required be to resolvable in this phase. https://fedorahosted.org/freeipa/ticket/3248
Diffstat (limited to 'ipaserver/install/bindinstance.py')
-rw-r--r--ipaserver/install/bindinstance.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index ecd697d42..8a77edfa0 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -564,7 +564,6 @@ class BindInstance(service.Service):
def __setup_zone(self):
nameserver_ip_address = self.ip_address
- force = False
if not self.host_in_default_domain():
# add DNS domain for host first
root_logger.debug("Host domain (%s) is different from DNS domain (%s)!" \
@@ -572,15 +571,13 @@ class BindInstance(service.Service):
root_logger.debug("Add DNS zone for host first.")
add_zone(self.host_domain, self.zonemgr, dns_backup=self.dns_backup,
- ns_hostname=api.env.host, ns_ip_address=self.ip_address)
+ ns_hostname=api.env.host, ns_ip_address=self.ip_address, force=True)
# Nameserver is in self.host_domain, no forward record added to self.domain
nameserver_ip_address = None
- # Set force=True in case nameserver added in previous step
- # is not resolvable yet
- force = True
+ # Always use force=True as named is not set up yet
add_zone(self.domain, self.zonemgr, dns_backup=self.dns_backup,
ns_hostname=api.env.host, ns_ip_address=nameserver_ip_address,
- force=force)
+ force=True)
def __add_self_ns(self):
add_ns_rr(self.domain, api.env.host, self.dns_backup, force=True)
@@ -612,8 +609,9 @@ class BindInstance(service.Service):
add_ptr_rr(self.reverse_zone, self.ip_address, self.fqdn)
def __setup_reverse_zone(self):
+ # Always use force=True as named is not set up yet
add_zone(self.reverse_zone, self.zonemgr, ns_hostname=api.env.host,
- dns_backup=self.dns_backup)
+ dns_backup=self.dns_backup, force=True)
def __setup_principal(self):
dns_principal = "DNS/" + self.fqdn + "@" + self.realm