Skip to content

Commit

Permalink
(PE-40377) final fix for download path and updated final checks
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmalloncares committed Feb 26, 2025
1 parent 7faa72b commit f1e0e8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
13 changes: 3 additions & 10 deletions plans/migrate.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,12 @@
$backup_file = run_plan('peadm::backup', $old_primary_host, {
backup_type => 'migration',
})
out::message("Backup file: ${backup_file}")
out::message("Backup file path: ${backup_file['path']}")
$down_results = download_file($backup_file['path'], 'backup', $old_primary_host)
out::message("Download results: ${down_results}")
$download_path = $down_results[0]['path']

out::message("Download path: ${download_path}")
$download_results = download_file($backup_file['path'], 'backup', $old_primary_host)
$download_path = $download_results[0]['path']

$backup_filename = basename($backup_file['path'])
$remote_backup_path = "/tmp/${backup_filename}"
$current_dir = system::env('PWD')
out::message("backup_filename: ${backup_filename}")
out::message("remote_backup_path: ${remote_backup_path}")
out::message("current_dir: ${current_dir}")

upload_file($download_path, $remote_backup_path, $new_primary_host)

Expand Down
4 changes: 2 additions & 2 deletions spec/acceptance/peadm_spec/plans/test_migration.pp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
}

# get the config from new_primary_target and verify config looks as expected
$result = run_task('peadm::get_peadm_config', $new_primary_target, '_catch_errors' => true).first.to_data()
out::message("peadm_config: ${result}")
$peadm_config = run_task('peadm::get_peadm_config', $new_primary_target, '_catch_errors' => true).first.to_data()
out::message("peadm_config: ${peadm_config}")
# if new_replica_target is supplied then check that is in the expected place in the config
if $new_replica_target {
if $peadm_config['params']['replica_host'] == $new_replica_target {
Expand Down

0 comments on commit f1e0e8e

Please sign in to comment.