ok able to get vrrp to detect webfarms down by http_get on vrrp, however
still unable to change the state or reduce the priority of MASTER
global_defs {
notification_email {
[email protected]
}
notification_email_from [email protected]
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id LVS_XXXXXX
}
vrrp_script chk_haproxy {
script "killall -0 haproxy"
interval 2
weight 2
}
vrrp_instance loadbalance1 {
state MASTER
interface eth0
virtual_router_id 51
priority 101
advert_int 1
smtp_alert
authentication {
auth_type PASS
auth_pass somepassword
}
virtual_ipaddress {
192.168.88.95
}
track_script {
chk_haproxy
}
}
virtual_server 192.168.88.95 80 {
delay_loop 6
lb_algo rr
lb_kind NAT
nat_mask 255.255.255.0
persistence_timeout 50
protocol TCP
real_server 192.168.88.96 80 {
weight 1
# TCP_CHECK {
# connect_port 80
# connect_timeout 3
# }
HTTP_GET {
url {
path /index.html
digest a1be24adde652800a4ec1c4e129d6014
}
connect_timeout 10
connect_port 80
}
}
}
On 19 April 2013 02:02, Joshua Chee <[email protected]> wrote:
> shared IP=192.168.88.95
>
> | |
>
> keepalived1 keepalived2
>
> | |
>
> haproxy1 haproxy2
>
> 192.168.88.96:80 192.168.88.97:80
> | |
>
> |------------| |------------|
>
> apache1 apache2 apache3 apache4
>
> 192.168.88.96:8080 192.168.88.97:8080
>
> 192.168.88.96:8090 192.168.88.97:8090
>
>
>
> On 19 April 2013 01:42, Joshua Chee <[email protected]> wrote:
>
>> I am running 2VRRP and 2HA. Each VRRP is linked to 1 HA and each HA is
>> linked to 2 apache webserver.
>>
>> I am only able to make the vrrp failover when i stop the vrrp service,
>> not able to do that when i stop the haproxy service or stop all apache
>> services.
>>
>> Is there a way for haproxy to stop or reflect when all its webfarms are
>> down?
>>
>> I am trying to run a script in vrrp as per alot of guides,
>> vrrp_script chk_haproxy{
>> script "killall -0 haproxy"
>> interval 2
>> weight 2
>> }
>>
>> [...]
>> track_script{
>> chk_haproxy
>> }
>> [...]
>>
>> However this is not able to change my vrrp state.
>>
>
>