Skip to content

Commit b5c3cfb

Browse files
author
petergmurphy
committed
(PE-40373) Add optional upgrade to migration plan
This commit extends the existing migration plan by adding an optional upgrade step after the migration is complete. If an upgrade version is specified, the plan will automatically perform an upgrade to the new version using the peadm::upgrade plan.
1 parent be0fb06 commit b5c3cfb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

plans/migrate.pp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
# The existing PE primary server that will be migrated from
55
# @param new_primary_host
66
# The new server that will become the PE primary server
7+
# @param upgrade_version
8+
# Optional version to upgrade to after migration is complete
79
#
810
plan peadm::migrate (
911
Peadm::SingleTargetSpec $old_primary_host,
1012
Peadm::SingleTargetSpec $new_primary_host,
13+
Optional[String] $upgrade_version = undef,
1114
) {
1215
peadm::assert_supported_bolt_version()
1316

@@ -40,4 +43,12 @@
4043
restore_type => 'migration',
4144
input_file => $remote_backup_path,
4245
})
46+
47+
if $upgrade_version {
48+
run_plan('peadm::upgrade', {
49+
primary_host => $new_primary_host,
50+
version => $upgrade_version,
51+
download_mode => 'direct',
52+
})
53+
}
4354
}

0 commit comments

Comments
 (0)