LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: keepalived not configuring LVS -- nothing in table

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: keepalived not configuring LVS -- nothing in table
Cc: keepalived-devel@xxxxxxxxxxxxxxxxxxxxx
From: Graeme Fowler <graeme@xxxxxxxxxxx>
Date: Wed, 15 Mar 2006 21:45:29 +0000
Hi

Have Cc'd keepalived-devel@xxxxxxxxxxxxxxxxxxxxx for completeness. For
that reason and that reason alone I'm including your entire email
below...

On Wed, 2006-03-15 at 13:17 -0800, Fong Vang wrote:
> I'm having problem getting keepalived to configure LVS -- it's not
> populating LVS table.  I'm using keepalived 1.1.2 and LVS v1.2.0. 
> This is my keepalived.conf file:
> 
> global_defs {
>    notification_email {
>      testuser@xxxxxxxx
>    }
>    notification_email_from testuser@xxxxxxxx
>    smtp_server 10.1.11.57
>    smtp_connect_timeout 30
>    router_id LVS_DEVEL
> }
> 
> vrrp_instance VI_1 {
>     interface eth0
>     virtual_router_id 50
>     nopreempt
>     priority 100
>     advert_int 1
>     virtual_ipaddress {
>         10.1.31.150
>     }
> }
> 
> virtual_server 10.1.31.150 88 {
>     delay_loop 6
>     lb_algo rr
>     lb_kind NAT
>     persistence_timeout 50
>     protocol TCP
> 
>     real_server 192.168.1.1 80 {
>         weight 1
>     }
> }
> 
> Upon startup, it doesn't complain about anything.  This is the only
> info logged to messages:
> 
> Mar 15 20:47:06 winbuild-pllsax Keepalived: Starting Keepalived
> v1.1.12 (03/12,2006)
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp: Using MII-BMSR NIC
> polling thread...
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp: Registering Kernel
> netlink reflector
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp: Registering Kernel
> netlink command channel
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp: Registering
> gratutious ARP shared channel
> Mar 15 20:47:06 winbuild-pllsax Keepalived: Starting VRRP child
> process, pid=6422
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp: Configuration is
> using : 34288 Bytes
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp: ------< Global
> definitions >------
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:  Router ID = LVS_DEVEL
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:  Smtp server = 10.1.11.57
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:  Smtp server
> connection timeout = 30
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:  Email notification
> from = fvang@xxxxxxxxxx
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:  Email notification =
> fvang@xxxxxxxxxx
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp: ------< VRRP Topology >------
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:  VRRP Instance = VI_1
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:    Want State = BACKUP
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:    Runing on device = eth0
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:    Virtual Router ID = 50
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:    Priority = 100
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:    Advert interval = 1sec
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:    Preempt disabled
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:    Virtual IP = 1
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp:      10.1.31.150/32
> brd 10.1.31.150 dev eth0 scope global
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp: VRRP_Instance(VI_1)
> Entering BACKUP STATE
> Mar 15 20:47:06 winbuild-pllsax Keepalived_vrrp: VRRP sockpool:
> [ifindex(2), proto(112), fd(7,8)]
> Mar 15 20:47:10 winbuild-pllsax Keepalived_vrrp: VRRP_Instance(VI_1)
> Transition to MASTER STATE
> Mar 15 20:47:11 winbuild-pllsax Keepalived_vrrp: VRRP_Instance(VI_1)
> Entering MASTER STATE
> Mar 15 20:47:11 winbuild-pllsax Keepalived_vrrp: VRRP_Instance(VI_1)
> setting protocol VIPs.
> Mar 15 20:47:11 winbuild-pllsax Keepalived_vrrp: VRRP_Instance(VI_1)
> Sending gratuitous ARPs on eth0 for 10.1.31.150
> 
> Any idea what could be wrong?  I've tried removing the VRRP section
> without much luck.  I'm wondering why the virtual/real server sections
> are not logged to the messages file..
> 
> Thanks for any help...

When it's running, can you post the output from "ps axfwww | grep
keepalived" please.

I'm hazarding a guess that you're *either*:

1. running it in VRRP only mode, using -vrrp|-P options

2. running a version which didn't compile or configure against the IPVS
framework. Out of the box on my Fedora Core 4 system, running plain
vanilla "./configure" gives me this:

Keepalived configuration
------------------------
Keepalived version       : 1.1.12
Compiler                 : gcc
Compiler flags           : -g -O2
Extra Lib                : -lpopt -lssl -lcrypto
Use IPVS Framework       : No
IPVS sync daemon support : No
Use VRRP Framework       : Yes
Use LinkWatch            : No
Use Debug flags          : No

Whereas running:
"./configure
--with-kernel-dir=/usr/src/kernels/2.6.15-1.1831_FC4-smp-i686" gives me
this:

Keepalived configuration
------------------------
Keepalived version       : 1.1.12
Compiler                 : gcc
Compiler flags           : -g -O2
Extra Lib                : -lpopt -lssl -lcrypto
Use IPVS Framework       : Yes
IPVS sync daemon support : Yes
Use VRRP Framework       : Yes
Use LinkWatch            : No
Use Debug flags          : No

Define the path to your kernel sources as part of the configure, before
make.

If something else is the problem, maybe either list could help.

Graeme


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