Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add log for setUpVip #83

Merged
merged 2 commits into from
Jan 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -222,12 +222,19 @@ checkVip() {
setUpVip() {
local masterIp; masterIp="${1:-$(findMasterIp)}"
local myIps; myIps="$(hostname -I)"
log --debug "setting up vip: [master=$masterIp me=$myIps] ..."
log "setting up vip: [master=$masterIp me=$myIps Vip=$REDIS_VIP] ..."
if [ "$MY_IP" == "$masterIp" ]; then
[[ " $myIps " == *" $REDIS_VIP "* ]] || bindVip
[[ " $myIps " == *" $REDIS_VIP "* ]] || {
log "This is the master node, though VIP is unbound. Binding VIP ..."
bindVip
}
else
[[ " $myIps " != *" $REDIS_VIP "* ]] || unbindVip
[[ " $myIps " != *" $REDIS_VIP "* ]] || {
log "This is not the master node, though VIP is still bound. Unbinding VIP ..."
unbindVip
}
fi
log "setUpVip successful"
}

bindVip() {
@@ -396,6 +403,7 @@ check(){
}
[[ "${REVIVE_ENABLED:-"true"}" == "true" ]] || return 0
_check
checkVip
}

getRedisRoles(){
2 changes: 1 addition & 1 deletion app-standalone/cluster.json.mustache
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
"container": {
"type": "lxc",
"zone": "pek3a",
"image": "img-wi6n5w1h"
"image": "img-v6qv1l0c"
},
"instance_class": {{cluster.node.instance_class}},
"count": {{cluster.node.count}},