Linode Forum
https://forum.linode.com/

Keepalived - Linodes in Same Datacenter - Still split brain
https://forum.linode.com/viewtopic.php?f=19&t=11257
Page 1 of 1

Author:  bigtruck72 [ Sat Aug 23, 2014 6:22 pm ]
Post subject:  Keepalived - Linodes in Same Datacenter - Still split brain

So I have been trying to implement a failover IP / dns solution since wednesday, and have yet to be successful. At first I tried heartbeat, but couldn't get it to work on my dev environment. So then I did some research and found keepalived, which is more inline with what I am after. Ensuring a ip address is up between multiple mysql servers replicating to each other as masters. The single ip ensures a single write master which then propagates to the others, and avoids race conditions.

I am running CentOS 6.5 and the latest upstream version of keepalived is 1.2.7, which apparently dosn't have unicast built into it. So I opted to download 1.2.13 from the keepalived website and compile it manually, to satisfy the unicast requirement. Apparently broad/multi cast is not supported by linode, so the only solution is unicast.

After compiling and installing keepalived on both production servers, I started them with the following configs:

Code:
# Server 1 (master)
global_defs {
        notification_email {

        mike.purcell@shouttag.com

   }
   notification_email_from service-a-2.sn2@j1n.us
   smtp_server mail.hp-lv
   smtp_connect_timeout 30
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 99       
    vrrp_unicast_bind 192.168.136.71 # Internal ip of this node
    vrrp_unicast_peer 192.168.130.88 # Internal ip of backup node
    authentication {
        auth_type PASS
        auth_pass \!amRo4r
    }
    virtual_ipaddress {
        192.168.133.97/17
    }
}


Code:
# Server 2 (backup)
global_defs {
        notification_email {

        mike.purcell@shouttag.com

   }
   notification_email_from service-a-3.sn2@j1n.us
   smtp_server mail.hp-lv
   smtp_connect_timeout 30
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 1
    vrrp_unicast_peer 192.168.136.71 # Internal ip of master node
    vrrp_unicast_bind 192.168.130.88 # Internal ip of this node

authentication {
        auth_type PASS
        auth_pass \!amRo4r
    }
    virtual_ipaddress {
        192.168.133.97/17
    }
}


#####

Notice I am referencing the vrrp_unicast_ directives, as I was hoping this would have resolved my issue. But upon starting heartbeat on both servers, I still ended up with a split brain.

Any idea what I can do to get an ipfailover solution up and running on these servers? I'd like to move onto other projects.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/