[Pacemaker] Patch: Extend Tomcat RA with status regex
Rainer Brestan
rainer.brestan at gmx.net
Wed Jun 6 17:08:44 UTC 2012
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tomcat.diff
Type: application/octet-stream
Size: 2235 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20120606/c524d458/attachment-0003.obj>
More information about the Pacemaker
mailing list