Skip to content

Commit e5ff649

Browse files
(PE-40386) allow a database to be added before the XL env is fully set up
1 parent 7fb8ff6 commit e5ff649

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

plans/add_database.pp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
'update-db-settings',
1010
'cleanup-db',
1111
'finalize']] $begin_at_step = undef,
12+
Optional[Boolean] $is_migration = false,
1213
) {
1314
$primary_target = peadm::get_targets($primary_host, 1)
1415
$postgresql_target = peadm::get_targets($targets, 1)
@@ -22,8 +23,9 @@
2223

2324
$compilers = $peadm_config['params']['compilers']
2425

25-
# Bail if this is trying to be ran against Standard
26-
if $compilers.empty {
26+
# Bail if this is trying to be ran against Standard. We need to allow this plan to progress for a migration
27+
# though as initially the installation will not have compilers added
28+
if $compilers.empty and !$is_migration {
2729
fail_plan('Plan peadm::add_database is only applicable for L and XL deployments')
2830
}
2931

plans/migrate.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
# The new server that will become the PE primary server
99
# @param upgrade_version
1010
# Optional version to upgrade to after migration is complete
11+
# @param replica_host
12+
# Optional new server that will become the PE replica server
13+
# @param primary_postgresql_host
14+
# Optional new server that will become the primary postgresql server
1115
#
1216
plan peadm::migrate (
1317
Peadm::SingleTargetSpec $old_primary_host,
@@ -119,6 +123,7 @@
119123
if $primary_postgresql_host {
120124
run_plan('peadm::add_database', targets => $primary_postgresql_host,
121125
primary_host => $new_primary_host,
126+
is_migration => true,
122127
)
123128
}
124129

0 commit comments

Comments
 (0)