Hi list,
First a tribut for the good work to the authors of hoststated.
In the future i plan to use hoststated in production environments
to check for the availability of our webservices.
But before I set it up on my production machine I would make some
testing. I took two tiny Soekrises with OpenBSD 4.1 stable installed,
configured the first one as loadbalancer and the second one as a webserver
with three IPs on one interface.
Here ist the setup in explicit detail:
---------- ---------------- ------------
| client |-----------| loadbalancer |---------| webserver |
---------- ---------------- ------------
192.168.0.10 192.168.0.1 10.0.0.10 10.0.0.1
10.0.0.2
10.0.0.3
my hoststated.conf:
<snip>
#
# Macros
#
public_ip="10.0.0.1"
webhost1="10.0.0.1"
webhost2="10.0.0.2"
webhost3="10.0.0.3"
#
# Global Options
#
interval 15
timeout 5000
prefork 1
log all
#
# Each table will be mapped to a pf table.
#
table webhosts {
real port 443
check https "/index.html" code 200
host $webhost1
host $webhost2
host $webhost3
}
table fallback {
real port 443
check https "/index.html" code 200
host 127.0.0.1
}
#
# Services will be mapped to a rdr rule.
#
service www {
virtual host $public_ip port 443
table webhosts
backup table fallback
}
</snip>
At first everything seemed to work correctly. But when I tried to disable
one of the webhosts and bring him back after a few seconds, hoststated
crashed with the following messages in /var/log/deamon:
<snip>
Jun 6 11:37:24 loadbalancer hoststated[1333]: fatal: relay_dispatch_pfe:
desynchronized
Jun 6 11:37:24 loadbalancer hoststated[5247]: fatal: pfe_dispatch_relay: pipe
closed
Jun 6 11:37:24 loadbalancer hoststated[24980]: fatal: main_dispatch_relay:
pipe closed
Jun 6 11:37:24 loadbalancer hoststated[12810]: fatal: hce_dispatch_parent:
pipe closed
</snip>
This were the commands which brought hoststated down:
# hoststatectl host disable 1
command succeeded
# hoststatectl host enable 1
command succeeded
# hoststatectl show hosts
hoststatectl: connect: /var/run/hoststated.sock: Connection refused
So I ask myself, is hoststated already stable enough for production
environments or should I wait for the release of 4.2 ?
Cheers!
Joerg
--
Dipl.-Ing. (FH) Joerg Streckfuss, Phone: +49 40 808077-631
PGP RSA/2048, E0D4BD3F, 90 C3 FB 4A CB D3 20 70 6B 04 47 84 B5 3C 28 8C
DFN-CERT Services GmbH, https://www.dfn-cert.de, Phone +49 40 808077-555
Sitz / Register: Hamburg, AG Hamburg, HRB 88805, Ust-IdNr.: DE 232129737
[demime 1.01d removed an attachment of type application/pkcs7-signature which
had a name of smime.p7s]