Skip to content

Commit

Permalink
Remove obsolete database config options
Browse files Browse the repository at this point in the history
  • Loading branch information
smokris authored and klab-systems committed Feb 16, 2024
1 parent a0602d1 commit 9866159
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 140 deletions.
8 changes: 0 additions & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,7 @@
Optional[Array] $facts_blacklist = $puppetdb::params::facts_blacklist,
$gc_interval = $puppetdb::params::gc_interval,
$node_purge_gc_batch_limit = $puppetdb::params::node_purge_gc_batch_limit,
$log_slow_statements = $puppetdb::params::log_slow_statements,
$conn_max_age = $puppetdb::params::conn_max_age,
$conn_keep_alive = $puppetdb::params::conn_keep_alive,
$conn_lifetime = $puppetdb::params::conn_lifetime,
$puppetdb_package = $puppetdb::params::puppetdb_package,
$puppetdb_service = $puppetdb::params::puppetdb_service,
Expand All @@ -438,9 +436,7 @@
$manage_read_db_password = $puppetdb::params::manage_read_db_password,
$read_database_jdbc_ssl_properties = $puppetdb::params::read_database_jdbc_ssl_properties,
$read_database_validate = $puppetdb::params::read_database_validate,
$read_log_slow_statements = $puppetdb::params::read_log_slow_statements,
$read_conn_max_age = $puppetdb::params::read_conn_max_age,
$read_conn_keep_alive = $puppetdb::params::read_conn_keep_alive,
$read_conn_lifetime = $puppetdb::params::read_conn_lifetime,
$confdir = $puppetdb::params::confdir,
$vardir = $puppetdb::params::vardir,
Expand Down Expand Up @@ -499,9 +495,7 @@
facts_blacklist => $facts_blacklist,
gc_interval => $gc_interval,
node_purge_gc_batch_limit => $node_purge_gc_batch_limit,
log_slow_statements => $log_slow_statements,
conn_max_age => $conn_max_age,
conn_keep_alive => $conn_keep_alive,
conn_lifetime => $conn_lifetime,
puppetdb_package => $puppetdb_package,
puppetdb_service => $puppetdb_service,
Expand All @@ -519,9 +513,7 @@
manage_read_db_password => $manage_read_db_password,
read_database_jdbc_ssl_properties => $read_database_jdbc_ssl_properties,
read_database_validate => $read_database_validate,
read_log_slow_statements => $read_log_slow_statements,
read_conn_max_age => $read_conn_max_age,
read_conn_keep_alive => $read_conn_keep_alive,
read_conn_lifetime => $read_conn_lifetime,
puppetdb_user => $puppetdb_user,
puppetdb_group => $puppetdb_group,
Expand Down
4 changes: 0 additions & 4 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@
$gc_interval = '60'
$node_purge_gc_batch_limit = '25'

$log_slow_statements = '10'
$conn_max_age = '60'
$conn_keep_alive = '45'
$conn_lifetime = '0'

$max_threads = undef
Expand All @@ -70,9 +68,7 @@
$manage_read_db_password = true
$read_database_jdbc_ssl_properties = ''
$read_database_validate = true
$read_log_slow_statements = '10'
$read_conn_max_age = '60'
$read_conn_keep_alive = '45'
$read_conn_lifetime = '0'
$read_database_max_pool_size = undef

Expand Down
8 changes: 0 additions & 8 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,7 @@
Optional[Array] $facts_blacklist = $puppetdb::params::facts_blacklist,
$gc_interval = $puppetdb::params::gc_interval,
$node_purge_gc_batch_limit = $puppetdb::params::node_purge_gc_batch_limit,
$log_slow_statements = $puppetdb::params::log_slow_statements,
$conn_max_age = $puppetdb::params::conn_max_age,
$conn_keep_alive = $puppetdb::params::conn_keep_alive,
$conn_lifetime = $puppetdb::params::conn_lifetime,
$puppetdb_package = $puppetdb::params::puppetdb_package,
$puppetdb_service = $puppetdb::params::puppetdb_service,
Expand All @@ -396,9 +394,7 @@
$manage_read_db_password = $puppetdb::params::manage_read_db_password,
$read_database_jdbc_ssl_properties = $puppetdb::params::read_database_jdbc_ssl_properties,
$read_database_validate = $puppetdb::params::read_database_validate,
$read_log_slow_statements = $puppetdb::params::read_log_slow_statements,
$read_conn_max_age = $puppetdb::params::read_conn_max_age,
$read_conn_keep_alive = $puppetdb::params::read_conn_keep_alive,
$read_conn_lifetime = $puppetdb::params::read_conn_lifetime,
$confdir = $puppetdb::params::confdir,
$vardir = $puppetdb::params::vardir,
Expand Down Expand Up @@ -511,9 +507,7 @@
facts_blacklist => $facts_blacklist,
gc_interval => $gc_interval,
node_purge_gc_batch_limit => $node_purge_gc_batch_limit,
log_slow_statements => $log_slow_statements,
conn_max_age => $conn_max_age,
conn_keep_alive => $conn_keep_alive,
conn_lifetime => $conn_lifetime,
confdir => $confdir,
puppetdb_user => $puppetdb_user,
Expand Down Expand Up @@ -545,9 +539,7 @@
ssl_ca_cert_path => $ssl_ca_cert_path,
jdbc_ssl_properties => $read_database_jdbc_ssl_properties,
database_validate => $read_database_validate,
log_slow_statements => $read_log_slow_statements,
conn_max_age => $read_conn_max_age,
conn_keep_alive => $read_conn_keep_alive,
conn_lifetime => $read_conn_lifetime,
confdir => $confdir,
puppetdb_user => $puppetdb_user,
Expand Down
25 changes: 0 additions & 25 deletions manifests/server/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
$facts_blacklist = $puppetdb::params::facts_blacklist,
$gc_interval = $puppetdb::params::gc_interval,
$node_purge_gc_batch_limit = $puppetdb::params::node_purge_gc_batch_limit,
$log_slow_statements = $puppetdb::params::log_slow_statements,
$conn_max_age = $puppetdb::params::conn_max_age,
$conn_keep_alive = $puppetdb::params::conn_keep_alive,
$conn_lifetime = $puppetdb::params::conn_lifetime,
$confdir = $puppetdb::params::confdir,
$puppetdb_user = $puppetdb::params::puppetdb_user,
Expand Down Expand Up @@ -70,9 +68,6 @@
require => $ini_setting_require,
}

$classname = 'org.postgresql.Driver'
$subprotocol = 'postgresql'

if !empty($jdbc_ssl_properties) {
$database_suffix = $jdbc_ssl_properties
}
Expand Down Expand Up @@ -109,16 +104,6 @@
}
}

ini_setting { 'puppetdb_classname':
setting => 'classname',
value => $classname,
}

ini_setting { 'puppetdb_subprotocol':
setting => 'subprotocol',
value => $subprotocol,
}

ini_setting { 'puppetdb_pgs':
setting => 'syntax_pgs',
value => true,
Expand Down Expand Up @@ -154,21 +139,11 @@
value => $report_ttl,
}

ini_setting { 'puppetdb_log_slow_statements':
setting => 'log-slow-statements',
value => $log_slow_statements,
}

ini_setting { 'puppetdb_conn_max_age':
setting => 'conn-max-age',
value => $conn_max_age,
}

ini_setting { 'puppetdb_conn_keep_alive':
setting => 'conn-keep-alive',
value => $conn_keep_alive,
}

ini_setting { 'puppetdb_conn_lifetime':
setting => 'conn-lifetime',
value => $conn_lifetime,
Expand Down
15 changes: 0 additions & 15 deletions manifests/server/read_database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
$manage_db_password = $puppetdb::params::manage_read_db_password,
$jdbc_ssl_properties = $puppetdb::params::read_database_jdbc_ssl_properties,
$database_validate = $puppetdb::params::read_database_validate,
$log_slow_statements = $puppetdb::params::read_log_slow_statements,
$conn_max_age = $puppetdb::params::read_conn_max_age,
$conn_keep_alive = $puppetdb::params::read_conn_keep_alive,
$conn_lifetime = $puppetdb::params::read_conn_lifetime,
$confdir = $puppetdb::params::confdir,
$puppetdb_user = $puppetdb::params::puppetdb_user,
Expand Down Expand Up @@ -64,9 +62,6 @@
require => $ini_setting_require,
}

$classname = 'org.postgresql.Driver'
$subprotocol = 'postgresql'

if !empty($jdbc_ssl_properties) {
$database_suffix = $jdbc_ssl_properties
}
Expand Down Expand Up @@ -123,21 +118,11 @@
value => $subname,
}

ini_setting { 'puppetdb_read_log_slow_statements':
setting => 'log-slow-statements',
value => $log_slow_statements,
}

ini_setting { 'puppetdb_read_conn_max_age':
setting => 'conn-max-age',
value => $conn_max_age,
}

ini_setting { 'puppetdb_read_conn_keep_alive':
setting => 'conn-keep-alive',
value => $conn_keep_alive,
}

ini_setting { 'puppetdb_read_conn_lifetime':
setting => 'conn-lifetime',
value => $conn_lifetime,
Expand Down
40 changes: 0 additions & 40 deletions spec/unit/classes/server/database_ini_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,6 @@
'value' => 'puppetdb',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_classname')
.with(
'ensure' => 'present',
'path' => "#{pdbconfdir}/database.ini",
'section' => 'database',
'setting' => 'classname',
'value' => 'org.postgresql.Driver',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_subprotocol')
.with(
'ensure' => 'present',
'path' => "#{pdbconfdir}/database.ini",
'section' => 'database',
'setting' => 'subprotocol',
'value' => 'postgresql',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_pgs')
.with(
Expand Down Expand Up @@ -135,16 +115,6 @@
'value' => '14d',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_log_slow_statements')
.with(
'ensure' => 'present',
'path' => "#{pdbconfdir}/database.ini",
'section' => 'database',
'setting' => 'log-slow-statements',
'value' => 10,
)
}
it {
is_expected.to contain_ini_setting('puppetdb_conn_max_age')
.with(
Expand All @@ -155,16 +125,6 @@
'value' => '60',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_conn_keep_alive')
.with(
'ensure' => 'present',
'path' => "#{pdbconfdir}/database.ini",
'section' => 'database',
'setting' => 'conn-keep-alive',
'value' => '45',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_conn_lifetime')
.with(
Expand Down
40 changes: 0 additions & 40 deletions spec/unit/classes/server/read_database_ini_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,6 @@
'value' => 'puppetdb-read',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_read_classname')
.with(
'ensure' => 'present',
'path' => '/etc/puppetlabs/puppetdb/conf.d/read_database.ini',
'section' => 'read-database',
'setting' => 'classname',
'value' => 'org.postgresql.Driver',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_read_subprotocol')
.with(
'ensure' => 'present',
'path' => '/etc/puppetlabs/puppetdb/conf.d/read_database.ini',
'section' => 'read-database',
'setting' => 'subprotocol',
'value' => 'postgresql',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_read_pgs')
.with(
Expand All @@ -85,16 +65,6 @@
'value' => '//puppetdb:5432/puppetdb',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_read_log_slow_statements')
.with(
'ensure' => 'present',
'path' => '/etc/puppetlabs/puppetdb/conf.d/read_database.ini',
'section' => 'read-database',
'setting' => 'log-slow-statements',
'value' => 10,
)
}
it {
is_expected.to contain_ini_setting('puppetdb_read_conn_max_age')
.with(
Expand All @@ -105,16 +75,6 @@
'value' => '60',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_read_conn_keep_alive')
.with(
'ensure' => 'present',
'path' => '/etc/puppetlabs/puppetdb/conf.d/read_database.ini',
'section' => 'read-database',
'setting' => 'conn-keep-alive',
'value' => '45',
)
}
it {
is_expected.to contain_ini_setting('puppetdb_read_conn_lifetime')
.with(
Expand Down

0 comments on commit 9866159

Please sign in to comment.