|
14 | 14 | Peadm::SingleTargetSpec $new_primary_host, |
15 | 15 | Optional[String] $upgrade_version = undef, |
16 | 16 | Optional[Peadm::SingleTargetSpec] $replica_host = undef, |
| 17 | + Optional[Peadm::SingleTargetSpec] $primary_postgresql_host = undef, |
| 18 | + Optional[Peadm::SingleTargetSpec] $replica_postgresql_host = undef, |
17 | 19 | ) { |
| 20 | + out::message("old_primary_host: ${old_primary_host}") |
| 21 | + out::message("new_primary_host: ${new_primary_host}") |
| 22 | + out::message("upgrade_version: ${upgrade_version}") |
| 23 | + out::message("replica_host: ${replica_host}") |
| 24 | + out::message("primary_postgresql_host: ${primary_postgresql_host}") |
| 25 | + out::message("replica_postgresql_host: ${replica_postgresql_host}") |
18 | 26 | # pre-migration checks |
19 | 27 | out::message('This plan is a work in progress and it is not recommended to be used until it is fully implemented and supported') |
20 | 28 | peadm::assert_supported_bolt_version() |
|
26 | 34 | $all_hosts = peadm::flatten_compact([ |
27 | 35 | $old_primary_host, |
28 | 36 | $new_primary_host, |
29 | | - $replica_host ? { undef => [], default => [$replica_host] } |
| 37 | + $replica_host ? { undef => [], default => [$replica_host] }, |
| 38 | + $primary_postgresql_host ? { undef => [], default => [$primary_postgresql_host] }, |
| 39 | + $replica_postgresql_host ? { undef => [], default => [$replica_postgresql_host] } |
30 | 40 | ].flatten) |
31 | 41 | run_command('hostname', $all_hosts) # verify can connect to targets |
32 | 42 |
|
|
67 | 77 |
|
68 | 78 | run_plan('peadm::install', { |
69 | 79 | primary_host => $new_primary_host, |
| 80 | + replica_host => $replica_host, |
| 81 | + primary_postgresql_host => $primary_postgresql_host, |
| 82 | + replica_postgresql_host => $replica_postgresql_host, |
70 | 83 | console_password => $old_primary_password, |
71 | 84 | code_manager_auto_configure => true, |
72 | 85 | download_mode => 'direct', |
|
114 | 127 | out::message('No nodes to purge from old configuration') |
115 | 128 | } |
116 | 129 |
|
117 | | - if $replica_host { |
118 | | - run_plan('peadm::add_replica', { |
119 | | - primary_host => $new_primary_host, |
120 | | - replica_host => $replica_host, |
121 | | - }) |
122 | | - } |
123 | | - |
124 | 130 | if $upgrade_version and $upgrade_version != '' and !empty($upgrade_version) { |
125 | 131 | run_plan('peadm::upgrade', { |
126 | 132 | primary_host => $new_primary_host, |
|
0 commit comments