Skip to content

Commit 344d5fa

Browse files
committed
Fix scope of disable_maintenance param
Prior to this commit, the disable_maintenance param was part of a maintenance class that had been removed. This commit fixes that and moves the lookup to the param definition.
1 parent 25c1d4e commit 344d5fa

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ You can configure the retention policy by setting `pe_databases::backup::retenti
6868
The maintenance cron jobs will perform a `VACUUM FULL` on various `pe-puppetdb` tables to keep them lean and fast.
6969
A `VACUUM FULL` is a blocking operation and you will see the PuppetDB command queue grow while the cron jobs run.
7070
The blocking should be short lived and the PuppetDB command queue should work itself down after, however, if for some reason you experience issues you can disable the maintenance cron jobs.
71-
You can do so by setting `pe_databases::maintenance::disable_maintenance: true` in your hieradata.
71+
You can do so by setting `pe_databases::disable_maintenance: true` in your hieradata.
7272

7373
With PE 2018.1.7 and 2019.0.2 and newer, this module uses `pg_repack` which does not block.
7474

manifests/init.pp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
class pe_databases (
66
Boolean $manage_database_backups = false,
7+
# Manage the inclusion of the pg_repack class
78
Boolean $manage_database_maintenance = true,
9+
# Manage the state of the maintenance tasks, i.e. systemd services and timers
10+
Boolean $disable_maintenance = lookup('pe_databases::disable_maintenance', {'default_value' => false}),
811
Boolean $manage_postgresql_settings = true,
912
Boolean $manage_table_settings = true,
1013
String $install_dir = '/opt/puppetlabs/pe_databases',
@@ -30,7 +33,7 @@
3033
if $facts.dig('pe_databases', 'have_systemd') {
3134
if $manage_database_maintenance and (versioncmp('2019.0.2', $facts['pe_server_version']) <= 0) {
3235
class {'pe_databases::pg_repack':
33-
disable_maintenance => lookup('pe_databases::maintenance::disable_maintenance', {'default_value' => false}),
36+
disable_maintenance => $disable_maintenance,
3437
}
3538
if $manage_table_settings {
3639
# This is to provide for situations, like PE XL,

0 commit comments

Comments
 (0)