File tree 2 files changed +7
-20
lines changed
2 files changed +7
-20
lines changed Original file line number Diff line number Diff line change 26
26
$repack_jobs = " --jobs ${jobs} "
27
27
28
28
$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"' }
30
32
$other_tables = ' -t producers -t resource_params -t resource_params_cache"'
31
33
$reports_table = ' -t reports"'
32
34
$resource_events_table = ' -t resource_events"'
33
- $catalog_inputs_table = ' -t catalog_inputs"'
34
35
35
36
Cron {
36
37
ensure => $ensure_cron ,
59
60
command => " ${repack} ${repack_jobs} ${other_tables} > ${logging_directory} /other_repack.log 2>&1" ,
60
61
}
61
62
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
-
76
63
if versioncmp($facts [' pe_server_version' ], ' 2019.7.0' ) < 0 {
77
64
cron { ' pg_repack reports tables' :
78
65
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
74
+ context 'on >= PE 2019.8.2 ' do
75
75
before :each do
76
- facts [ 'pe_server_version' ] = '2019.8.0 '
76
+ facts [ 'pe_server_version' ] = '2019.8.2 '
77
77
facts [ 'pe_postgresql_info' ] [ 'installed_server_version' ] = 11
78
78
end
79
79
it {
80
- is_expected . to contain_cron ( 'pg_repack catalog_inputs tables' )
80
+ is_expected . to contain_cron ( 'pg_repack catalogs tables' )
81
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' )
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' )
83
83
}
84
84
end
85
85
end
You can’t perform that action at this time.
0 commit comments