-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Description
puppetlabs-peadm/plans/replace_failed_postgresql.pp
Lines 26 to 27 in 2817444
| # Get current peadm config before making modifications | |
| $peadm_config = run_task('peadm::get_peadm_config', $primary_host).first.value |
This fails if the failed_postgresql_host is primary_postgresql_host.
Starting: task peadm::get_peadm_config on primary_host.pe.com
Finished: task peadm::get_peadm_config with 1 failure in 3.78 sec
Finished: plan peadm::replace_failed_postgresql in 4.57 sec
Failed on primary_host.pe.com:
The task failed with exit code 1 and no stdout, but stderr contained:
/opt/puppetlabs/puppet/lib/ruby/3.2.0/json/common.rb:216:in `parse': unexpected token at 'primary_postgresql_host.pe.com' (JSON::ParserError)
from /opt/puppetlabs/puppet/lib/ruby/3.2.0/json/common.rb:216:in `parse'
from /tmp/56e1243f-3c8e-45cb-97ed-0b649938e2e7/get_peadm_config.rb:144:in `pdb_query'
from /tmp/56e1243f-3c8e-45cb-97ed-0b649938e2e7/get_peadm_config.rb:125:in `server'
from /tmp/56e1243f-3c8e-45cb-97ed-0b649938e2e7/get_peadm_config.rb:27:in `config'
from /tmp/56e1243f-3c8e-45cb-97ed-0b649938e2e7/get_peadm_config.rb:17:in `execute!'
from /tmp/56e1243f-3c8e-45cb-97ed-0b649938e2e7/get_peadm_config.rb:189:in `<main>'
Failed on 1 target: primary_host.pe.com
Ran on 1 target
Steps to Reproduce
bolt plan run peadm::install --inventory $inventory_path --params @$params_path
echo 'Simulating failure'
bolt plan run peadm::uninstall --targets $primary_postgresql_host --inventory $inventory_path
echo 'Recovering from failure'
bolt plan run peadm::replace_failed_postgresql primary_host=$primary_host replica_host=$replica_host working_postgresql_host=$replica_postgresql_host failed_postgresql_host=$primary_postgresql_host replacement_postgresql_host=$primary_postgresql_host --inventory $inventory_pathAdditional Context
Maybe this needs to be moved up to before the get_peadm_config?
puppetlabs-peadm/plans/replace_failed_postgresql.pp
Lines 43 to 44 in 2817444
| # Temporarily set both primary and replica server nodes so that they use the remaining healthy PE-PostgreSQL server | |
| run_plan('peadm::util::update_db_setting', $pe_hosts, |
Metadata
Metadata
Assignees
Labels
No labels