[ClusterLabs] master/slave resource agent without demote
Waldemar Brodkorb
mail at waldemar-brodkorb.de
Thu Nov 26 04:57:36 UTC 2015
Hi,
Andrei Borzenkov wrote,
> On Tue, Nov 24, 2015 at 5:19 PM, Waldemar Brodkorb
> <mail at waldemar-brodkorb.de> wrote:
> > Hi,
> >
> > we are using a derivate of the Tomcat OCF script.
> > Our web application needs to be promoted (via a wget call).
> > But our application is not able to demote in a clean way, so
> > we need to stop and then start the tomcat applicationserver
> > to get into slave mode.
> >
> > What is the best way to handle this?
> >
>
> Not sure I understand the question. If your application has to be
> restarted on demote, you restart it on demote in your RA. Or do I
> misunderstand your question?
Yes, at the moment we stop it first with the stop function and
then execute the RA with the start parameter in the background
returning OCF_SUCCESS. Then there are some
stamp files containing the current time in unix seconds to prevent
another start while asynchonely demoting.
I am experimenting right now with just using the stop function.
It works at least for three failover scenarios:
- poweroff the master
- reboot the master
- crm node standby / crm node online the master
Next I need to test migrate, I think the reason for the complex
demote fake was a problem with migrate.
best regards
Waldemar
More information about the Users
mailing list