Hi Holger, On Wed, Mar 03, 2010 at 05:46:33PM +0100, Holger Just wrote: > Hi there, > > As I recently started to use Solaris in favor of Linux I stumbled over > the impossibility to fully integrate Haproxy into the SMF framework. > > The problem is the way graceful reloads are implemented in Haproxy > (using the -sf switch). As a new top level process is started SMF chocks > and fails to comply.
You may be interested in checking Chris May's experience here : http://blogs.warwick.ac.uk/chrismay/entry/solaris_smf_and (and maybe contact him to give a test to your wrapper). > So I developed a launcher daemon in Python which acts as the parent > process that SMF can monitor. Sending a SIGHUP to that process spawns a > new Haproxy instance with the correct -sf parameters. It only exists if > the last Haproxy process died or if it gets a SIGTERM. > > If anyone is interested: The code and some documentation can be found here: > > http://dev.holgerjust.de/projects/haproxy/wiki#Solaris-SMF-Integration > > Please not that the launcher code is still not very well tested. So > don't be suprised if it eats your cat, sleeps with your wife and tries > to rule the world. But at least it runs fine at one of my Opensolaris > servers. When it's stable enough, maybe you'll want to merge it into mainline. If so, simply drop me a mail and we'll make a place for it in contrib/. As a side note, I see that it requires a recent version of python. Just out of curiosity, could it (more or less) easily be written in shell ? I'm asking because on the Solaris machines where I've seen haproxy, there was no python and it's very unlikely that it will be installed for a single tool. Regards, Willy

