Skip to content

Commit ecde039

Browse files
author
petergmurphy
committed
(PE-40372) Add optional replica host to migration plan
This commit extends the migration plan to support and utilise an optional new replica host parameter.
1 parent 70c0478 commit ecde039

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

REFERENCE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2322,6 +2322,8 @@ The following parameters are available in the `peadm::migrate` plan:
23222322

23232323
* [`old_primary_host`](#-peadm--migrate--old_primary_host)
23242324
* [`new_primary_host`](#-peadm--migrate--new_primary_host)
2325+
* [`upgrade_version`](#-peadm--migrate--upgrade_version)
2326+
* [`replica_host`](#-peadm--migrate--replica_host)
23252327

23262328
##### <a name="-peadm--migrate--old_primary_host"></a>`old_primary_host`
23272329

@@ -2335,6 +2337,22 @@ Data type: `Peadm::SingleTargetSpec`
23352337

23362338
The new server that will become the PE primary server
23372339

2340+
##### <a name="-peadm--migrate--upgrade_version"></a>`upgrade_version`
2341+
2342+
Data type: `Optional[String]`
2343+
2344+
Optional version to upgrade to after migration is complete
2345+
2346+
Default value: `undef`
2347+
2348+
##### <a name="-peadm--migrate--replica_host"></a>`replica_host`
2349+
2350+
Data type: `Optional[SingleTargetSpec]`
2351+
2352+
2353+
2354+
Default value: `undef`
2355+
23382356
### <a name="peadm--modify_certificate"></a>`peadm::modify_certificate`
23392357

23402358
Certificates can be modified by adding extensions, removing extensions, or

plans/migrate.pp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
Peadm::SingleTargetSpec $old_primary_host,
1212
Peadm::SingleTargetSpec $new_primary_host,
1313
Optional[String] $upgrade_version = undef,
14+
Optional[SingleTargetSpec] $replica_host = undef,
1415
) {
1516
peadm::assert_supported_bolt_version()
1617

@@ -36,6 +37,7 @@
3637
code_manager_auto_configure => true,
3738
download_mode => 'direct',
3839
version => $old_pe_conf['pe_version'],
40+
replica_host => $replica_host,
3941
})
4042

4143
run_plan('peadm::restore', {
@@ -48,7 +50,8 @@
4850
run_plan('peadm::upgrade', {
4951
primary_host => $new_primary_host,
5052
version => $upgrade_version,
51-
download_mode => 'direct',
53+
download_mode => 'direct',
54+
replica_host => $replica_host,
5255
})
5356
}
5457
}

0 commit comments

Comments
 (0)