Service failover not happenning.
Mitch Patenaude <[email protected]> Sat, 7 Jan 2012 01:00:48 +0000
| Newsgroups | gmane.linux.keepalived.announce |
|---|---|
| Message-ID | <CB2CD9B4.2BB5B%[email protected]> |
--===============5672866009103656489==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_CB2CD9B42BB5Bmpatenaudeshutterflycom_"
--_000_CB2CD9B42BB5Bmpatenaudeshutterflycom_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I've got two boxes running memcached. I want them to act as failover for e=
ach other. I've set up keepalived to handle moving 2 VIPS between the boxe=
s. I can force a failover by shutting down keepalived, but not by shutting =
down memcached. Here's the config for one of the boxes: (IPs and some detai=
ls changed)
global_defs
{
notification_email
{
[email protected]
}
notification_email_from [email protected]
smtp_server 192.168.1.9
smtp_connect_timeout 30
router_id memcache01
}
vrrp_script check_memcache {
script "pkill -0 memcached"
interval 2
weight 2
}
vrrp_instance MemcacheA {
interface eth0
state MASTER
virtual_router_id 41
priority 100
authentication {
auth_type PASS
auth_pass hackme
}
virtual_ipaddress {
192.168.1.28 dev eth0
}
smtp_alert
track_script {
check_memcache
}
}
virtual_server 192.168.1.28 11211 {
delay_loop 6
lb_algo rr
lb_kind TUN
persistence_timeout 50
protocol TCP
sorry_server 192.168.1.29 11211
real_server 127.0.0.1 11211 {
weight 1
TCP_CHECK {
connect_timeout 3
}
}
}
vrrp_instance MemcacheB {
interface eth0
state BACKUP
virtual_router_id 42
priority 50
authentication {
auth_type PASS
auth_pass hackme
}
virtual_ipaddress {
192.168.1.29 dev eth0
}
smtp_alert
track_script {
check_memcache
}
}
virtual_server 192.168.1.29 11211 {
delay_loop 6
lb_algo rr
lb_kind TUN
persistence_timeout 50
protocol TCP
sorry_server 192.168.1.28 11211
real_server 127.0.0.1 11211 {
weight 1
TCP_CHECK {
connect_timeout 3
}
}
}
The other box is pretty much the same except that the MASTER/BACKUP and pri=
orities are switched. I have two mechanisms that should allow for failover.=
First the track script should check to see if memcached is running, and s=
econd the sorry_server should kick in when the primary isn't answering, but=
neither of these mechanisms appear to be working. This is running keepali=
ved 1.2.1 on CentOS 5.4 on kernel 2.6.18-164.el5. Does anybody know what I=
'm doing wrong?
Thanks,
-- Mitch Patenaude [email protected]
--_000_CB2CD9B42BB5Bmpatenaudeshutterflycom_
Content-Type: text/html; charset="us-ascii"
Content-ID: <[email protected]>
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
</head>
<body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-lin=
e-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-fami=
ly: Calibri, sans-serif; ">
<div>I've got two boxes running memcached. I want them to act as fail=
over for each other. I've set up keepalived to handle moving 2 VIPS b=
etween the boxes. I can force a failover by shutting down keepalived, but n=
ot by shutting down memcached. Here's the
config for one of the boxes: (IPs and some details changed)</div>
<div>
<pre style=3D"color: rgb(0, 0, 0); font-style: normal; font-variant: normal=
; font-weight: normal; letter-spacing: normal; line-height: normal; orphans=
: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; wido=
ws: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stro=
ke-width: 0px; word-wrap: break-word; white-space: pre-wrap; ">global_defs
{
notification_email
{
[email protected]
}
notification_email_from [email protected]
smtp_server 192.168.1.9
smtp_connect_timeout 30
router_id memcache01
}
vrrp_script check_memcache {
script "pkill -0 memcached"
interval 2
weight 2
}
vrrp_instance MemcacheA {
interface eth0
state MASTER
virtual_router_id 41
priority 100
authentication {
auth_type PASS
auth_pass hackme
}
virtual_ipaddress {
192.168.1.28 dev eth0=20
}
smtp_alert
track_script {
check_memcache
}
}
virtual_server 192.168.1.28 11211 {
delay_loop 6
lb_algo rr=20
lb_kind TUN
persistence_timeout 50
protocol TCP
sorry_server 192.168.1.29 11211
real_server 127.0.0.1 11211 {
weight 1
TCP_CHECK {=20
connect_timeout 3
}
}
}
vrrp_instance MemcacheB {
interface eth0
state BACKUP
virtual_router_id 42
priority 50
authentication {
auth_type PASS
auth_pass hackme
}
virtual_ipaddress {
192.168.1.29 dev eth0=20
}
smtp_alert
track_script {
check_memcache
}
}
virtual_server 192.168.1.29 11211 {
delay_loop 6
lb_algo rr=20
lb_kind TUN
persistence_timeout 50
protocol TCP
sorry_server 192.168.1.28 11211
real_server 127.0.0.1 11211 {
weight 1
TCP_CHECK {=20
connect_timeout 3
}
}
}
</pre>
</div>
<div>The other box is pretty much the same except that the MASTER/BACKUP an=
d priorities are switched. I have two mechanisms that should allow for fail=
over. First the track script should check to see if memcached is runn=
ing, and second the sorry_server should
kick in when the primary isn't answering, but neither of these mechanisms =
appear to be working. This is running keepalived 1.2.1 on CentOS 5.4 =
on kernel 2.6.18-164.el5. Does anybody know what I'm doing wrong=
?</div>
<div><br>
</div>
<div>Thanks,</div>
<div> -- Mitch Patenaude [email protected]</div>
</body>
</html>
--_000_CB2CD9B42BB5Bmpatenaudeshutterflycom_--
--===============5672866009103656489==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
--===============5672866009103656489==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Keepalived-announce mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-announce
--===============5672866009103656489==--