|
7 | 7 | Optional[Peadm::SingleTargetSpec] $new_replica_host = undef, |
8 | 8 | Optional[Peadm::SingleTargetSpec] $new_primary_postgresql_host = undef, |
9 | 9 | Optional[Peadm::SingleTargetSpec] $new_replica_postgresql_host = undef, |
10 | | - Optional[Peadm::SingleTargetSpec] $new_pe_version = undef, |
| 10 | + Optional[Peadm::SingleTargetSpec] $upgrade_version = undef, |
11 | 11 | ) { |
12 | 12 | out::message("primary_host:${primary_host}.") |
13 | 13 | out::message("replica_host:${replica_host}.") |
|
29 | 29 | fail_plan('Cluster is not healthy, aborting') |
30 | 30 | } |
31 | 31 |
|
32 | | - # # perform the migration |
33 | | - # run_plan('peadm::migrate', |
34 | | - # old_primary_host => $primary_host, |
35 | | - # new_primary_host => $new_primary_host, |
36 | | - # ) |
| 32 | + # perform the migration |
| 33 | + run_plan('peadm::migrate', |
| 34 | + old_primary_host => $primary_host, |
| 35 | + new_primary_host => $new_primary_host, |
| 36 | + ) |
37 | 37 |
|
38 | 38 | # run infra status on the new primary |
39 | 39 | out::message("Running peadm::status on new primary host ${new_primary_host}") |
|
77 | 77 | } |
78 | 78 |
|
79 | 79 | # if a new PE version was specified then check it has been upgraded |
80 | | - if $new_pe_version { |
81 | | - if $peadm_config['params']['pe_version'] == $new_pe_version { |
82 | | - out::message("Upgraded to new PE version ${new_pe_version} correctly") |
| 80 | + if $upgrade_version { |
| 81 | + if $peadm_config['params']['pe_version'] == $upgrade_version { |
| 82 | + out::message("Upgraded to new PE version ${upgrade_version} correctly") |
83 | 83 | } else { |
84 | | - fail_plan("Failed to upgrade to new PE version ${new_pe_version} correctly") |
| 84 | + fail_plan("Failed to upgrade to new PE version ${upgrade_version} correctly") |
85 | 85 | } |
86 | 86 | } |
87 | 87 | } |
0 commit comments