Skip to content

Commit

Permalink
Updating db recovery step
Browse files Browse the repository at this point in the history
  • Loading branch information
ragingra committed Feb 26, 2024
1 parent 7b080df commit b0de776
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test-backup-restore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ jobs:
- name: Setup Primary DB in XL
if: ${{ github.event.inputs.architecture || 'extra-large' }} == 'extra-large'
run: |
primary_db=$(yq '.groups[].targets[] | select(.vars.role == "primary-pdb-postgresql") | .uri' spec/fixtures/litmus_inventory.yaml)
# primary_db=$(yq '.groups[].targets[] | select(.vars.role == "primary-pdb-postgresql") | .uri' spec/fixtures/litmus_inventory.yaml)
# bundle exec bolt plan run peadm_spec::init_db_server db_host=$primary_db \
# --inventoryfile spec/fixtures/litmus_inventory.yaml \
Expand Down
13 changes: 13 additions & 0 deletions plans/restore.pp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,19 @@
# lint:endignore
} elsif $restore_type == 'recovery-db' {
out::message('# Restoring primary database for recovery')
# lint:ignore:strict_indent
run_plan('peadm::util::update_classification', $primary_target,
postgresql_a_host => undef,
postgresql_b_host => undef,
peadm_config => $cluster
)
# lint:endignore
run_task('peadm::puppet_runonce', $primary_target)
run_plan('peadm::add_database', getvar('cluster.params.primary_postgresql_host'), primary_host => $primary_target)
# should db data restore be done here?
} else {
if getvar('recovery_opts.ca') {
out::message('# Restoring ca and ssl certificates')
Expand Down

0 comments on commit b0de776

Please sign in to comment.