summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-06-09 12:33:09 +0200
committerRob Crittenden <rcritten@redhat.com>2011-06-19 23:36:28 -0400
commitceb7c9cf4b4f72df36891ed77f79a3bc2fb2fde7 (patch)
treec968252db247088a3beaf82887667ec799bd68dd /ipaserver
parent0399c140d95688b99dc99711f505c39b2d7983f1 (diff)
downloadfreeipa-ceb7c9cf4b4f72df36891ed77f79a3bc2fb2fde7.zip
freeipa-ceb7c9cf4b4f72df36891ed77f79a3bc2fb2fde7.tar.gz
freeipa-ceb7c9cf4b4f72df36891ed77f79a3bc2fb2fde7.tar.xz
DNS installation fails when domain and host domain mismatch
Create DNS domain for IPA server hostname first so that it's forward record can be added. This results in 2 forward DNS zones created when server hostname doesn't equal server domain. https://fedorahosted.org/freeipa/ticket/1194
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/bindinstance.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index 2f897b4..8981c2f 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -308,6 +308,7 @@ class BindInstance(service.Service):
self.domain = domain_name
self.forwarders = forwarders
self.host = fqdn.split(".")[0]
+ self.host_domain = '.'.join(fqdn.split(".")[1:])
self.suffix = util.realm_to_suffix(self.realm)
self.ntp = ntp
self.create_reverse = create_reverse
@@ -402,6 +403,14 @@ class BindInstance(service.Service):
self._ldap_mod("dns.ldif", self.sub_dict)
def __setup_zone(self):
+ if self.host_domain != self.domain:
+ # add DNS domain for host first
+ logging.debug("Host domain (%s) is different from DNS domain (%s)!" \
+ % (self.host_domain, self.domain))
+ logging.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)
add_zone(self.domain, self.zonemgr, dns_backup=self.dns_backup,
ns_hostname=api.env.host, ns_ip_address=self.ip_address)