Skip to content

Commit f786420

Browse files
committed
Tighten up the timing in db.empty
stub and slave zones need to be overwritten with data from their master server in a reasonable timeframe. Drop all of the intervals in the db.empty SOA down to sub-minute values to speed convergence.
1 parent 22caf61 commit f786420

File tree

2 files changed

+33
-34
lines changed

2 files changed

+33
-34
lines changed

files/db.empty

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
$TTL 86400
22
@ IN SOA localhost. root.localhost. (
33
1 ; Serial
4-
604800 ; Refresh
5-
86400 ; Retry
6-
2419200 ; Expire
7-
86400 ) ; Negative Cache TTL
4+
60 ; Refresh
5+
30 ; Retry
6+
300 ; Expire
7+
10 ) ; Negative Cache TTL
88
;
99
@ IN NS localhost.

manifests/zone.pp

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
} else {
3939
$_source = 'puppet:///modules/bind/db.empty'
4040
}
41+
4142
file { "${cachedir}/${name}":
4243
ensure => directory,
4344
owner => $bind::params::bind_user,
@@ -46,41 +47,39 @@
4647
require => Package['bind'],
4748
}
4849

49-
unless $zone_type == 'stub' {
50-
file { "${cachedir}/${name}/${_domain}":
51-
ensure => present,
52-
owner => $bind::params::bind_user,
53-
group => $bind::params::bind_group,
54-
mode => '0644',
55-
replace => false,
56-
source => $_source,
57-
audit => [ content ],
58-
}
50+
file { "${cachedir}/${name}/${_domain}":
51+
ensure => present,
52+
owner => $bind::params::bind_user,
53+
group => $bind::params::bind_group,
54+
mode => '0644',
55+
replace => false,
56+
source => $_source,
57+
audit => [ content ],
58+
}
5959

60-
if $dnssec {
61-
exec { "dnssec-keygen-${name}":
62-
command => "/usr/local/bin/dnssec-init '${cachedir}' '${name}'\
63-
'${_domain}' '${key_directory}'",
64-
cwd => $cachedir,
65-
user => $bind::params::bind_user,
66-
creates => "${cachedir}/${name}/${_domain}.signed",
67-
timeout => 0, # crypto is hard
68-
require => [
69-
File['/usr/local/bin/dnssec-init'],
70-
File["${cachedir}/${name}/${_domain}"]
71-
],
72-
}
60+
if $dnssec {
61+
exec { "dnssec-keygen-${name}":
62+
command => "/usr/local/bin/dnssec-init '${cachedir}' '${name}'\
63+
'${_domain}' '${key_directory}'",
64+
cwd => $cachedir,
65+
user => $bind::params::bind_user,
66+
creates => "${cachedir}/${name}/${_domain}.signed",
67+
timeout => 0, # crypto is hard
68+
require => [
69+
File['/usr/local/bin/dnssec-init'],
70+
File["${cachedir}/${name}/${_domain}"]
71+
],
72+
}
7373

74-
file { "${cachedir}/${name}/${_domain}.signed":
75-
owner => $bind::params::bind_user,
76-
group => $bind::params::bind_group,
77-
mode => '0644',
78-
audit => [ content ],
79-
}
74+
file { "${cachedir}/${name}/${_domain}.signed":
75+
owner => $bind::params::bind_user,
76+
group => $bind::params::bind_group,
77+
mode => '0644',
78+
audit => [ content ],
8079
}
8180
}
8281
}
83-
82+
8483
file { "${bind::confdir}/zones/${name}.conf":
8584
ensure => present,
8685
owner => 'root',

0 commit comments

Comments
 (0)