Skip to content

Commit 48e648e

Browse files
(PE-40934) Ensure agent is enabled on new nodes we migrated to
1 parent 59e616d commit 48e648e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

plans/migrate.pp

+9-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@
2323
peadm::assert_supported_pe_version($upgrade_version, $permit_unsafe_versions)
2424
}
2525

26+
$new_hosts = peadm::flatten_compact([
27+
$new_primary_host,
28+
$replica_host ? { undef => [], default => [$replica_host] }
29+
].flatten)
2630
$all_hosts = peadm::flatten_compact([
27-
$old_primary_host,
28-
$new_primary_host,
29-
$replica_host ? { undef => [], default => [$replica_host] }
31+
$old_primary_host,
32+
$new_hosts,
3033
].flatten)
3134
run_command('hostname', $all_hosts) # verify can connect to targets
3235

@@ -121,6 +124,9 @@
121124
})
122125
}
123126

127+
# ensure puppet agent enabled on the hosts we migrated to
128+
run_command('puppet agent --enable', $new_hosts)
129+
124130
if $upgrade_version and $upgrade_version != '' and !empty($upgrade_version) {
125131
run_plan('peadm::upgrade', {
126132
primary_host => $new_primary_host,

0 commit comments

Comments
 (0)