LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

multiple services on VIP

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: multiple services on VIP
From: Mike Borsuk <mrb@xxxxxxx>
Date: Tue, 25 Apr 2006 17:58:47 -0400
Does anyone have a working keepalived.conf they'd like to share which has
at least two virtual_server blocks which refer to the same VIP?

Keepalived sets everything up fine for me as long as I only declare one
service per IP.  As soon as I add another then one of two things happens:

The healthchecker fails or, the healthcheck succeeds but instead of adding
a new service, another realserver is added to the first virtual_server.

For instance, if I have:

virtual_server 206.114.148.54 22 {
  delay_loop 10
  lb_algo rr
  lb_kind NAT
  protocol TCP
  real_server 10.0.0.100 22 {
    TCP_CHECK { connect_timeout 3 }
  }
}

virtual_server 206.114.148.54 80 {
  delay_loop 10
  lb_algo rr
  lb_kind NAT
  protocol TCP
  real_server 10.0.0.100 80 {
    TCP_CHECK { connect_timeout 3 }
  }
}

Then I see in the log: 

Apr 25 16:49:00 bbi-lvs1 Keepalived_healthcheckers: TCP connection to
[10.0.0.100:80] failed !!!
Apr 25 16:49:00 bbi-lvs1 Keepalived_healthcheckers: Removing service
[10.0.0.100:80] from VS [206.114.148.54:22]

I don't know why it fails first, since I can telnet to the port, or why it
is removing it from  VS [206.114.148.54:22].

Thanks in advance for any good ideas.

-- 
mrb

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