File tree Expand file tree Collapse file tree 2 files changed +7
-20
lines changed Expand file tree Collapse file tree 2 files changed +7
-20
lines changed Original file line number Diff line number Diff line change 2626 $repack_jobs = " --jobs ${jobs} "
2727
2828 $facts_tables = ' -t factsets -t fact_paths"'
29- $catalogs_tables = ' -t catalogs -t catalog_resources -t edges -t certnames"'
29+ $catalogs_tables = versioncmp($facts [' pe_server_version' ], ' 2019.8.1' ) ? {
30+ 1 => ' -t catalogs -t catalog_resources -t catalog_inputs -t edges -t certnames"' ,
31+ default => ' -t catalogs -t catalog_resources -t edges -t certnames"' }
3032 $other_tables = ' -t producers -t resource_params -t resource_params_cache"'
3133 $reports_table = ' -t reports"'
3234 $resource_events_table = ' -t resource_events"'
33- $catalog_inputs_table = ' -t catalog_inputs"'
3435
3536 Cron {
3637 ensure => $ensure_cron ,
5960 command => " ${repack} ${repack_jobs} ${other_tables} > ${logging_directory} /other_repack.log 2>&1" ,
6061 }
6162
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-
7663 if versioncmp($facts [' pe_server_version' ], ' 2019.7.0' ) < 0 {
7764 cron { ' pg_repack reports tables' :
7865 monthday => 10,
Original file line number Diff line number Diff line change 7171 ' -d pe-puppetdb --jobs 2 -t resource_events" > /var/log/puppetlabs/pe_databases_cron/resource_events_repack.log 2>&1' )
7272 }
7373 end
74- context 'on >= PE 2019.8.0 ' do
74+ context 'on >= PE 2019.8.2 ' do
7575 before :each do
76- facts [ 'pe_server_version' ] = '2019.8.0 '
76+ facts [ 'pe_server_version' ] = '2019.8.2 '
7777 facts [ 'pe_postgresql_info' ] [ 'installed_server_version' ] = 11
7878 end
7979 it {
80- is_expected . to contain_cron ( 'pg_repack catalog_inputs tables' )
80+ is_expected . to contain_cron ( 'pg_repack catalogs tables' )
8181 . 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' )
82+ ' -d pe-puppetdb --jobs 0 -t catalogs -t catalog_resources -t catalog_inputs -t edges -t certnames " > /var/log/puppetlabs/pe_databases_cron/catalogs_repack .log 2>&1' )
8383 }
8484 end
8585 end
You can’t perform that action at this time.
0 commit comments