<p dir="ltr">You can remove the constraint and configure the group in a single 'crm configure edit' .</p>
<p dir="ltr">Best Regards,<br>
Strahil Nikolov</p>
<div class="quote">On Oct 28, 2019 02:18, jyd <471204256@qq.com> wrote:<br type='attribution'><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">thanks,but the colocation is configed already, i'll check agin<br /><div><div><br /></div><div><br /></div><div style="font-size:12px;font-family:'arial narrow';padding:2px 0 2px 0">------------------ Original ------------------</div><div style="font-size:12px;background:#efefef;padding:8px"><div><b>From:</b> "Sherrard Burton"<sb-clusterlabs@allafrica.com>;</div><div><b>Date:</b> Fri, Oct 25, 2019 09:09 PM</div><div><b>To:</b> "Cluster Labs - All topics related to open-source clustering welcomed"<users@clusterlabs.org>;"jyd"<471204256@qq.com>;<wbr /></div><div></div><div><b>Subject:</b> Re: [ClusterLabs] active/passive resource config</div></div><div><br /></div><br /><br />On 10/25/19 2:03 AM, jyd wrote:<br />> Hi:<br />> I want to user pacemaker to mange a resource named A,i want A only <br />> started on one node,<br />> only when the node is down or A can not started in this node,the A <br />> resource will started on other nodes.<br />> And config a virtual ip resource for A,the virtual ip only started on <br />> the node which A is runnind.<br />> so how to config that?i trid like this but it didn't act as i expected.<br />> <br />> ------------------<br />> pcs resource create A systemd:myservice op start interval=0s <br />> timeout=20s monitor interval=10s timeout=20s stop interval=0s <br />> timeout=20s meta migration-threshold=3 failure-timeout=60<br />> <br />> pcs resource create vip ocf:heartbeat:IPaddr2 ip=<a href="http://192.168.2.87">192.168.2.87</a> <br />> cidr_netmask=24 op monitor interval=20s meta resource-stickiness=100<br />> <br />> pcs constraint colocation add vip A INFINITY<br />> <br />> pcs constraint order A then vip<br /><br />it looks like you are missing the colocation constraint that ties vip <br />and myservice together<br /><br /><a href="https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_ensuring_resources_run_on_the_same_host.html">https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_ensuring_resources_run_on_the_same_host.html</a><br /></div></blockquote></div>