Bug 238498

Summary: need fallback service
Product: Red Hat Enterprise Linux 5 Reporter: Need Real Name <steve>
Component: piranhaAssignee: Lon Hohberger <lhh>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: cluster-maint, lhh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 20:54:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
Patch, pass 1.
patch, pass 2
pass 3 - fixes the daemonized mode
pass 4
pass 5
add syncdaemon and sorry_server options to piranha gui
Unified patch + Changelog entries against cvs-head
RHEL5 (0.8.4) patch none

Description Need Real Name 2007-04-30 21:21:20 UTC
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 


Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Lon Hohberger 2007-05-01 23:20:18 UTC
[root@red piranha]# ./pulse -n
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
[bring up the real server]
nanny pid 30700 activated
Virtual Server server1: 1 real servers; deactivate sorry_server

Config looks like:

virtual server1 {
        address = eth0:1
        vip_nmask =
        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 =

        server Real1 {
                address =
                active = 1
                weight = 1

Comment 2 Lon Hohberger 2007-05-01 23:24:24 UTC
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:


Comment 3 Lon Hohberger 2007-05-01 23:33:45 UTC
(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 23:50:00 UTC
Well, it was working awhile ago; I must have introduced another bug.

Comment 5 Lon Hohberger 2007-05-02 00:12:12 UTC
Created attachment 153907 [details]
patch, pass 2

Previously mentioned tarball has been updated.

Tested with localhost ( as the sorry_server, too:

virtual server1 {
	address = eth0:1
	vip_nmask =
	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 =

	server Real1 {
		address =
		active = 1
		weight = 1

Note: did not test with NAT.  Someone else gets to.

Comment 6 Lon Hohberger 2007-05-02 00:14:17 UTC
Man page updates are missing.  Gui updates are missing.

Comment 7 Lon Hohberger 2007-05-02 00:15:01 UTC
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-02 00:32:29 UTC
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-02 00:48:41 UTC
Created attachment 153914 [details]
pass 3 - fixes the daemonized mode

Tarball updated... ;)

Comment 10 Lon Hohberger 2007-05-02 14:32:43 UTC
Created attachment 153954 [details]
pass 4

(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:


Comment 11 Lon Hohberger 2007-05-03 17:54:35 UTC
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)


Comment 12 Need Real Name 2007-05-03 19:30:50 UTC
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

Comment 13 Need Real Name 2007-05-03 19:32:07 UTC
Thanks, that's awesome. That plus the patch to the GUI I just posted make
Piranha a lot nicer.


Comment 14 Lon Hohberger 2007-05-07 19:17:50 UTC
Created attachment 154291 [details]
Unified patch + Changelog entries against cvs-head

Comment 15 Lon Hohberger 2007-05-07 19:31:34 UTC
Reporter-tested; developer-tested.

Marking modified

Comment 16 RHEL Product and Program Management 2007-05-10 17:25:07 UTC
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

Comment 17 Lon Hohberger 2007-06-12 15:54:23 UTC
I've committed the unified patch to CVS

Comment 22 Lon Hohberger 2008-09-24 14:32:03 UTC
Fixing state.

Comment 23 Lon Hohberger 2008-09-30 20:56:16 UTC
Created attachment 318124 [details]
RHEL5 (0.8.4) patch

Comment 28 errata-xmlrpc 2009-01-20 20:54:32 UTC
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.