mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
parent
ea5efc5dfa
commit
af6d3347ba
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user