diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-05-03 11:31:16 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-05-03 15:12:07 +0200 |
commit | af6d3347ba140e4f6f3c3410a554f9f4bfd2cfa6 (patch) | |
tree | 8e425b353fa6d625c242d960586c9c36d86fe900 /ipaserver/install/bindinstance.py | |
parent | ea5efc5dfabf089329aca723436b1dc68878283a (diff) | |
download | freeipa-af6d3347ba140e4f6f3c3410a554f9f4bfd2cfa6.tar.gz freeipa-af6d3347ba140e4f6f3c3410a554f9f4bfd2cfa6.tar.xz freeipa-af6d3347ba140e4f6f3c3410a554f9f4bfd2cfa6.zip |
NS records not updated by replica
When replica with DNS is installed, NS records for the managed zone
are not updated with the replica FQDN. The administrator then has
to do it manually to enroll the new DNS server to the zone.
This patch also removes the newly created NS records when the
replica is removed via ipa-replica-manage command.
https://fedorahosted.org/freeipa/ticket/1034
Diffstat (limited to 'ipaserver/install/bindinstance.py')
-rw-r--r-- | ipaserver/install/bindinstance.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py index e0056536..32086889 100644 --- a/ipaserver/install/bindinstance.py +++ b/ipaserver/install/bindinstance.py @@ -300,7 +300,9 @@ class BindInstance(service.Service): if not dns_container_exists(self.fqdn, self.suffix): self.step("adding DNS container", self.__setup_dns_container) - if not dns_zone_exists(self.domain): + if dns_zone_exists(self.domain): + self.step("adding NS record to the zone", self.__add_self_ns) + else: self.step("setting up our zone", self.__setup_zone) if self.create_reverse: self.step("setting up reverse zone", self.__setup_reverse_zone) @@ -362,6 +364,8 @@ class BindInstance(service.Service): zone = add_zone(self.domain, self.zonemgr, self.dns_backup, self.ip_address) + def __add_self_ns(self): + add_rr(self.domain, "@", "NS", api.env.host+'.', self.dns_backup, force=True) def __add_self(self): zone = self.domain @@ -472,6 +476,7 @@ class BindInstance(service.Service): ("_kpasswd._tcp", "SRV", "0 100 464 %s" % host), ("_kpasswd._udp", "SRV", "0 100 464 %s" % host), ("_ntp._udp", "SRV", "0 100 123 %s" % host), + ("@", "NS", fqdn+"."), ) for (record, type, rdata) in resource_records: @@ -485,6 +490,8 @@ class BindInstance(service.Service): rzone, record = get_reverse_zone(rdata) if dns_zone_exists(rzone): del_rr(rzone, record, "PTR", fqdn+".") + # remove also master NS record from the reverse zone + del_rr(rzone, "@", "NS", fqdn+".") def uninstall(self): |