[SATLUG] Piranha/LVS question

Gabriel Doss gabe at gabrieldoss.com
Wed Jun 9 16:33:06 CDT 2010


So I'm trying to get Piranha/LVS running for our mail server--already
running for Oracle and http/https--and I am running into a little trouble
with SMTP and IMAP/S. I have a couple of scripts that test whether or not
the service is active on each mail server, but if they do not return the
expected string Piranha is not shutting down the server.

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

For smtp I have the following:

#!/bin/bash

HOST=$1
PORT=$2

telnet ${HOST} ${PORT}

In the piranha configuration I have the following:
/path/to/script %h smtp

The expected return is:
220 example.com ESMTP Postfix

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

For imap/s I have the following:

#!/bin/bash

HOST=$1
PORT=$2

openssl s_client -connect ${HOST}:${PORT} | sed -ne '/*\ OK/,/ready\./p'"
exit0

In the piranha configuration I have the following:
/path/to/script %h 993

The expected return is:
* OK Dovecot Ready.

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

Both of these bring two mail servers up in the piranha interface. The
problem is only one of the two servers is actually up and running right now.
Each time piranha starts handing packets to the second mail server it fails
to connect (obviously). Why is piranha not correctly identifying the
connection failure and only leaving mail server one up?

All the boxes in question are running CentOS 5.4 x86_64.

Thank you for any help you can give me.

Gabriel


More information about the SATLUG mailing list