Skip to content

Commit

Permalink
desginate: simplify sample pool
Browse files Browse the repository at this point in the history
in crowbar's world the dns-master is the master of all and slaves
forward all queries to dns-master. Under such a configuration there is
no need to query other nameservers as they still forward the query to
dns-master. So designate can just verify on one nameserver(dns-master)
and dns-master will take care of passing that info to all slaves.

Same goes for also_notifies: dns-master will notify all slaves in case
of either zone or recordset is updated/deleted.

this also further simplifies the designate pool config reducing  the
time required to create zone and recordsets.

This change is not really required but only eases out the config from
an admin perspective.

Also having multiple nameservers confuses designate in some cases as
according to these nameserver designate is not authoritative of some
zones and recordsets.
  • Loading branch information
Sumit Jamgade committed Apr 15, 2019
1 parent c55cdbc commit 315171a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions chef/cookbooks/designate/recipes/mdns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

dns = node_search_with_cache("roles:dns-server").first
dnsmaster = dns[:dns][:master_ip]
dnsslaves = dns[:dns][:slave_ips].to_a
dnsservers = [dnsmaster] + dnsslaves

network_settings = DesignateHelper.network_settings(node)

Expand All @@ -36,12 +34,12 @@
# non-hardcoded is high enough
pools = [{
"name" => "default-bind",
"description" => "Default BIND9 Pool",
"description" => "Sample Pool for designate (relies only 1 dns-master)",
"id" => "794ccc2c-d751-44fe-b57f-8894c9f5c842",
"attributes" => {},
"ns_records" => [{ "hostname" => "#{dns[:fqdn]}.", "priority" => 1 }],
"nameservers" => dnsservers.map { |ip| { "host" => ip, "port" => 53 } },
"also_notifies" => dnsslaves.map { |ip| { "host" => ip, "port" => 53 } },
"nameservers" => [{ "host" => dnsmaster, "port" => 53 }],
"also_notifies" => [],
"targets" => [{
"type" => "bind9",
"description" => "BIND9 Server 1",
Expand Down

0 comments on commit 315171a

Please sign in to comment.