LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Problems with keepalived

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Problems with keepalived
From: Sébastien BONNET <sebastien.bonnet@xxxxxxxxxxx>
Date: Thu, 29 Jun 2006 12:38:16 +0200
Brad Dameron a écrit :
On Wed, 2006-06-28 at 10:22 +0100, Dr A V Le Blanc wrote:
For many years we have used keepalived to manage our lvs farm,
but I have never managed to get it to failover automatically,
so I've simply used manual failover.  I have tried a large number
of minor variations on configuration files, but let me give a
simple example.  There are two directors.  One has this in its
/etc/keepalived/keepalived.conf file:

vrrp_sync_group VG1 {
  group {
    VI_1
  }
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 150
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        130.88.203.138
        130.88.203.219
    }
}

and the other has this:

vrrp_sync_group VG1 {
  group {
    VI_1
  }
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 51
    priority 50
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        130.88.203.138
        130.88.203.219
    }
}


Your virtual_router_id on the backup needs to be incremented.

I don't agree with that. From keepalived.conf man page :

virtual_router_id is used to differentiate multiple instances of vrrpd running on the same NIC

I'd rather replace NIC by network.

This means that, across a given network, each VRRP instance should have its own/unique virtual_router_id.

But, as there is no "master VRRP instances" nor "backup VRRP instances" but "virtual instances in master or backup state", all servers hosting the same VRRP instance should have the same virtual_router_id for that instance.

If you have a simple symmetric cluster, your conf file should be the same on both servers, except for the following keywords in vrrp_instance: state, priority, nopreempt and interface.

--
Sébastien BONNET     --    Ingénieur système
Tel: 04.42.25.15.40      GSM: 06.64.44.58.98

<Prev in Thread] Current Thread [Next in Thread>