LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Keepalived Active/Passive not working

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Keepalived Active/Passive not working
From: "Victor" <victord@xxxxxxxx>
Date: Sun, 24 Mar 2002 12:38:25 -0500
I am trying to set up an Active/Passive setup of keepalived (0.5.3) with
ipvs
ipvsadm v1.20 2001/11/04 (compiled with popt and IPVS v0.9.10)

I have a Master and a Backup and if I stop Master, Backup doesn't take over.
I can't figure out what I am doing wrong.

Boxes:
Linux 2.4.17 RH 7.2 i386

Here is the setup:

(
The Backup changes
1. MASTER to BACKUP
2. virtual_router_id to 52
3. Priority to 100
4. ??? I tried keeping vrrp_instance both same and different
5. ??? I tried keeping virtual_router_id both same and different
)

global_defs {
    notification_email {
        admin@xxxxxxxxxxxx
    }
    notification_email_from lvs@xxxxxxxxxxxxxxxxx
    smtp_server 10.0.30.254
    smtp_connect_timeout 30
    lvs_id LVS_MAIN
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 150
    advert_int 1
    authentication {
        auth_type AH
        auth_pass SOMEPASS
    }
    virtual_ipaddress {
        10.0.30.50
    }
}

######################################################################
# 10.0.30.50
######################################################################
virtual_server 10.0.30.50 80 {
    delay_loop 6
    lb_algo rr
    lb_kind DR
    nat_mask 255.255.255.0
    persistence_timeout 50
    protocol TCP

    real_server 10.0.30.4 80 {
        weight 1
        TCP_CHECK {
                connect_timeout 3
        }
    }
    real_server 10.0.30.5 80 {
        weight 1
        TCP_CHECK {
                connect_timeout 3
        }
    }
}

-----------------------------------------------------

Also, unrelated issues:

A. Keepalived doesn't seem to like hostnames so
virtualserver svr1.domain.com 80 {
OR
virtualserver svr1.domain.hom http {

don't seem to work. I've asked before and I think I was told that this
should work. I don't so much care about the port, but I think using a
hostname can be helpful and explanatory when browsing (since many domains
can be on the same IP).

The issue here is that svr1.domain.com could be on 10.0.30.2 and 10.0.30.3
while svr2.domain.com can be on .3 and .4 (made up numbers just for
example). Is this possible or would they need separate VIPs?

B. Any plans to extend the configuration? Since virtual servers grow faster
than real servers, perhaps this kind of config would be beneficial.

real_server_pool POOL1 {
    real_server 10.0.30.4 80 {
        weight 1
        TCP_CHECK {
                connect_timeout 3
        }
    }
    real_server 10.0.30.5 80 {
        weight 1
        TCP_CHECK {
                connect_timeout 3
        }
    }
}

virtual_server 10.0.30.50 80 {
    delay_loop 6
    lb_algo rr
    lb_kind DR
    nat_mask 255.255.255.0
    persistence_timeout 50
    protocol TCP

    real_server POOL1
}

Or something of this sort. Also, perhaps having more than one port like this
virtual_server 10.0.30.50 80,443 {

This would save a ton of space in the config file and make it more
manageable.



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