steps_database_wrangler_failback 1.28 KB
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 24 25 26 27 28 29 30 31 32 33
export steps=(
function:get-rid-of-could-not-change-directory-to-message
file:scripts/04_failback/040-disable-chef.sh
file:scripts/04_failback/041-disable-consul.sh
file:scripts/04_failback/042-disable-automatic-failover.sh
file:scripts/04_failback/043-reset-automatic-failover-state.sh
file:scripts/04_failback/050-convert-cgp-master-to-standby-of-azure.sh
file:scripts/04_failback/051-check-gcp-master-is-standby.sh
file:scripts/04_failback/052-check-azure-nodes-has-same-gcp-lsn.sh
file:scripts/04_failback/060-perform-azure-master-promote.sh
file:scripts/04_failback/061-check-azure-master-is-master.sh
file:scripts/04_failback/070-enable-automatic-failover.sh
file:scripts/04_failback/071-check-repmgr-master.sh
file:scripts/04_failback/072-enable-consul.sh
file:scripts/04_failback/073-check-pgbouncer-node-in-azure.sh
function:restore-could-not-change-directory-to-message
)

function get-rid-of-could-not-change-directory-to-message(){
  for host in "${AZURE_HOSTS[@]}" "${GCP_HOSTS[@]}"
  do
    echo "$host: chmod o+x \$HOME"
    ssh_remote "$host" bash -c '"chmod o+x \"$HOME\""'
  done
}

function restore-could-not-change-directory-to-message(){
  for host in "${AZURE_HOSTS[@]}" "${GCP_HOSTS[@]}"
  do
    echo "$host: chmod o-x \$HOME"
    ssh_remote "$host" bash -c '"chmod o-x \"$HOME\""'
  done
}