Skip to content

Commit f729c61

Browse files
committed
* Correcting the supported pe version check to check the upgraded version if applicable
* modifying the check for a replica host when verifying host connections to be cleaner
1 parent a8a723c commit f729c61

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

plans/migrate.pp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,16 @@
2121
peadm::assert_supported_bolt_version()
2222
if $upgrade_version and $upgrade_version != '' and !empty($upgrade_version) {
2323
$permit_unsafe_versions = false
24-
peadm::assert_supported_pe_version($version, $permit_unsafe_versions)
24+
peadm::assert_supported_pe_version($upgrade_version, $permit_unsafe_versions)
2525
}
2626

2727
$all_hosts = peadm::flatten_compact([
28-
$old_primary_host,
29-
$new_primary_host,
30-
])
28+
$old_primary_host,
29+
$new_primary_host,
30+
$replica_host ? { undef => [], default => [$replica_host] }
31+
].flatten)
3132
run_command('hostname', $all_hosts) # verify can connect to targets
3233

33-
if $replica_host != '' and !empty($replica_host) {
34-
run_command('hostname', $replica_host)
35-
}
36-
3734
# verify the cluster we are migrating from is operational and is a supported architecture
3835
$cluster = run_task('peadm::get_peadm_config', $old_primary_host).first.value
3936
$error = getvar('cluster.error')

0 commit comments

Comments
 (0)