[ClusterLabs] How to block/stop a resource from running twice?

fs3000 fs3000 at proton.me
Wed Apr 26 13:05:47 EDT 2023


------- Original Message -------
On Monday, April 24th, 2023 at 10:08, Andrei Borzenkov <arvidjaar at gmail.com> wrote:


> On Mon, Apr 24, 2023 at 11:52 AM Klaus Wenninger kwenning at redhat.com wrote:
> 
> > The checking for a running resource that isn't expected to be running isn't done periodically (at
> > least not per default and I don't know a way to achieve that from the top of my mind).
> 
> 
> op monitor role=Stopped interval=20s


Thanks a lot for the tip. It works, Not perfect, but that's fine. When it detects the service is also active on a second node, it stops the service on all nodes, and restarts the service on the first node. Would be better if only it stopped the service on the second none, leaving the service on the first node untouched. I understand this is due to the multiple-active setting however:


What should the cluster do if it ever finds the resource active on more than one node? Allowed values: 

- block: mark the resource as unmanaged
- stop_only: stop all active instances and leave them that way
- stop_start: stop all active instances and start the resource in one location only

DEFAULT: stop_start


From: https://clusterlabs.org/pacemaker/doc/deprecated/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-resource-options.html


More information about the Users mailing list