[ClusterLabs] Configure a resource to be stopped XX seconds after successfully start of other resource on the same cluster node

Ken Gaillot kgaillot at redhat.com
Tue Nov 13 17:05:49 UTC 2018


On Mon, 2018-11-12 at 10:47 +0100, John Gogu wrote:
> Hello guys,
> I need here an advice in regards of the following situation:
>   
> Online: [Node1  Node2]
>   Full list of resources:
>       Resource1  (lsb: Resource1):    Started Node1
>       Resource2  (lsb: Resource2):    Started Node2
>  
>  
> In case of Resource1@ Node1 is failing and is moved to Node2 / or the
> Node1 is failing itself, I want to stop  the Resource2@ Node2 , only
>  XX seconds  after successfully start of Resource1@ Node2 ( the
> scenario is needed to speed up application recovery: Resource1 needs
> to pick up some data from Resource2)
>  
> Online: [Node1  Node2]
>   Full list of resources:
>       Resource1  (lsb: Resource1):    Started Node2
>       Resource2  (lsb: Resource2):    Stopped                 >> stop
> is triggered only  XX seconds  after successfully start of Resource1@
> Node2
>  
>  
> Many thanks in advance for your ideas,
> BR,
> JohnG

There's no out-of-the-box solution for this, but you might be able to
get there via node attribute rules. Rather than use a fixed 10 seconds,
which sounds like it might be subject to race conditions, is there a
way to detect when resource1 has finished picking up the data? If so,
you could set a node attribute at that point, with a rule saying that
resource2 can no longer run when that attribute is set.
-- 
Ken Gaillot <kgaillot at redhat.com>


More information about the Users mailing list