Skip to content

Commit

Permalink
Fix scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sando38 committed May 10, 2024
1 parent 1cd1744 commit 6e6ab45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/ejabberd/templates/scripts/startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ data:
else
info "==> Leaving former cluster ..."
NO_WARNINGS=true ejabberdctl leave_cluster "$sts_name@$pod_name.${headless_svc}"
while ! nc -z "$join_pod_name ${ERL_DIST_PORT:-5210}"; do sleep 1; done
while ! nc -z $join_pod_name ${ERL_DIST_PORT:-5210}; do sleep 1; done
info "==> Will (re-)join ejabberd pod $sts_name@$join_pod_name ..."
ejabberdctl join_cluster "$sts_name@$join_pod_name" && sleep 5s
if echo "$(_cluster_member)" | grep -q "$join_pod_name"
Expand All @@ -144,7 +144,7 @@ data:
info "==> Leaving non-leader cluster ..."
NO_WARNINGS=true ejabberdctl leave_cluster "$sts_name@$pod_name.${headless_svc}"
fi
while ! nc -z "$leader.${headless_svc} ${ERL_DIST_PORT:-5210}"; do sleep 1; done
while ! nc -z $leader.${headless_svc} ${ERL_DIST_PORT:-5210}; do sleep 1; done
info "==> Will (re-)join leader "$sts_name@$leader.${headless_svc}" ..."
ejabberdctl join_cluster "$sts_name@$leader.${headless_svc}" && sleep 5s
if echo "$(_cluster_member)" | grep -q "$leader"
Expand Down
4 changes: 2 additions & 2 deletions image/24.02/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ _join_cluster_dns() {
else
info "==> Leaving former cluster ..."
NO_WARNINGS=true ejabberdctl leave_cluster "$sts_name@$pod_name.${headless_svc}"
while ! nc -z "$join_pod_name ${ERL_DIST_PORT:-5210}"; do sleep 1; done
while ! nc -z $join_pod_name ${ERL_DIST_PORT:-5210}; do sleep 1; done
info "==> Will (re-)join ejabberd pod $sts_name@$join_pod_name ..."
ejabberdctl join_cluster "$sts_name@$join_pod_name" && sleep 5s
if echo "$(_cluster_member)" | grep -q "$join_pod_name"
Expand All @@ -120,7 +120,7 @@ _join_cluster_elector() {
info "==> Leaving non-leader cluster ..."
NO_WARNINGS=true ejabberdctl leave_cluster "$sts_name@$pod_name.${headless_svc}"
fi
while ! nc -z "$leader.${headless_svc} ${ERL_DIST_PORT:-5210}"; do sleep 1; done
while ! nc -z $leader.${headless_svc} ${ERL_DIST_PORT:-5210}; do sleep 1; done
info "==> Will (re-)join leader "$sts_name@$leader.${headless_svc}" ..."
ejabberdctl join_cluster "$sts_name@$leader.${headless_svc}" && sleep 5s
if echo "$(_cluster_member)" | grep -q "$leader"
Expand Down

0 comments on commit 6e6ab45

Please sign in to comment.