Commit 5d7a13db authored by John Jarvis's avatar John Jarvis

No longer suppress errors

It was done this way originally to remove ssh warnings but after
discussion it was decided it is better to show everything for
troubleshooting.
parent d72d47c9
Pipeline #89093 passed with stage
in 17 seconds
...@@ -12,6 +12,6 @@ fi ...@@ -12,6 +12,6 @@ fi
for secondary in ${POSTGRESQL_GCP_SECONDARIES[*]} for secondary in ${POSTGRESQL_GCP_SECONDARIES[*]}
do do
recovery=$(ssh_host "$secondary" "sudo gitlab-psql -t -d gitlab_repmgr -c 'select pg_is_in_recovery();' 2>/dev/null") recovery=$(ssh_host "$secondary" "sudo gitlab-psql -t -d gitlab_repmgr -c 'select pg_is_in_recovery();'")
echo "$secondary : pg_is_in_recovery=$recovery" echo "$secondary : pg_is_in_recovery=$recovery"
done done
...@@ -10,7 +10,7 @@ if [[ -z $POSTGRESQL_AZURE_PRIMARY ]]; then ...@@ -10,7 +10,7 @@ if [[ -z $POSTGRESQL_AZURE_PRIMARY ]]; then
echo "You must set POSTGRESQL_AZURE_PRIMARY in source_vars" echo "You must set POSTGRESQL_AZURE_PRIMARY in source_vars"
fi fi
recovery=$(ssh_host "$POSTGRESQL_AZURE_PRIMARY" "sudo gitlab-psql -t -d gitlab_repmgr -c 'select pg_is_in_recovery();' 2>/dev/null") recovery=$(ssh_host "$POSTGRESQL_AZURE_PRIMARY" "sudo gitlab-psql -t -d gitlab_repmgr -c 'select pg_is_in_recovery();'")
echo "$POSTGRESQL_AZURE_PRIMARY: pg_is_in_recovery=$recovery" echo "$POSTGRESQL_AZURE_PRIMARY: pg_is_in_recovery=$recovery"
echo "postgresql will be shutdown on the above host, press enter to continue" echo "postgresql will be shutdown on the above host, press enter to continue"
......
...@@ -12,7 +12,7 @@ fi ...@@ -12,7 +12,7 @@ fi
for secondary in ${POSTGRESQL_AZURE_SECONDARIES[*]} for secondary in ${POSTGRESQL_AZURE_SECONDARIES[*]}
do do
recovery=$(ssh_host "$secondary" "sudo gitlab-psql -t -d gitlab_repmgr -c 'select pg_is_in_recovery();' 2>/dev/null") recovery=$(ssh_host "$secondary" "sudo gitlab-psql -t -d gitlab_repmgr -c 'select pg_is_in_recovery();'")
echo "$secondary : pg_is_in_recovery=$recovery" echo "$secondary : pg_is_in_recovery=$recovery"
done done
......
...@@ -9,4 +9,4 @@ source "${UNSYMLINKED_SCRIPT_DIR}/../../../../workflow-script-commons.sh" ...@@ -9,4 +9,4 @@ source "${UNSYMLINKED_SCRIPT_DIR}/../../../../workflow-script-commons.sh"
if [[ -z $POSTGRESQL_AZURE_PRIMARY ]]; then if [[ -z $POSTGRESQL_AZURE_PRIMARY ]]; then
echo "You must set POSTGRESQL_AZURE_PRIMARY in source_vars" echo "You must set POSTGRESQL_AZURE_PRIMARY in source_vars"
fi fi
ssh_host "$POSTGRESQL_AZURE_PRIMARY" "sudo gitlab-psql -t -d gitlab_repmgr -c \"update repmgr_gitlab_cluster.repl_nodes set priority=100 where name like '%g${FAILOVER_ENVIRONMENT}%'\" 2>/dev/null" ssh_host "$POSTGRESQL_AZURE_PRIMARY" "sudo gitlab-psql -t -d gitlab_repmgr -c \"update repmgr_gitlab_cluster.repl_nodes set priority=100 where name like '%g${FAILOVER_ENVIRONMENT}%'\""
...@@ -20,7 +20,7 @@ function die() { ...@@ -20,7 +20,7 @@ function die() {
function ssh_host() { function ssh_host() {
# shellcheck disable=SC2068 # shellcheck disable=SC2068
ssh -o StrictHostKeyChecking=no $@ 2>/dev/null ssh -o StrictHostKeyChecking=no $@
} }
function PRODUCTION_ONLY() { function PRODUCTION_ONLY() {
......
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