Bug 238498 - need fallback service
need fallback service
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: piranha (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Lon Hohberger
Cluster QE
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-30 17:21 EDT by Need Real Name
Modified: 2009-04-16 18:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 15:54:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch, pass 1. (28.36 KB, patch)
2007-05-01 19:24 EDT, Lon Hohberger
no flags Details | Diff
patch, pass 2 (28.73 KB, patch)
2007-05-01 20:12 EDT, Lon Hohberger
no flags Details | Diff
pass 3 - fixes the daemonized mode (29.18 KB, patch)
2007-05-01 20:48 EDT, Lon Hohberger
no flags Details | Diff
pass 4 (30.40 KB, patch)
2007-05-02 10:32 EDT, Lon Hohberger
no flags Details | Diff
pass 5 (30.48 KB, patch)
2007-05-03 13:54 EDT, Lon Hohberger
no flags Details | Diff
add syncdaemon and sorry_server options to piranha gui (4.15 KB, patch)
2007-05-03 15:30 EDT, Need Real Name
no flags Details | Diff
Unified patch + Changelog entries against cvs-head (36.97 KB, patch)
2007-05-07 15:17 EDT, Lon Hohberger
no flags Details | Diff
RHEL5 (0.8.4) patch (33.41 KB, patch)
2008-09-30 16:56 EDT, Lon Hohberger
no flags Details | Diff

  None (edit)
Description Need Real Name 2007-04-30 17:21:20 EDT
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:
Comment 1 Lon Hohberger 2007-05-01 19:20:18 EDT
[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
        }
}

Comment 2 Lon Hohberger 2007-05-01 19:24:24 EDT
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
Comment 3 Lon Hohberger 2007-05-01 19:33:45 EDT
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.
Comment 4 Lon Hohberger 2007-05-01 19:50:00 EDT
Well, it was working awhile ago; I must have introduced another bug.
Comment 5 Lon Hohberger 2007-05-01 20:12:12 EDT
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.
Comment 6 Lon Hohberger 2007-05-01 20:14:17 EDT
Man page updates are missing.  Gui updates are missing.
Comment 7 Lon Hohberger 2007-05-01 20:15:01 EDT
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.
Comment 8 Lon Hohberger 2007-05-01 20:32:29 EDT
Still doesn't seem to work if daemonized.  I'll fix that later.

running with pulse -n seems to work flawlessly.
Comment 9 Lon Hohberger 2007-05-01 20:48:41 EDT
Created attachment 153914 [details]
pass 3 - fixes the daemonized mode

Tarball updated... ;)
Comment 10 Lon Hohberger 2007-05-02 10:32:43 EDT
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
Comment 11 Lon Hohberger 2007-05-03 13:54:35 EDT
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
Comment 12 Need Real Name 2007-05-03 15:30:50 EDT
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.
Comment 13 Need Real Name 2007-05-03 15:32:07 EDT
Thanks, that's awesome. That plus the patch to the GUI I just posted make
Piranha a lot nicer.

Steve
Comment 14 Lon Hohberger 2007-05-07 15:17:50 EDT
Created attachment 154291 [details]
Unified patch + Changelog entries against cvs-head
Comment 15 Lon Hohberger 2007-05-07 15:31:34 EDT
Reporter-tested; developer-tested.

Marking modified
Comment 16 RHEL Product and Program Management 2007-05-10 13:25:07 EDT
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.
Comment 17 Lon Hohberger 2007-06-12 11:54:23 EDT
I've committed the unified patch to CVS
Comment 22 Lon Hohberger 2008-09-24 10:32:03 EDT
Fixing state.
Comment 23 Lon Hohberger 2008-09-30 16:56:16 EDT
Created attachment 318124 [details]
RHEL5 (0.8.4) patch
Comment 28 errata-xmlrpc 2009-01-20 15:54:32 EST
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

Note You need to log in before you can comment on or make changes to this bug.