do the right thing on failovers on pgbdr
This commit is contained in:
parent
85de66a9ba
commit
3a7972233a
2 changed files with 4 additions and 0 deletions
|
@ -14,11 +14,13 @@ fi
|
||||||
# We are becoming the backup node
|
# We are becoming the backup node
|
||||||
#
|
#
|
||||||
if [ $STATE == "BACKUP" ]; then
|
if [ $STATE == "BACKUP" ]; then
|
||||||
|
systemctl restart posgresql-9.4
|
||||||
logger "just became keepalived backup"
|
logger "just became keepalived backup"
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
# something horrible has gone wrong
|
# something horrible has gone wrong
|
||||||
#
|
#
|
||||||
if [ $STATE == "FAULT" ]; then
|
if [ $STATE == "FAULT" ]; then
|
||||||
|
systemctl stop posgresql-9.4
|
||||||
logger "just had a keepalived fault"
|
logger "just had a keepalived fault"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -14,11 +14,13 @@ fi
|
||||||
# We are becoming the backup node
|
# We are becoming the backup node
|
||||||
#
|
#
|
||||||
if [ $STATE == "BACKUP" ]; then
|
if [ $STATE == "BACKUP" ]; then
|
||||||
|
systemctl restart posgresql-9.4
|
||||||
logger "just became keepalived backup"
|
logger "just became keepalived backup"
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
# something horrible has gone wrong
|
# something horrible has gone wrong
|
||||||
#
|
#
|
||||||
if [ $STATE == "FAULT" ]; then
|
if [ $STATE == "FAULT" ]; then
|
||||||
|
systemctl stop posgresql-9.4
|
||||||
logger "just had a keepalived fault"
|
logger "just had a keepalived fault"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue