The resource agent for tomcat is extended to allow the response of the status 
url to be checked against a regex.

The RA includes a new parameter "statusurlregex".

If this parameter is not present, it behaves as now.
If present, it checks against the regex.

Therefore, it is possible not just check tomcat returning something, but also 
correct response.

The patch contains a little change of the monitor function.

The current monitor function first checks the existence of tomcat processes and 
return OCF_NOT_RUNNING if not.
The next check is the response of the statusurl. If tomcat does not return 
anything, the monitor function return OCF_NOT_RUNNING, which is improper.
On returning OCF_NOT_RUNNING, pacemake will start tomcat immediately and not 
call stop. This might cause situations running several tomcat processes and 
none of them is working.

The patched monitor function will return OCF_ERR_GENERIC if no or not correct 
response on statusurl call. This let pacemaker call stop and then start.

Rainer 
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Attachment: tomcat.diff
Description: Binary data

_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to