Skip to content

Commit

Permalink
(PE-40379) push more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmalloncares committed Mar 4, 2025
1 parent 5c6bd94 commit be23d57
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion spec/acceptance/peadm_spec/plans/test_migration.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,24 @@
Optional[String] $new_replica_postgresql_host = undef,
Optional[String] $upgrade_version = undef,
) {
out::message("primary_host:${primary_host}.")
out::message("new_primary_host:${new_primary_host}.")
out::message("new_replica_host:${new_replica_host}.")
out::message("new_primary_postgresql_host:${new_primary_postgresql_host}.")
out::message("new_replica_postgresql_host:${new_replica_postgresql_host}.")
out::message("upgrade_version:${upgrade_version}.")

# Convert String values to targets if they are not blank
$primary_target = $primary_host ? { '' => undef, default => peadm::get_targets($primary_host, 1) }
$new_primary_target = $new_primary_host ? { '' => undef, default => peadm::get_targets($new_primary_host, 1) }
$new_replica_target = $new_replica_host ? { '' => undef, default => peadm::get_targets($new_replica_host, 1) }
$new_primary_postgresql_target = $new_primary_postgresql_host ? { '' => undef, default => peadm::get_targets($new_primary_postgresql_host, 1) }
$new_replica_postgresql_target = $new_replica_postgresql_host ? { '' => undef, default => peadm::get_targets($new_replica_postgresql_host, 1) }
out::message("primary_target:${primary_target}.")
out::message("new_primary_target:${new_primary_target}.")
out::message("new_replica_target:${new_replica_target}.")
out::message("new_primary_postgresql_target:${new_primary_postgresql_target}.")
out::message("new_replica_postgresql_target:${new_replica_postgresql_target}.")

# run infra status on the primary
out::message("Running peadm::status on primary host ${primary_target}")
Expand Down Expand Up @@ -79,7 +91,7 @@
# if a new PE version was specified then check it has been upgraded
out::message("upgrade_version:${upgrade_version}.")
if $upgrade_version and $upgrade_version != '' and !empty($upgrade_version) {
if $peadm_config['value']['pe_version'] == $upgrade_version {
if $peadm_config['pe_version'] == $upgrade_version {
out::message("Upgraded to new PE version ${upgrade_version} correctly")
} else {
fail_plan("Failed to upgrade to new PE version ${upgrade_version} correctly")
Expand Down

0 comments on commit be23d57

Please # to comment.