launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #32296
[Merge] ~lgp171188/launchpad-bastion-scripts:use-generic-staging-pgbouncer-domain-name-staging-restore into launchpad-bastion-scripts:main
Guruprasad has proposed merging ~lgp171188/launchpad-bastion-scripts:use-generic-staging-pgbouncer-domain-name-staging-restore into launchpad-bastion-scripts:main.
Commit message:
Use the generic staging pgbouncer domain name during restore
This allows using the current primary without hard-coding its FQDN.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~lgp171188/launchpad-bastion-scripts/+git/launchpad-bastion-scripts/+merge/482882
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad-bastion-scripts:use-generic-staging-pgbouncer-domain-name-staging-restore into launchpad-bastion-scripts:main.
diff --git a/staging-restore/staging_restore.sh b/staging-restore/staging_restore.sh
index be77aab..4f10f2b 100755
--- a/staging-restore/staging_restore.sh
+++ b/staging-restore/staging_restore.sh
@@ -120,7 +120,7 @@ then
exit 1
fi
- in-model staging juju ssh launchpad-db-update/leader -- "sudo -iu launchpad make -C ${ROOTDIR}/code/database/replication stagingsetup STAGING_CONFIG=launchpad-db-update STAGING_DUMP=${DUMPFILE} STAGING_PGBOUNCER='psql -h database-ps5-1.staging.lp.internal -p 5433 -U pgbouncer -d pgbouncer'" >> "$LOGFILE" 2>&1
+ in-model staging juju ssh launchpad-db-update/leader -- "sudo -iu launchpad make -C ${ROOTDIR}/code/database/replication stagingsetup STAGING_CONFIG=launchpad-db-update STAGING_DUMP=${DUMPFILE} STAGING_PGBOUNCER='psql -h lp-staging-pgbouncer.internal -p 5433 -U pgbouncer -d pgbouncer'" >> "$LOGFILE" 2>&1
if [ $? != 0 ]
then
echo $(date) "There was a problem running the stagingsetup target" >> $LOGFILE
@@ -132,7 +132,7 @@ then
in-model staging juju ssh launchpad-db-update/leader -- "sudo -iu launchpad psql -h database-ps5-1.staging.lp.internal -U migrationadmin -d lpmain_staging" < "$TOP/insert_oauth_credentials.sql" >> "$LOGFILE" 2>&1
# Kill all connections to these DBs and then stop new connections
- in-model staging juju ssh launchpad-db-update/leader -- "sudo -iu launchpad make -C ${ROOTDIR}/code/database/replication stagingswitch STAGING_CONFIG=launchpad-db-update STAGING_PGBOUNCER='psql -h database-ps5-1.staging.lp.internal -p 5433 -U pgbouncer -d pgbouncer'" >> "$LOGFILE" 2>&1
+ in-model staging juju ssh launchpad-db-update/leader -- "sudo -iu launchpad make -C ${ROOTDIR}/code/database/replication stagingswitch STAGING_CONFIG=launchpad-db-update STAGING_PGBOUNCER='psql -h lp-staging-pgbouncer.internal -p 5433 -U pgbouncer -d pgbouncer'" >> "$LOGFILE" 2>&1
if [ $? != 0 ]
then
echo $(date) "There was a problem running the stagingswitch target" >> $LOGFILE