Bug 396241 - Support for Real Server's remote port
Support for Real Server's remote port
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: piranha (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Marek Grac
Depends On:
Blocks: 429864
  Show dependency treegraph
Reported: 2007-11-22 21:45 EST by Nuno Tavares
Modified: 2009-04-16 16:36 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2008-0794
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-25 15:08:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Brenton's patch to piranha for lvs.cf "port" option (19.68 KB, patch)
2007-11-22 21:49 EST, Nuno Tavares
no flags Details | Diff
Nuno Tavares patch to piranha-gui for real server "port" option (3.06 KB, patch)
2007-11-22 21:50 EST, Nuno Tavares
no flags Details | Diff

  None (edit)
Description Nuno Tavares 2007-11-22 21:45:11 EST
Description of problem:
Neither piranha (pulse, nanny, etc) nor piranha-gui (web GUI) support specifying
a different port on the real servers (than that on VIP). 

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

How reproducible:
For instance, if you want to have two real servers (RS), both listening at port
80 and 81, but have a two director's VIPs listening at 80, one that will balance
to RS:80 and another to balance to RS:81, you can't - either because piranha-gui
doesn't let you to specify remote ports, nor because pulse/nanny won't be able
to read the new parameter.

Steps to Reproduce:
1. Use the piranha-gui interface to setup a simple service that listens on
VIP:80, but redirects to Real IP:81. You can't.

Actual results:

Expected results:
Since ipvsadm lets you do this, there is no reason to doesn't support it.

Additional info:
I found a related discussion on the cluster-devel mailing-list archives [1],
where Brenton Rothchild delivers a patch[2] that he claims to be "using in heavy
production for about 9 months" (2006).

I have myself tried patching piranha, and I'm using it for some days, without

[1] http://osdir.com/ml/linux.redhat.piranha/2006-10/msg00000.html
[2] http://osdir.com/ml/linux.redhat.piranha/2006-10/msg00003.html

So I'm posting here two patches: Brenton's, that will patch piranha, and mine,
that will patch piranha-gui to support Brenton's (otherwise the file had to be
edited manually).

Please verify and upstream.

Best regards,
Comment 1 Nuno Tavares 2007-11-22 21:49:26 EST
Created attachment 267301 [details]
Brenton's patch to piranha for lvs.cf "port" option

Quote: Brenton Rothchild [1]

It does the following things:

- Adds a "port" option to real-server blocks in lvs.cf. This value defaults to
the virtual service port number if specified, and port 80 if neither are
specified (this is the default as is currently in piranha). This port value is
passed to the "-r" argument for ipvsadm as called by nanny.

- Adds the "-r" argument to nanny itself, similar to the already existing "-p"
argument. The manpage for nanny has been updated to reflect this usage.

- The special token "%p" has been added to nanny's external check command
syntax in order to utilize the specific real-server port number in
command-line-specified external check commands with nanny.  Also see nanny
manpage updates.

So basically what you can do is add a "port" value inside your real-server
blocks in lvs.cf, and be on your way :)

[1] http://osdir.com/ml/linux.redhat.piranha/2006-10/msg00003.html
Comment 2 Nuno Tavares 2007-11-22 21:50:53 EST
Created attachment 267311 [details]
Nuno Tavares patch to piranha-gui for real server "port" option

Changes to the GUI interface to support Brenton Rothchild's "remote port"

[1] http://osdir.com/ml/linux.redhat.piranha/2006-10/msg00003.html
Comment 4 Marek Grac 2008-01-29 09:20:21 EST
Support for "port" options is already in piranha. Patch for piranha-gui looks ok
Comment 5 RHEL Product and Program Management 2008-01-29 09:36:16 EST
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 6 Marek Grac 2008-04-02 10:40:05 EDT
Patch is in CVS
Comment 9 errata-xmlrpc 2008-07-25 15:08:56 EDT
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 the 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.


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