Commit db1d8b86 authored by iSergio's avatar iSergio
Browse files

New functional and checks

parent fba24ada
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -99,5 +99,7 @@ sed -i "s/PGPORT=5432/PGPORT=5433/g" /etc/sysconfig/pgsql/postgresql
chkconfig pgpool on

# Add check status of nodes every minute into cron
if ! grep -Fq "pg_auto_attach_node" /etc/crontab; then
    echo '* * * * * root /usr/local/bin/pg_auto_attach_node' >> /etc/crontab
fi
/etc/init.d/crond restart
+0 −5
Original line number Diff line number Diff line
@@ -34,11 +34,6 @@ if [ $NEW_MASTER_NODE_ID == $OLD_PRIMARY_NODE_ID ]; then
    exit 0
fi

#if [ $NEW_MASTER_NODE_ID == $OLD_MASTER_NODE_ID ]; then
#    echo "[INFO] Standby node is down. Failover not triggered!"
#    exit 0
#fi

echo "[INFO] Primary node down. Performing failover!"

# If new host equals of current server hots - do local touch, other do ssh touch