042-disable-automatic-failover.sh 540 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/bin/bash

set -eu

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

for host in "${AZURE_HOSTS[@]}"
do
  echo "Stopping repmgrd on $host"
  ssh_remote "$host" sudo sv stop /opt/gitlab/sv/repmgrd
done
for host in "${GCP_HOSTS[@]}"
do
  if [ "$GCP_MASTER_CANDIDATE" == "$host" ]
  then
    continue
  fi
  echo "Stopping repmgrd on $host"
  ssh_remote "$host" sudo sv stop /opt/gitlab/sv/repmgrd
done
echo "Stopping repmgrd on $GCP_MASTER_CANDIDATE"
ssh_remote "$GCP_MASTER_CANDIDATE" sudo sv stop /opt/gitlab/sv/repmgrd