073-check-pgbouncer-node-in-azure.sh 445 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/bin/bash

set -eu

# shellcheck source=/dev/null
source "${BASE}/env_${ENVIRONMENT}"

for host in "${GCP_PGBOUNCERS[@]}" "${AZURE_PGBOUNCERS[@]}"
do
  echo "Check pgbouncer on $host"
  echo "SHOW DATABASES" | ssh_remote "$host" gitlab-ctl pgb-console
  echo "SHOW SERVERS" | ssh_remote "$host" gitlab-ctl pgb-console
  read -r -s -N 1 -p "Press [y] to continue, any other key to abort." key
  if [ "$key" != "y" ]
  then
    exit 1
  fi
done