VRRP entering master state on both nodes in pair
"Todd D. Taft" <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
I've got two servers, jekyll and hyde, on which I'd like to run two
services. When both systems are up,
I'd like jekyll to handle requests going to one of the services (as
defined by a service IP address) and hyde to handle requests going to
the other. When one of the systems is down/unavailable, I'd like for
the system that is still up to automatically take over both services.
When the other system comes back up, I want the service to revert back
to the original configuration where jekyll handles one service and hyde
handles the other.
Something isn't working as I would expect with my configuration, because
shortly after starting keepalived on either system, that system thinks
it's the master for both services (even when the other system is up).
As such, all requests for both services go to whichever system sent out
the arp packets most recently.
I've copied a configuration that we had working with keepalived version
1.1.17-2ubuntu1 on Ubuntu 10.04 to version 1:1.2.7-1ubuntu1 on Ubuntu
14.04, but now the configuration doesn't work. I've also tried building
1.2.16 from sources on Ubuntu 14.04, but I'm still having the problem.
How do I fix this? keepalived.conf files are included below:
! Configuration File for keepalived on hyde
global_defs {
notification_email {
[email protected]
}
notification_email_from [email protected]
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id hyde
}
vrrp_script chk_jekyll {
script "ping -c 1 jekyll"
interval 1
weight 5
}
vrrp_script chk_hyde {
script "ping -c 1 hyde"
interval 1
weight 5
}
vrrp_instance VI_1 {
state BACKUP
interface eth0
smtp_alert
virtual_router_id 41
priority 101
virtual_ipaddress {
10.1.42.240 label eth0:1
}
track_script {
chk_hyde
}
}
vrrp_instance VI_2 {
state MASTER
interface eth0
smtp_alert
virtual_router_id 42
priority 100
virtual_ipaddress {
10.1.42.241 label eth0:2
}
track_script {
chk_jekyll
}
-=-=-=-=-=
! Configuration File for keepalived on jekyll
global_defs {
notification_email {
[email protected]
}
notification_email_from [email protected]
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id jekyll
}
vrrp_script chk_jekyll {
script "ping -c 1 jekyll"
interval 1
weight 5
}
vrrp_script chk_hyde {
script "ping -c 1 hyde"
interval 1
weight 5
}
vrrp_instance VI_1 {
state MASTER
interface eth0
smtp_alert
virtual_router_id 41
priority 100
virtual_ipaddress {
10.1.42.240 label eth0:1
}
track_script {
chk_hyde
}
}
vrrp_instance VI_2 {
state BACKUP
interface eth0
smtp_alert
virtual_router_id 42
priority 101
virtual_ipaddress {
10.1.42.241 label eth0:2
}
track_script {
chk_jekyll
}
}
--
Todd D. Taft
[email protected]
Linux/UNIX System Administrator
UNC College of Arts and Sciences
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF