diff --git a/etc/keepalived/keepalived.conf.env b/etc/keepalived/keepalived.conf.env index 308187e..eb5e841 100644 --- a/etc/keepalived/keepalived.conf.env +++ b/etc/keepalived/keepalived.conf.env @@ -1,15 +1,10 @@ ! Configuration File for keepalived global_defs { - notification_email { - filippov@custis.ru - } - notification_email_from filippov@custis.ru - smtp_server localhost - smtp_connect_timeout 30 router_id $keepalived_router_id script_user root enable_script_security + lvs_sync_daemon $eth10g VI_1 } vrrp_instance VI_1 { @@ -18,7 +13,6 @@ vrrp_instance VI_1 { garp_master_delay 10 smtp_alert virtual_router_id 51 - lvs_sync_daemon_interface $eth10g priority 100 advert_int 1 authentication { diff --git a/etc/one/one-cluster.sh b/etc/one/one-cluster.sh index 4531e4f..9e00497 100755 --- a/etc/one/one-cluster.sh +++ b/etc/one/one-cluster.sh @@ -1,17 +1,33 @@ #!/bin/bash +set -e + TYPE=$1 NAME=$2 STATE=$3 case $STATE in - "MASTER") systemctl opennebula start; systemctl opennebula-sunstone start; systemctl opennebula-scheduler start; systemctl opennebula-novnc start - ;; - "BACKUP") systemctl opennebula stop; systemctl opennebula-sunstone stop; systemctl opennebula-scheduler stop; systemctl opennebula-novnc stop - ;; - "FAULT") systemctl opennebula stop; systemctl opennebula-sunstone stop; systemctl opennebula-scheduler stop; systemctl opennebula-novnc stop + "MASTER") + systemctl start opennebula + systemctl start opennebula-sunstone + systemctl start opennebula-scheduler + systemctl start opennebula-novnc exit 0 ;; - *) /sbin/logger "ipsec unknown state" + "BACKUP") + systemctl stop opennebula + systemctl stop opennebula-sunstone + systemctl stop opennebula-scheduler + systemctl stop opennebula-novnc + exit 0 + ;; + "FAULT") + systemctl stop opennebula + systemctl stop opennebula-sunstone + systemctl stop opennebula-scheduler + systemctl stop opennebula-novnc + exit 0 + ;; + *) /sbin/logger "opennebula: unknown state" exit 1 ;; esac