Commit a50d1e90 authored by Nikolay's avatar Nikolay
Browse files

reduce number of TODO comments

parent 3d403370
......@@ -323,11 +323,12 @@ state of the secondary to converge.
shopt -s expand_aliases
alias ssh_remote="ssh -F ~/.ssh/gitlab.conf" # TODO(NikolayS) change to "knife ..."
# TODO(NikolayS) move globals to the top / init stage
export GITLAB_ENV="staging"
if [[ "$GITLAB_ENV" == "production" ]]; then
export AZURE_MASTER="postgres-02.db.prd.gitlab.com" # TODO(NikolayS) move to the top / init stage
export GCP_MASTER_CANDIDATE="postgres-01-db-gprd.c.gitlab-production.internal" # TODO(NikolayS) move to the top / init stage
export AZURE_MASTER="postgres-02.db.prd.gitlab.com"
export GCP_MASTER_CANDIDATE="postgres-01-db-gprd.c.gitlab-production.internal"
elif [[ "$GITLAB_ENV" == "staging" ]]; then
export AZURE_MASTER="postgres01.db.stg.gitlab.com"
export GCP_MASTER_CANDIDATE="postgres-01-db-gprd.c.gitlab-staging-1.internal"
......@@ -354,10 +355,10 @@ state of the secondary to converge.
gcpCurRepDelay=$(ssh_remote "$GCP_MASTER_CANDIDATE" \
"sudo gitlab-psql -Atd postgres -c 'select round(extract(epoch from (now() - pg_last_xact_replay_timestamp())))'")
if [[ "$gcpCurRepDelay" -lt "$maxRepDelay" ]]; then # TODO(NikolayS) put this check to ruby / morchestra?
echo "GCP delay <${maxRepDelay} s): OK (delay: ~${gcpCurRepDelay}s)" # TODO(NikolayS) integrate to morchestra
if [[ ! -z ${gcpCurRepDelay+x} && "$maxRepDelay" -gt "$gcpCurRepDelay" ]]; then # TODO(NikolayS) do it in morchestra?
echo "Check if GCP delay <${maxRepDelay} s): OK (delay: ~${gcpCurRepDelay}s)"
else
echo "GCP delay <${maxRepDelay} s): FAIL (delay: ~${gcpCurRepDelay}s)" # TODO(NikolayS) integrate to morchestra
echo "Check if GCP delay <${maxRepDelay} s): FAIL (delay: ~${gcpCurRepDelay}s)"
fi
}
......
Supports Markdown
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