Changeset 10980 in genesis for tools/gformat.py


Ignore:
Timestamp:
May 22, 2012, 9:06:40 PM (13 years ago)
Author:
rick
Message:

dnsmasq does not like the fact that we returning 10+ zones and refuses to
process them. Make the max DNS servers a bit smaller.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r10938 r10980  
    825825
    826826nameservers_cache = []
    827 def get_nameservers():
     827def get_nameservers(max_servers=None):
    828828  if nameservers_cache:
    829     return nameservers_cache
     829    return nameservers_cache[0:max_servers]
    830830
    831831  for host in get_hybridlist():
     
    838838      nameservers_cache.append((hostdump['masterip'], hostdump['autogen_realname']))
    839839
    840   return nameservers_cache
     840  return nameservers_cache[0:max_servers]
    841841
    842842
     
    13001300    dns_masters = ['siteview.wirelessleiden.nl', 'ns1.vanderzwet.net']
    13011301  else:
    1302     dns_masters = ['sunny.wleiden.net'] + ["%s.wleiden.net" % x[1] for x in get_nameservers()]
     1302    dns_masters = ['sunny.wleiden.net'] + ["%s.wleiden.net" % x[1] for x in get_nameservers(max_servers=3)]
    13031303
    13041304  details['master'] = dns_masters[0]
Note: See TracChangeset for help on using the changeset viewer.