0

I'm setting up a LVS cluster using tunneling. The goal is to have two director servers (in different datacenters), and a single real server (for the moment, more will be added later in load-balance). The real server is accessed over ports 80, 443 and 8080

I've managed to configure my main director and it's working just fine, all ports are open and data is flowing well

But, the backup director is only able to connect to the real server on port 443. Here's the output I get in /var/log/messages:

Oct 27 12:25:20 vps4252 pulse[2819]: STARTING PULSE AS MASTER
Oct 27 12:25:38 vps4252 pulse[2819]: partner dead: activating lvs
Oct 27 12:25:38 vps4252 lvsd[2821]: starting virtual service https active: 443
Oct 27 12:25:38 vps4252 lvsd[2821]: create_monitor for https/node1 running as pid 2831
Oct 27 12:25:38 vps4252 lvsd[2821]: starting virtual service http_8080 active: 8080
Oct 27 12:25:38 vps4252 lvsd[2821]: create_monitor for http_8080/node1 running as pid 2833
Oct 27 12:25:38 vps4252 nanny[2831]: starting LVS client monitor for 103.13.xxx.xxx:443 -> 103.29.zzz.zzz:443
Oct 27 12:25:38 vps4252 nanny[2833]: starting LVS client monitor for 103.13.xxx.xxx:8080 -> 103.29.zzz.zzz:8080
Oct 27 12:25:38 vps4252 nanny[2831]: [ active ] making 103.29.zzz.zzz:443 available
Oct 27 12:25:43 vps4252 pulse[2823]: gratuitous lvs arps finished

(ignore the missing port 80 lines, I disabled it at the time for testing)

It seems the nanny process is only able to connect to the real server on port 443. Yet, with netcat or curl, I get a correct response over those other 2 ports.

Here's my lvs.cf (as a single server):

serial_no = 36
primary = 103.13.yyy.yyy
service = lvs
backup = 0.0.0.0
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = tunnel
debug_level = NONE
virtual http {
    active = 1
    address = 103.13.xxx.xxx eth0:1
    vip_nmask = 255.255.255.255
    port = 80
    send = "GET / HTTP/1.0\r\n\r\n"
    expect = "HTTP"
    use_regex = 0
    load_monitor = none
    scheduler = rr
    protocol = tcp
    timeout = 6
    reentry = 15
    quiesce_server = 0
    #Define nodes
    server node1 {
        address = 103.29.zzz.zzz
        active = 1
        port = 80
        weight = 1
    }
}
virtual https {
    active = 1
    address = 103.13.xxx.xxx eth0:1
    vip_nmask = 255.255.255.255
    port = 443
    send = "GET / HTTP/1.0\r\n\r\n"
    expect = "HTTP"
    use_regex = 0
    load_monitor = none
    scheduler = rr
    protocol = tcp
    timeout = 6
    reentry = 15
    quiesce_server = 0
    #Define nodes
    server node1 {
        address = 103.29.zzz.zzz
        active = 1
        port = 443
        weight = 1
    }
}
virtual http_8080 {
    active = 1
    address = 103.13.xxx.xxx eth0:1
    vip_nmask = 255.255.255.255
    port = 8080
    send = "GET / HTTP/1.0\r\n\r\n"
    expect = "HTTP"
    use_regex = 1
    protocol = tcp
    #Define nodes
    server node1 {
        address = 103.29.zzz.zzz
        active = 1
        port = 8080
        weight = 1
    }
}

The tunnel on the real server has been set correctly (after all, port 443 is working)

So I am stumped... Is there a way to force the node to be active, even if nanny does not find it?

eTiMaGo
  • 43
  • 1
  • 5

1 Answers1

0

This was solved by creating a bash script to ping the real servers, and calling it from the lvs config file

eTiMaGo
  • 43
  • 1
  • 5