Add in cron and kojira tasks for passive hub. Add keepalived script to enable/disable on master/backup.

This commit is contained in:
Kevin Fenzi 2015-01-16 18:57:25 +00:00
parent 9fa2c79048
commit 1ba5dc01a5
9 changed files with 210 additions and 0 deletions

View file

@ -0,0 +1,34 @@
#!/bin/bash
TYPE=$1
NAME=$2
STATE=$3
#
# We are becoming master node
#
if [ $STATE == "MASTER" ]; then
# systemctl stop kojira
# rm -f /etc/cron.d/kojifix
# rm -f /etc/cron.d/koji-directory-cleanup
# rm -f /etc/cron.d/koji-gc
# rm -f /etc/cron.d/koji-prunesigs
logger "just became keepalived master"
fi
#
# We are becoming the backup node
#
if [ $STATE == "BACKUP" ]; then
# systemctl start kojira
# /etc/cron.d/kojifix
# rm -f /etc/cron.d/koji-directory-cleanup
# rm -f /etc/cron.d/koji-gc
# rm -f /etc/cron.d/koji-prunesigs
logger "just became keepalived backup"
fi
#
# something horrible has gone wrong
#
if [ $STATE == "FAULT" ]; then
logger "just had a keepalived fault"
fi