Skip to content

Commit 5c40f59

Browse files
(MAINT) debug add replica error
1 parent 7614192 commit 5c40f59

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

plans/add_replica.pp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
$peadm_config['params']['replica_host'],
4343
]).unique
4444

45+
out::message("Replicas:${replicas}.")
46+
out::message("replica_host:${replica_host}.")
47+
out::message("peadm_config['params']['replica_host']:${peadm_config['params']['replica_host']}.")
48+
4549
$certdata = run_task('peadm::cert_data', $primary_target).first.value
4650
$primary_avail_group_letter = $certdata['extensions'][peadm::oid('peadm_availability_group')]
4751
$replica_avail_group_letter = $primary_avail_group_letter ? { 'A' => 'B', 'B' => 'A' }
@@ -114,6 +118,11 @@
114118
)
115119
}
116120

121+
out::message("primary_target:${primary_target}.")
122+
out::message("replica_target:${replica_target}.")
123+
out::message("replica_target.peadm::certname():${replica_target.peadm::certname()}.")
124+
out::message("token_file:${token_file}.")
125+
117126
# Provision the new system as a replica
118127
run_task('peadm::provision_replica', $primary_target,
119128
replica => $replica_target.peadm::certname(),
@@ -123,7 +132,7 @@
123132
# probably gets "starting", but fails out because that's not "running".
124133
# Can remove flag when that issue is fixed.
125134
legacy => false,
126-
# _catch_errors => true, # testing
135+
_catch_errors => true, # testing
127136
)
128137

129138
# start puppet service

tasks/provision_replica.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ set -e
2424
if [ "$PT_legacy" = "false" ]; then
2525
echo "(legacy=false) query active nodes before provision replica"
2626
puppet query '["from","resources",["extract",["certname"],["and",["=","type","Class"],["=","title","Puppet_enterprise::Profile::Master"]]]]'
27-
27+
echo "(legacy=false) provision replica $PT_replica and token file $TOKEN_FILE"
2828
puppet infrastructure provision replica "$PT_replica" \
2929
--color false \
3030
--yes --token-file "$TOKEN_FILE" \
3131
--skip-agent-config \
3232
--topology mono-with-compile \
3333
--enable
34-
34+
echo "(legacy=false) provisioned replica"
3535
elif [ "$PT_legacy" = "true" ]; then
3636
echo "(legacy=true) query active nodes before provision replica"
3737
puppet query '["from","resources",["extract",["certname"],["and",["=","type","Class"],["=","title","Puppet_enterprise::Profile::Master"]]]]'

0 commit comments

Comments
 (0)