[ClusterLabs] Wait until resource is really ready before moving clusterip
kgaillot at redhat.com
Tue Jan 12 11:06:23 EST 2016
On 01/12/2016 07:57 AM, Kristoffer Grönlund wrote:
> Joakim Hansson <joakim.hansson87 at gmail.com> writes:
>> I have a cluster running tomcat which in turn run solr.
>> I use three nodes with loadbalancing via ipaddr2.
>> The thing is, when tomcat is started on a node it takes about 2 minutes
>> before solr is functioning correctly.
>> Is there a way to make the ipaddr2-clone wait 2 minutes after tomcat is
>> started before it moves the ip to the node?
>> Much appreciated!
> There is the ocf:heartbeat:Delay resource agent, which on one hand is
> documented as a test resource, but on the other hand should do what you
> primitive solr ...
> primitive two-minute-delay ocf:heartbeat:Delay \
> params startdelay=120 meta target-role=Started \
> op start timeout=180
> group solr-then-wait solr two-minute-delay
> Now the group acts basically like the solr resource, except for the
> two-minute delay after starting solr before the group itself is
> considered started.
>> / Jocke
Another way would be to customize the tomcat resource agent so that
start doesn't return success until it's fully ready to accept requests
(which would probably be specific to whatever app you're running via
tomcat). Of course you'd need a long start timeout.
More information about the Users