|
8 | 8 | # @param activity_tables [Array] Array of 'activity' tables to repack
|
9 | 9 | # @param disable_maintenance [Boolean] true or false (Default: false)
|
10 | 10 | # Disable or enable maintenance mode
|
| 11 | +# @param repack_log_level [Enum] Desired output level of logs |
| 12 | +# @param enable_echo [Boolean] true or false (Default: true) |
| 13 | +# Enabling echo output in logs |
11 | 14 | # @param jobs [Integer] How many jobs to run in parallel
|
12 | 15 | # @param facts_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'facts' tables
|
13 | 16 | # @param catalogs_tables_repack_timer [String]The Systemd timer for the pg_repack job affecting the 'catalog' tables
|
14 | 17 | # @param other_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'other' tables
|
15 | 18 | # @param activity_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'activity' tables
|
16 | 19 | # @param reports_tables_repack_timer [String] Deprecated Parameter will be removed in future releases
|
17 | 20 | # @param resource_events_tables_repack_timer [String] Deprecated Parameter will be removed in future releases
|
18 |
| -# @param repack_run_level |
19 |
| -# @param enable_echo |
20 | 21 | class pe_databases::pg_repack (
|
21 | 22 | # Provided by module data
|
22 | 23 | Array $fact_tables,
|
23 | 24 | Array $catalog_tables,
|
24 | 25 | Array $other_tables,
|
25 | 26 | Array $activity_tables,
|
26 | 27 | Boolean $disable_maintenance = false,
|
27 |
| - Enum['INFO','NOTICE','WARNING', 'ERROR', 'LOG', 'FATAL','PANIC','DEBUG'] $repack_run_level='DEBUG', |
| 28 | + Enum['INFO','NOTICE','WARNING','ERROR','LOG','FATAL','PANIC','DEBUG'] $repack_log_level='DEBUG', |
28 | 29 | Boolean $enable_echo = true,
|
29 | 30 | Integer $jobs = $facts['processors']['count'] / 4,
|
30 | 31 | String[1] $facts_tables_repack_timer = $pe_databases::facts_tables_repack_timer,
|
|
40 | 41 | $postgresql_version = $facts['pe_postgresql_info']['installed_server_version']
|
41 | 42 | $repack_executable = "/opt/puppetlabs/server/apps/postgresql/${postgresql_version}/bin/pg_repack"
|
42 | 43 |
|
43 |
| - #Add conditionals, |
44 |
| - #If echo enabled = true run WITH |
45 | 44 | if $enable_echo {
|
46 | 45 | $repack_cmd = "${repack_executable} --jobs ${jobs} --elevel ${repack_run_level} --echo"
|
47 | 46 | } else {
|
48 | 47 | $repack_cmd = "${repack_executable} --jobs ${jobs} --elevel ${repack_run_level}"
|
49 | 48 | }
|
50 |
| - #else echo ommited - run without echo |
51 | 49 |
|
52 | 50 | pe_databases::collect { 'facts':
|
53 | 51 | disable_maintenance => $disable_maintenance,
|
|
0 commit comments