On 19 January 2011 12:42, Dejan Muhamedagic <[email protected]> wrote:
> Hi,
>
> On Tue, Jan 18, 2011 at 12:54:50PM -0500, Vadym Chepkov wrote:
>>
>> On Jan 18, 2011, at 10:28 AM, Dejan Muhamedagic wrote:
>>
>> > On Tue, Jan 18, 2011 at 07:58:28AM -0500, Vadym Chepkov wrote:
>> >>
>> >> On Jan 17, 2011, at 5:43 PM, Brett Delle Grazie wrote:
>> >>
>> >>> Hi Dejan,
>> >>>
>> >>> On 17 January 2011 14:54, Dejan Muhamedagic <[email protected]> wrote:
>> >>>> Hi Brett,
>> >>>>
>> >>>> Long time.
>> >>>
>> >>> Indeed it is - thank you for the reminder!
>> >>>
>> >>> This one simply uses here documents for start/stop operations.
>> >>
>> >> Using 'su -' always makes me uncomfortable, because this
>> >> would invoke so many things intended for login sessions only,
>> >> especially on systems with /etc/profile.d/. Just a thought.
>> >
>> > Well, I'd rather live without it, but sometimes it seems
>> > necessary. I don't know if tomcat is such a beast, but it could
>> > be.
>>
>> definitely not, it was done in the past to put enormous amount of
>> environment variables into .profile of tomcat user
>> But catalina.sh has this code for quite awhile now:
>>
>> if [ -r "$CATALINA_BASE"/bin/setenv.sh ]; then
>> . "$CATALINA_BASE"/bin/setenv.sh
>> elif [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
>> . "$CATALINA_HOME"/bin/setenv.sh
>> fi
>>
>> so environment can be set in a setenv.sh
>
> OK. I'd rather leave this to you tomcat experts to figure out
> which is the right way, but let's keep it as it is in order not
> to disturb the existing installations.
setenv.sh usage requires the following to be set:
(a) CATALINA_HOME
(b) CATALINA_BASE (if different from CATALINA_HOME)
Inside setenv.sh you set:
JAVA_OPTS
CATALINA_OPTS
CATALINA_PID
...
However a 'standard' setenv.sh usage will break the resource agent
- why?
Because of the way the resource agent checks to see if the process is alive.
Instead of using the PID file and associated PID test it uses a grep against the
process table for -D<name> parameter added to CATALINA_OPTS.
Resulting in... nothing. - because CATALINA_OPTS is usually reset
inside setenv.sh
One can work around this by suggesting users set CATALINA_OPTS in setenv.sh as:
CATALINA_OPTS="${CATALINA_OPTS} new options go here"
Which is in fact what I do - and this permits me to use both the
resource agent and
manual start/stop for testing.
Completely redesigning a minimalist tomcat resource agent would
require the following variables:
CATALINA_HOME
CATALINA_BASE (defaulting to CATALINA_HOME)
status_url (optional)
and usage of setenv.sh which _must_ define (for resource agent usage):
CATALINA_PID
(anything else is optional)
In theory everything else could be inferred from either the resource agent
config (think timeouts here)
and/or importing setenv.sh (for PID file location).
>
>> Vadym
>>
>> P.S. Is it necessary for ClusterMon ?
>
> How should I know? I'm just a poor maintainer who knows close to
> nothing about single resource agents.
>
> Thanks,
>
> Dejan
>
>> Linux-HA mailing list
>> [email protected]
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
--
Best Regards,
Brett Delle Grazie
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems