On Fri, Nov 30, 2007 at 03:17:59PM -0600, Aaron Linnen wrote: > Simon Horman wrote: > >On Thu, Nov 29, 2007 at 08:41:27AM -0600, Aaron Linnen wrote: > > > >>I have a service with a custom protocol that I'm load balancing and I > >>didn't > >>find an easy way to get that going with ldirectord. I came up with a quick > >>modification that enabled what I needed, but would appreciate comments or, > >>ideally including similar functionality in future releases. > >> > >>It's a new service type called simpletcp, and is configured like so: > >>virtual = 192.168.44.3:10301 > >> protocol = tcp > >> scheduler = wlc > >> real = 192.168.45.4:10301 gate 100 > >> real = 192.168.45.5:10301 gate 100 > >> service = simpletcp > >> request = "command\narg\n.\n" > >> receive = "^\+OK" > >> > >>The check simply sends the request string down the connection and tests > >>against the receive regex. My perl-foo is weak these days, so I'm sure > >>there > >>are some easy improvements that could be made. > >> > > > >Hi Arron, > > > >thanks for your patch. This idea looks like a good one to me and > >I'm quite happy to push it into the next release (or the one after that, > >as the next release is close to going out the door). > > > >A few things: > > > >* How well have you tested this? Its unlikely to break anything except > > itself, but its good to get an idea anyway. > >* Can you add something to the documentation at the top of ldirectord? > > Perhaps doding this as a second patch would work well. > >* Your patch seemed to replace all tabs with spaces so it didn't apply. > > I manually fixed this up and the fixed version is below. > >* If at all possible could you provide a sign-off line as described > > in section 5 of http://linux.yyz.us/patch-format.html > > Thats basically to say this is your work and you are ok with > > it going into a GPL project. > > > > Hi Horms, thanks for the interest. > > We're only in development mode here right now, but it's stood up well > under the testing we have done including some load testing. The code > is pretty much just the check_sip code, with the request swapped out. > > Patch attached with some tiny bits of documentation. Sorry about the > previous patch. hopefully this one will come through correctly. > > One area I see potential improvement is the \n handling - I can see > the need for at least \r as well, probably others. I was looking for a > quick way to have perl parse the line as it does string literals in > code so that all the same perl escape syntax could be used (enabling > embedded nulls or other binary data), but didn't see an easy way and I > didn't need that for the current project so I left it. If someone > knows a simple, safe and secure way to enable that, I think it would > really improve this to where it can be used in as many circumstances > as possible. > > Signed-off-by: Aaron J. Linnen <[EMAIL PROTECTED]>
Hi Aaron, this all looks fine to me. I have applied both your patches and they should show up in the next release. http://hg.linux-ha.org/dev/rev/80134dfbf9ec http://hg.linux-ha.org/dev/rev/9c2436e4458a -- Horms _______________________________________________ LinuxVirtualServer.org mailing list - [email protected] Send requests to [EMAIL PROTECTED] or go to http://lists.graemef.net/mailman/listinfo/lvs-users
