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
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 =--=