<div dir="ltr"><div>Based on my understanding of the question, your best options would be</div><div><ul><li>Create a resource agent that's designed to be run as a <a href="http://10.2.2. Promotable clones">promotable clone</a> (the <a href="https://github.com/ClusterLabs/pacemaker/blob/master/extra/resources/Stateful">ocf:pacemaker:Stateful</a> resource agent is a simple example), OR<br></li><li>Create two separate resource agents and configure a resource for each. Then configure a <a href="https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#s-resource-colocation">colocation constraint</a> with a negative score, so that they cannot run on the same node simultaneously.<br></li></ul></div><div><br></div><div>> Hi Oyvind,</div>> thank you for reply!<br>> <br>> Iinteresting, but not simple...<br>> I did some tests with ocf_heartbeat_anything and the simple start and stop<br>> seems to work correctly.<br>> Would it be possible to create two opposite "services" with this ocf?<br>> <br>> Example:<br>> <br>> NODE1 (Master)   service-master (START) & service-slave (STOP)<br>> NODE2 (Slave)     service-master (STOP) & service-slave (START)<br>> <br>> "Service-master" puts down "service-slave" and does the opposite in the<br>> second node.<br>> <br>> Regards<br>> Sim<br>> <br>> Il giorno mar 14 lug 2020 alle ore 10:41 Oyvind Albrigtsen <<br>> oalbrigt at <a href="http://redhat.com">redhat.com</a>> ha scritto:<br>> <br>> > You should be able to make your custom agent by following this doc:<br>> ><br>> > <a href="https://github.com/ClusterLabs/resource-agents/blob/master/doc/dev-guides/ra-dev-guide.asc">https://github.com/ClusterLabs/resource-agents/blob/master/doc/dev-guides/ra-dev-guide.asc</a><br>> ><br>> > Oyvind<br>> ><br>> > On 13/07/20 10:08 +0200, Sim wrote:<br>> > >Hi,<br>> > >I need to create a cluster with these characteristics:<br>> > ><br>> > >NODE1 (Master)<br>> > >NODE2 (Slave)<br>> > ><br>> > >Example sequence to moving the role from NODE1 to NODE2:<br>> > ><br>> > >- NODE1: stopped a process with "systemctl stop"<br>> > >- NODE1: executed a script with parameter "slave"<br>> > >- NODE1: executed again the process with "systemctl start"<br>> > >- NODE2: stopped a process with "systemctl stop"<br>> > >- NODE2: executed a script "master"<br>> > >- NODE2: executed again the process with "systemctl start"<br>> > ><br>> > >I only found ocf_heartbeat_anything but I don't know if it's right for me.<br>> > >Any suggestions?<br>> > ><br>> > >Regards<br>> > >Sim<br>> ><br>> > >_______________________________________________<br>> > >Manage your subscription:<br>> > ><a href="https://lists.clusterlabs.org/mailman/listinfo/users">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>> > ><br>> > >ClusterLabs home: <a href="https://www.clusterlabs.org/">https://www.clusterlabs.org/</a><br>> ><br>> > _______________________________________________<br>> > Manage your subscription:<br>> > <a href="https://lists.clusterlabs.org/mailman/listinfo/users">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>> ><br>> > ClusterLabs home: <a href="https://www.clusterlabs.org/">https://www.clusterlabs.org/</a><br>> ><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>Regards,<br><br></div>Reid Wahl, RHCA<br></div><div>Software Maintenance Engineer, Red Hat<br></div>CEE - Platform Support Delivery - ClusterHA</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>