Skip to content

Commit b07439a

Browse files
authored
(PE-39429) Only restart puppetdb on non-legacy compilers (#511)
* (PE-39429) Only restart puppetdb on non-legacy compilers * (PE-39429) Simplify targets for restarting compiler services * (maint) Fix pdk lint error * (PE-39429) Use correct targets and only run if those targets are non-empty. This fixes errors about run_command needing 3 args when no compilers are present
1 parent 63fc086 commit b07439a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

plans/convert.pp

+8-2
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,14 @@
305305
# Restart cluster compiler services that are likely not restarted by our
306306
# final Puppet run to increase chance everything is functional upon plan
307307
# completion
308-
run_command('systemctl restart pe-puppetserver.service pe-puppetdb.service',
309-
$all_targets - $primary_target - $primary_postgresql_target - $replica_postgresql_target)
308+
if $legacy_compiler_targets {
309+
run_command('systemctl restart pe-puppetserver.service', $legacy_compiler_targets)
310+
}
311+
312+
# PuppetDB is only found on modern compilers, not legacy ones
313+
if $compiler_targets {
314+
run_command('systemctl restart pe-puppetserver.service pe-puppetdb.service', $compiler_targets)
315+
}
310316
311317
# Run puppet on all targets again to ensure everything is fully up-to-date
312318
run_task('peadm::puppet_runonce', $all_targets)

types/convertsteps.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#
22
# @summary type for the different steps where the peadm::convert plan can be started
33
#
4-
type Peadm::ConvertSteps = Enum[ 'modify-primary-certs', 'modify-infra-certs', 'convert-node-groups', 'finalize']
4+
type Peadm::ConvertSteps = Enum['modify-primary-certs', 'modify-infra-certs', 'convert-node-groups', 'finalize']

0 commit comments

Comments
 (0)