Skip to content

Commit 9866159

Browse files
smokrisklab-systems
authored andcommitted
Remove obsolete database config options
1 parent a0602d1 commit 9866159

File tree

7 files changed

+0
-140
lines changed

7 files changed

+0
-140
lines changed

manifests/init.pp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,7 @@
420420
Optional[Array] $facts_blacklist = $puppetdb::params::facts_blacklist,
421421
$gc_interval = $puppetdb::params::gc_interval,
422422
$node_purge_gc_batch_limit = $puppetdb::params::node_purge_gc_batch_limit,
423-
$log_slow_statements = $puppetdb::params::log_slow_statements,
424423
$conn_max_age = $puppetdb::params::conn_max_age,
425-
$conn_keep_alive = $puppetdb::params::conn_keep_alive,
426424
$conn_lifetime = $puppetdb::params::conn_lifetime,
427425
$puppetdb_package = $puppetdb::params::puppetdb_package,
428426
$puppetdb_service = $puppetdb::params::puppetdb_service,
@@ -438,9 +436,7 @@
438436
$manage_read_db_password = $puppetdb::params::manage_read_db_password,
439437
$read_database_jdbc_ssl_properties = $puppetdb::params::read_database_jdbc_ssl_properties,
440438
$read_database_validate = $puppetdb::params::read_database_validate,
441-
$read_log_slow_statements = $puppetdb::params::read_log_slow_statements,
442439
$read_conn_max_age = $puppetdb::params::read_conn_max_age,
443-
$read_conn_keep_alive = $puppetdb::params::read_conn_keep_alive,
444440
$read_conn_lifetime = $puppetdb::params::read_conn_lifetime,
445441
$confdir = $puppetdb::params::confdir,
446442
$vardir = $puppetdb::params::vardir,
@@ -499,9 +495,7 @@
499495
facts_blacklist => $facts_blacklist,
500496
gc_interval => $gc_interval,
501497
node_purge_gc_batch_limit => $node_purge_gc_batch_limit,
502-
log_slow_statements => $log_slow_statements,
503498
conn_max_age => $conn_max_age,
504-
conn_keep_alive => $conn_keep_alive,
505499
conn_lifetime => $conn_lifetime,
506500
puppetdb_package => $puppetdb_package,
507501
puppetdb_service => $puppetdb_service,
@@ -519,9 +513,7 @@
519513
manage_read_db_password => $manage_read_db_password,
520514
read_database_jdbc_ssl_properties => $read_database_jdbc_ssl_properties,
521515
read_database_validate => $read_database_validate,
522-
read_log_slow_statements => $read_log_slow_statements,
523516
read_conn_max_age => $read_conn_max_age,
524-
read_conn_keep_alive => $read_conn_keep_alive,
525517
read_conn_lifetime => $read_conn_lifetime,
526518
puppetdb_user => $puppetdb_user,
527519
puppetdb_group => $puppetdb_group,

manifests/params.pp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353
$gc_interval = '60'
5454
$node_purge_gc_batch_limit = '25'
5555

56-
$log_slow_statements = '10'
5756
$conn_max_age = '60'
58-
$conn_keep_alive = '45'
5957
$conn_lifetime = '0'
6058

6159
$max_threads = undef
@@ -70,9 +68,7 @@
7068
$manage_read_db_password = true
7169
$read_database_jdbc_ssl_properties = ''
7270
$read_database_validate = true
73-
$read_log_slow_statements = '10'
7471
$read_conn_max_age = '60'
75-
$read_conn_keep_alive = '45'
7672
$read_conn_lifetime = '0'
7773
$read_database_max_pool_size = undef
7874

manifests/server.pp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,7 @@
379379
Optional[Array] $facts_blacklist = $puppetdb::params::facts_blacklist,
380380
$gc_interval = $puppetdb::params::gc_interval,
381381
$node_purge_gc_batch_limit = $puppetdb::params::node_purge_gc_batch_limit,
382-
$log_slow_statements = $puppetdb::params::log_slow_statements,
383382
$conn_max_age = $puppetdb::params::conn_max_age,
384-
$conn_keep_alive = $puppetdb::params::conn_keep_alive,
385383
$conn_lifetime = $puppetdb::params::conn_lifetime,
386384
$puppetdb_package = $puppetdb::params::puppetdb_package,
387385
$puppetdb_service = $puppetdb::params::puppetdb_service,
@@ -396,9 +394,7 @@
396394
$manage_read_db_password = $puppetdb::params::manage_read_db_password,
397395
$read_database_jdbc_ssl_properties = $puppetdb::params::read_database_jdbc_ssl_properties,
398396
$read_database_validate = $puppetdb::params::read_database_validate,
399-
$read_log_slow_statements = $puppetdb::params::read_log_slow_statements,
400397
$read_conn_max_age = $puppetdb::params::read_conn_max_age,
401-
$read_conn_keep_alive = $puppetdb::params::read_conn_keep_alive,
402398
$read_conn_lifetime = $puppetdb::params::read_conn_lifetime,
403399
$confdir = $puppetdb::params::confdir,
404400
$vardir = $puppetdb::params::vardir,
@@ -511,9 +507,7 @@
511507
facts_blacklist => $facts_blacklist,
512508
gc_interval => $gc_interval,
513509
node_purge_gc_batch_limit => $node_purge_gc_batch_limit,
514-
log_slow_statements => $log_slow_statements,
515510
conn_max_age => $conn_max_age,
516-
conn_keep_alive => $conn_keep_alive,
517511
conn_lifetime => $conn_lifetime,
518512
confdir => $confdir,
519513
puppetdb_user => $puppetdb_user,
@@ -545,9 +539,7 @@
545539
ssl_ca_cert_path => $ssl_ca_cert_path,
546540
jdbc_ssl_properties => $read_database_jdbc_ssl_properties,
547541
database_validate => $read_database_validate,
548-
log_slow_statements => $read_log_slow_statements,
549542
conn_max_age => $read_conn_max_age,
550-
conn_keep_alive => $read_conn_keep_alive,
551543
conn_lifetime => $read_conn_lifetime,
552544
confdir => $confdir,
553545
puppetdb_user => $puppetdb_user,

manifests/server/database.pp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
$facts_blacklist = $puppetdb::params::facts_blacklist,
1717
$gc_interval = $puppetdb::params::gc_interval,
1818
$node_purge_gc_batch_limit = $puppetdb::params::node_purge_gc_batch_limit,
19-
$log_slow_statements = $puppetdb::params::log_slow_statements,
2019
$conn_max_age = $puppetdb::params::conn_max_age,
21-
$conn_keep_alive = $puppetdb::params::conn_keep_alive,
2220
$conn_lifetime = $puppetdb::params::conn_lifetime,
2321
$confdir = $puppetdb::params::confdir,
2422
$puppetdb_user = $puppetdb::params::puppetdb_user,
@@ -70,9 +68,6 @@
7068
require => $ini_setting_require,
7169
}
7270

73-
$classname = 'org.postgresql.Driver'
74-
$subprotocol = 'postgresql'
75-
7671
if !empty($jdbc_ssl_properties) {
7772
$database_suffix = $jdbc_ssl_properties
7873
}
@@ -109,16 +104,6 @@
109104
}
110105
}
111106

112-
ini_setting { 'puppetdb_classname':
113-
setting => 'classname',
114-
value => $classname,
115-
}
116-
117-
ini_setting { 'puppetdb_subprotocol':
118-
setting => 'subprotocol',
119-
value => $subprotocol,
120-
}
121-
122107
ini_setting { 'puppetdb_pgs':
123108
setting => 'syntax_pgs',
124109
value => true,
@@ -154,21 +139,11 @@
154139
value => $report_ttl,
155140
}
156141

157-
ini_setting { 'puppetdb_log_slow_statements':
158-
setting => 'log-slow-statements',
159-
value => $log_slow_statements,
160-
}
161-
162142
ini_setting { 'puppetdb_conn_max_age':
163143
setting => 'conn-max-age',
164144
value => $conn_max_age,
165145
}
166146

167-
ini_setting { 'puppetdb_conn_keep_alive':
168-
setting => 'conn-keep-alive',
169-
value => $conn_keep_alive,
170-
}
171-
172147
ini_setting { 'puppetdb_conn_lifetime':
173148
setting => 'conn-lifetime',
174149
value => $conn_lifetime,

manifests/server/read_database.pp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
$manage_db_password = $puppetdb::params::manage_read_db_password,
1111
$jdbc_ssl_properties = $puppetdb::params::read_database_jdbc_ssl_properties,
1212
$database_validate = $puppetdb::params::read_database_validate,
13-
$log_slow_statements = $puppetdb::params::read_log_slow_statements,
1413
$conn_max_age = $puppetdb::params::read_conn_max_age,
15-
$conn_keep_alive = $puppetdb::params::read_conn_keep_alive,
1614
$conn_lifetime = $puppetdb::params::read_conn_lifetime,
1715
$confdir = $puppetdb::params::confdir,
1816
$puppetdb_user = $puppetdb::params::puppetdb_user,
@@ -64,9 +62,6 @@
6462
require => $ini_setting_require,
6563
}
6664

67-
$classname = 'org.postgresql.Driver'
68-
$subprotocol = 'postgresql'
69-
7065
if !empty($jdbc_ssl_properties) {
7166
$database_suffix = $jdbc_ssl_properties
7267
}
@@ -123,21 +118,11 @@
123118
value => $subname,
124119
}
125120

126-
ini_setting { 'puppetdb_read_log_slow_statements':
127-
setting => 'log-slow-statements',
128-
value => $log_slow_statements,
129-
}
130-
131121
ini_setting { 'puppetdb_read_conn_max_age':
132122
setting => 'conn-max-age',
133123
value => $conn_max_age,
134124
}
135125

136-
ini_setting { 'puppetdb_read_conn_keep_alive':
137-
setting => 'conn-keep-alive',
138-
value => $conn_keep_alive,
139-
}
140-
141126
ini_setting { 'puppetdb_read_conn_lifetime':
142127
setting => 'conn-lifetime',
143128
value => $conn_lifetime,

spec/unit/classes/server/database_ini_spec.rb

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,6 @@
4545
'value' => 'puppetdb',
4646
)
4747
}
48-
it {
49-
is_expected.to contain_ini_setting('puppetdb_classname')
50-
.with(
51-
'ensure' => 'present',
52-
'path' => "#{pdbconfdir}/database.ini",
53-
'section' => 'database',
54-
'setting' => 'classname',
55-
'value' => 'org.postgresql.Driver',
56-
)
57-
}
58-
it {
59-
is_expected.to contain_ini_setting('puppetdb_subprotocol')
60-
.with(
61-
'ensure' => 'present',
62-
'path' => "#{pdbconfdir}/database.ini",
63-
'section' => 'database',
64-
'setting' => 'subprotocol',
65-
'value' => 'postgresql',
66-
)
67-
}
6848
it {
6949
is_expected.to contain_ini_setting('puppetdb_pgs')
7050
.with(
@@ -135,16 +115,6 @@
135115
'value' => '14d',
136116
)
137117
}
138-
it {
139-
is_expected.to contain_ini_setting('puppetdb_log_slow_statements')
140-
.with(
141-
'ensure' => 'present',
142-
'path' => "#{pdbconfdir}/database.ini",
143-
'section' => 'database',
144-
'setting' => 'log-slow-statements',
145-
'value' => 10,
146-
)
147-
}
148118
it {
149119
is_expected.to contain_ini_setting('puppetdb_conn_max_age')
150120
.with(
@@ -155,16 +125,6 @@
155125
'value' => '60',
156126
)
157127
}
158-
it {
159-
is_expected.to contain_ini_setting('puppetdb_conn_keep_alive')
160-
.with(
161-
'ensure' => 'present',
162-
'path' => "#{pdbconfdir}/database.ini",
163-
'section' => 'database',
164-
'setting' => 'conn-keep-alive',
165-
'value' => '45',
166-
)
167-
}
168128
it {
169129
is_expected.to contain_ini_setting('puppetdb_conn_lifetime')
170130
.with(

spec/unit/classes/server/read_database_ini_spec.rb

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,6 @@
4545
'value' => 'puppetdb-read',
4646
)
4747
}
48-
it {
49-
is_expected.to contain_ini_setting('puppetdb_read_classname')
50-
.with(
51-
'ensure' => 'present',
52-
'path' => '/etc/puppetlabs/puppetdb/conf.d/read_database.ini',
53-
'section' => 'read-database',
54-
'setting' => 'classname',
55-
'value' => 'org.postgresql.Driver',
56-
)
57-
}
58-
it {
59-
is_expected.to contain_ini_setting('puppetdb_read_subprotocol')
60-
.with(
61-
'ensure' => 'present',
62-
'path' => '/etc/puppetlabs/puppetdb/conf.d/read_database.ini',
63-
'section' => 'read-database',
64-
'setting' => 'subprotocol',
65-
'value' => 'postgresql',
66-
)
67-
}
6848
it {
6949
is_expected.to contain_ini_setting('puppetdb_read_pgs')
7050
.with(
@@ -85,16 +65,6 @@
8565
'value' => '//puppetdb:5432/puppetdb',
8666
)
8767
}
88-
it {
89-
is_expected.to contain_ini_setting('puppetdb_read_log_slow_statements')
90-
.with(
91-
'ensure' => 'present',
92-
'path' => '/etc/puppetlabs/puppetdb/conf.d/read_database.ini',
93-
'section' => 'read-database',
94-
'setting' => 'log-slow-statements',
95-
'value' => 10,
96-
)
97-
}
9868
it {
9969
is_expected.to contain_ini_setting('puppetdb_read_conn_max_age')
10070
.with(
@@ -105,16 +75,6 @@
10575
'value' => '60',
10676
)
10777
}
108-
it {
109-
is_expected.to contain_ini_setting('puppetdb_read_conn_keep_alive')
110-
.with(
111-
'ensure' => 'present',
112-
'path' => '/etc/puppetlabs/puppetdb/conf.d/read_database.ini',
113-
'section' => 'read-database',
114-
'setting' => 'conn-keep-alive',
115-
'value' => '45',
116-
)
117-
}
11878
it {
11979
is_expected.to contain_ini_setting('puppetdb_read_conn_lifetime')
12080
.with(

0 commit comments

Comments
 (0)