From f21508978511d40a60fbdaaa786bcc96f99578d5 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Wed, 1 Jun 2011 14:51:06 +0200 Subject: Improve DNS zone creation When a new DNS zone is being created a local hostname is set as a nameserver of the new zone. However, when the zone is created during ipa-replica-prepare, the the current master/replica doesn't have to be an IPA server with DNS support. This would lead to DNS zones with incorrect NS records as they wouldn't point to a valid name server. Now, a list of all master servers with DNS support is retrieved during DNS zone creation and added as NS records for a new DNS zone. https://fedorahosted.org/freeipa/ticket/1261 --- install/tools/ipa-replica-prepare | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'install/tools') diff --git a/install/tools/ipa-replica-prepare b/install/tools/ipa-replica-prepare index cd13f5d93..8117bfcdd 100755 --- a/install/tools/ipa-replica-prepare +++ b/install/tools/ipa-replica-prepare @@ -425,8 +425,6 @@ def main(): ip_address = str(ip) ip_prefixlen = ip.prefixlen - ns_ip_address = resolve_host(api.env.host) - if ip.defaultnet: revzone = ip.reverse_dns if ip.version == 4: @@ -445,10 +443,10 @@ def main(): if prefix > 0: ip_prefixlen = prefix else: - add_reverse_zone(ip_address, ip_prefixlen, ns_ip_address) + add_reverse_zone(ip_address, ip_prefixlen) - zone = add_zone(domain, nsaddr=ns_ip_address) - add_fwd_rr(zone, name, ip_address) + add_zone(domain) + add_fwd_rr(domain, name, ip_address) add_ptr_rr(ip_address, ip_prefixlen, replica_fqdn) try: -- cgit