File tree 2 files changed +26
-0
lines changed
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 30
30
$other_tables = ' -t producers -t resource_params -t resource_params_cache"'
31
31
$reports_table = ' -t reports"'
32
32
$resource_events_table = ' -t resource_events"'
33
+ $catalog_inputs_table = ' -t catalog_inputs"'
33
34
34
35
Cron {
35
36
ensure => $ensure_cron ,
58
59
command => " ${repack} ${repack_jobs} ${other_tables} > ${logging_directory} /other_repack.log 2>&1" ,
59
60
}
60
61
62
+ if versioncmp($facts [' pe_server_version' ], ' 2019.8.0' ) >= 0 {
63
+ cron { ' pg_repack catalog_inputs tables' :
64
+ monthday => 5,
65
+ hour => 5,
66
+ minute => 30,
67
+ command => " ${repack} ${repack_jobs} ${catalog_inputs_table} > ${logging_directory} /catalog_inputs_repack.log 2>&1" ,
68
+ }
69
+ }
70
+ else {
71
+ cron { ' pg_repack catalog_inputs tables' :
72
+ ensure => ' absent' ,
73
+ }
74
+ }
75
+
61
76
if versioncmp($facts [' pe_server_version' ], ' 2019.7.0' ) < 0 {
62
77
cron { ' pg_repack reports tables' :
63
78
monthday => 10,
Original file line number Diff line number Diff line change 71
71
' -d pe-puppetdb --jobs 2 -t resource_events" > /var/log/puppetlabs/pe_databases_cron/resource_events_repack.log 2>&1' )
72
72
}
73
73
end
74
+ context 'on >= PE 2019.8.0' do
75
+ before :each do
76
+ facts [ 'pe_server_version' ] = '2019.8.0'
77
+ facts [ 'pe_postgresql_info' ] [ 'installed_server_version' ] = 11
78
+ end
79
+ it {
80
+ is_expected . to contain_cron ( 'pg_repack catalog_inputs tables' )
81
+ . with_command ( 'su - pe-postgres -s /bin/bash -c "/opt/puppetlabs/server/apps/postgresql/11/bin/pg_repack' \
82
+ ' -d pe-puppetdb --jobs 2 -t catalog_inputs" > /var/log/puppetlabs/pe_databases_cron/catalog_inputs_repack.log 2>&1' )
83
+ }
84
+ end
74
85
end
75
86
end
76
87
end
You can’t perform that action at this time.
0 commit comments