Commit 26856140 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'jarv/check-all-secondaries' into 'master'

Will check replication status on all secondaries as well.

Closes #764

See merge request gitlab-com/migration!200
parents aa9c6fe5 3dd2f651
Pipeline #89097 passed with stage
in 21 seconds
...@@ -13,3 +13,10 @@ fi ...@@ -13,3 +13,10 @@ fi
last_event=$(ssh "$POSTGRESQL_GCP_WAL_SECONDARY" 'sudo gitlab-psql -t -d gitlabhq_production -c "SELECT now() - pg_last_xact_replay_timestamp();"') last_event=$(ssh "$POSTGRESQL_GCP_WAL_SECONDARY" 'sudo gitlab-psql -t -d gitlabhq_production -c "SELECT now() - pg_last_xact_replay_timestamp();"')
echo "Last event seen for $POSTGRESQL_GCP_WAL_SECONDARY was${last_event} ago." echo "Last event seen for $POSTGRESQL_GCP_WAL_SECONDARY was${last_event} ago."
echo "-----"
for secondary in ${POSTGRESQL_GCP_SECONDARIES[*]}
do
last_event=$(ssh "$secondary" 'sudo gitlab-psql -t -d gitlabhq_production -c "SELECT now() - pg_last_xact_replay_timestamp();"')
echo "Last event seen for $secondary was${last_event} ago."
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment