Description of problem: Would like to see a feature implimented in pulse/piranha for a fallback service so that if all real servers are down, traffic will be directed to a "sorry server". This would help with replacing ldirectord with piranha/pulse. Thanks. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
[root@red piranha]# ./pulse -n pulse: STARTING PULSE AS MASTER pulse: partner dead: activating lvs lvs: starting virtual service server1 active: 80 lvs: create_monitor for server1/Real1 running as pid 30700 pulse: gratuitous lvs arps finished [take down the real server] nanny pid 30700 inactive Virtual Server server1: No real servers; activate sorry_server 192.168.79.43 [bring up the real server] nanny pid 30700 activated Virtual Server server1: 1 real servers; deactivate sorry_server 192.168.79.43 Config looks like: virtual server1 { address = 192.168.79.20 eth0:1 vip_nmask = 255.255.252.0 active = 1 timeout = 5 reentry = 10 port = http send = "GET / HTTP/1.0\r\n\r\n" expect = "HTTP" scheduler = wlc protocol = tcp sorry_server = 192.168.79.43 server Real1 { address = 192.168.79.21 active = 1 weight = 1 } }
Created attachment 153903 [details] Patch, pass 1. This applies against 0.8.6 from cvs; a tarball with the patch applied is here: patched tarball here: http://people.redhat.com/lhh/piranha-0.8.6-patched-238498.tar.gz
Notes: (1) patch developed on current cvs-head of piranha (2) only tested w/ direct routing (3) only tested with another server as sorry_sever; did not test localhost. (4) tested with pulse -n; there may be daemonizing problems.
Well, it was working awhile ago; I must have introduced another bug.
Created attachment 153907 [details] patch, pass 2 Previously mentioned tarball has been updated. Tested with localhost (127.0.0.1) as the sorry_server, too: virtual server1 { address = 192.168.79.20 eth0:1 vip_nmask = 255.255.252.0 active = 1 timeout = 5 reentry = 10 port = http send = "GET / HTTP/1.0\r\n\r\n" expect = "HTTP" scheduler = wlc protocol = tcp sorry_server = 127.0.0.1 server Real1 { address = 192.168.79.21 active = 1 weight = 1 } } Note: did not test with NAT. Someone else gets to.
Man page updates are missing. Gui updates are missing.
When bringing up, the second patch may activate the sorry_server temporarily until it gets a status report from the realserver nanny processes. This is normal.
Still doesn't seem to work if daemonized. I'll fix that later. running with pulse -n seems to work flawlessly.
Created attachment 153914 [details] pass 3 - fixes the daemonized mode Tarball updated... ;)
Created attachment 153954 [details] pass 4 Changes: (1) Only enables new code paths in lvsd if sorry_server is enabled for a given virtual service. (2) Adds entry for sorry_server to lvs.cf.5 man page new tarball: http://people.redhat.com/lhh/piranha-0.8.6-sorry4.tar.gz
Created attachment 154052 [details] pass 5 * Fixes nanny's logging (so you still see it when sorry_server is enabled) * Adds syslog reporting to lvsd for sorry server activation * Makes signal handling work correctly * Changes to event driven model; waits for children to report status rather than using alarm(5) + sigsuspend + polling (slightly decreases transition time of real servers<->no real servers) http://people.redhat.com/lhh/piranha-0.8.6-sorry5.tar.gz
Created attachment 154065 [details] add syncdaemon and sorry_server options to piranha gui Here's a patch to add the syncdaemon and sorry_server options to the piranha-gui.
Thanks, that's awesome. That plus the patch to the GUI I just posted make Piranha a lot nicer. Steve
Created attachment 154291 [details] Unified patch + Changelog entries against cvs-head
Reporter-tested; developer-tested. Marking modified
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
I've committed the unified patch to CVS
Fixing state.
Created attachment 318124 [details] RHEL5 (0.8.4) patch
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-0095.html