Bug 67860 - nanny cant parse lvs.cf correctly , send_program don't work.
Summary: nanny cant parse lvs.cf correctly , send_program don't work.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: piranha
Version: 7.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Copeland
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-07-03 09:28 UTC by Need Real Name
Modified: 2007-04-18 16:43 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-07-03 09:28:35 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2002-07-03 09:28:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530

Description of problem:
If using the send_program function in lvs.cf nanny dont parses the command
correctly.


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


How reproducible:
Always

Steps to Reproduce:
1. set 'send_program="checkwww %h"'in lvs.cf
2. restart lvs
3. 
	

Actual Results:  nanny tries to execute checkwww but not with %h and not with
end " ?
From nanny-output:
nanny: Invoking:  "/etc/sysconfig/ha/checkwww
nanny: The following exited abnormally:
nanny: Got result ((null)) from command sent to (10.0.11.10)


Additional info:

I found a bugfix that worked for me, dont know if it is the correct way to
handle it but here it goes:

From the nanny.c file:
---- Snip row 309-311
if (vserver->send_program)
     ASSIGNSTRING(send_program, vserver->send_program);
else send_program = NULL;
---- Snip

I changed it to:
---- Snip row 309-311
if (vserver->send_program)
     ASSIGNSTRING(send_program, strip_quotes(vserver->send_program));
else send_program = NULL;
---- Snip

Follow this thread in the piranha-forum for more information: 
http://www.redhat.com/mailing-lists/piranha-list/msg00923.html

Comment 1 Phil Copeland 2002-08-12 15:03:18 UTC
Ok lets see what happens with 0.7.0

(lvs.cf)
...
virtual httpd_test {
     active = 1
     address = 192.168.26.30 eth0:1
     port = 80
     send = "GET / HTTP/1.0\r\n\r\n"
     expect = "OK"
     send_program = "/usr/bin/checkwww %h"
...


And our testing program is

TEST=`lynx --dump http://$1/ | grep -c Test`
if [ $TEST == "0" ]; then
        echo "FAIL"
else
        echo "OK"
fi

Version of piranha being used:
[root@ha8 piranha]# rpm -q piranha
piranha-0.7.0-3

start up piranha:
Aug 12 10:36:14 ha8 pulse[18157]: STARTING PULSE AS MASTER
Aug 12 10:36:14 ha8 pulse: pulse startup succeeded
Aug 12 10:36:32 ha8 pulse[18157]: partner dead: activating lvs
Aug 12 10:36:32 ha8 lvs[18161]: starting virtual service httpd_test active: 80
Aug 12 10:36:32 ha8 lvs[18161]: create_monitor for httpd_test/same_name running
as pid 18168
Aug 12 10:36:32 ha8 lvs[18161]: create_monitor for httpd_test/same_name running
as pid 18169
Aug 12 10:36:32 ha8 lvs[18161]: create_monitor for httpd_test/same_name running
as pid 18170
Aug 12 10:36:32 ha8 nanny[18168]: External program use requested:
(/usr/bin/checkwww %), IGNORING send string option ((null)) 
Aug 12 10:36:32 ha8 nanny[18168]: starting LVS client monitor for 192.168.26.30:80
Aug 12 10:36:32 ha8 nanny[18169]: External program use requested:
(/usr/bin/checkwww %), IGNORING send string option ((null)) 
Aug 12 10:36:32 ha8 nanny[18169]: starting LVS client monitor for 192.168.26.30:80
Aug 12 10:36:32 ha8 nanny[18170]: External program use requested:
(/usr/bin/checkwww %), IGNORING send string option ((null)) 
Aug 12 10:36:32 ha8 nanny[18170]: starting LVS client monitor for 192.168.26.30:80
Aug 12 10:36:33 ha8 nanny[18169]: making 10.0.0.2:80 available
Aug 12 10:36:33 ha8 nanny[18168]: making 10.0.0.1:80 available
Aug 12 10:36:33 ha8 nanny[18170]: making 10.0.0.3:80 available
Aug 12 10:36:38 ha8 pulse[18164]: gratuitous lvs arps finished


ok lets kill 10.0.0.1
[root@ha1 root]# service httpd stop

Aug 12 10:45:29 ha8 nanny[18168]: Trouble. Recieved results are not what we
expected from (10.0.0.1) 
Aug 12 10:45:29 ha8 nanny[18168]: shutting down 10.0.0.1:80 due to connection
failure
Aug 12 10:45:35 ha8 nanny[18168]: Trouble. Recieved results are not what we
expected from (10.0.0.1) 

As expected, 10.0.0.1 is detected as a non functioning node and is removed from
the ipvs tables.

Startup httpd again
[root@ha1 root]# service httpd start

Aug 12 10:46:29 ha8 nanny[18168]: making 10.0.0.1:80 available


Ok looks like it's working as expected here.

The only caveat I have is that the 0.7.0-3 I have here was 'tailored' for the
AS2.1 release so the php web panels that address failover are gone BUT the
functionality inside piranha to handle it is still there (if you know how to
edit lvs.cf by hand)

You'll find it kicking around on ftp://ftp.uk.linux.org/pub/linux/piranha

Phil
=--=


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