Skip to content

Commit a7535f0

Browse files
author
Russell Mull
committed
(PDB-3318) Better defaults for node-ttl, node-purge-ttl
Default node-ttl to 7 days and node-purge-ttl to 14 days. This helps keep cruft from piling up in the database in the default configuration, without user intervention.
1 parent f2f9a89 commit a7535f0

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

manifests/params.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
$database_max_pool_size = undef
3333

3434
# These settings manage the various auto-deactivation and auto-purge settings
35-
$node_ttl = '0s'
36-
$node_purge_ttl = '0s'
35+
$node_ttl = '7d'
36+
$node_purge_ttl = '14d'
3737
$report_ttl = '14d'
3838

3939
$gc_interval = '60'

spec/unit/classes/server/database_ini_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@
7676
'path' => '/etc/puppetlabs/puppetdb/conf.d/database.ini',
7777
'section' => 'database',
7878
'setting' => 'node-ttl',
79-
'value' => '0s'
79+
'value' => '7d'
8080
)}
8181
it { should contain_ini_setting('puppetdb_node_purge_ttl').
8282
with(
8383
'ensure' => 'present',
8484
'path' => '/etc/puppetlabs/puppetdb/conf.d/database.ini',
8585
'section' => 'database',
8686
'setting' => 'node-purge-ttl',
87-
'value' => '0s'
87+
'value' => '14d'
8888
)}
8989
it { should contain_ini_setting('puppetdb_report_ttl').
9090
with(
@@ -185,15 +185,15 @@
185185
'path' => '/etc/puppetdb/conf.d/database.ini',
186186
'section' => 'database',
187187
'setting' => 'node-ttl',
188-
'value' => '0s'
188+
'value' => '7d'
189189
)}
190190
it { should contain_ini_setting('puppetdb_node_purge_ttl').
191191
with(
192192
'ensure' => 'present',
193193
'path' => '/etc/puppetdb/conf.d/database.ini',
194194
'section' => 'database',
195195
'setting' => 'node-purge-ttl',
196-
'value' => '0s'
196+
'value' => '14d'
197197
)}
198198
it { should contain_ini_setting('puppetdb_report_ttl').
199199
with(

0 commit comments

Comments
 (0)