<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 2, 2023 at 8:41 AM Gerald Vogt <<a href="mailto:vogt@spamcop.net">vogt@spamcop.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I am setting up a mail relay cluster which main purpose is to maintain <br>
the service ips via IPaddr2 and move them between cluster nodes when <br>
necessary.<br>
<br>
The service ips should only be active on nodes which are running all <br>
necessary mail (systemd) services.<br>
<br>
So I have set up a resource for each of those services, put them into a <br>
group in order they should start, cloned the group as they are normally <br>
supposed to run on the nodes at all times.<br>
<br>
Then I added an order constraint<br>
   start mail-services-clone then start mail1-ip<br>
   start mail-services-clone then start mail2-ip<br>
<br>
and colocations to prefer running the ips on different nodes but only <br>
with the clone running:<br>
<br>
   colocation add mail2-ip with mail1-ip -1000<br>
   colocation ip1 with mail-services-clone<br>
   colocation ip2 with mail-services-clone<br>
<br>
as well as a location constraint to prefer running the first ip on the <br>
first node and the second on the second<br>
<br>
   location ip1 prefers ha1=2000<br>
   location ip2 prefers ha2=2000<br>
<br>
Now if I stop pacemaker on one of those nodes, e.g. on node ha2, it's <br>
fine. ip2 will be moved immediately to ha3. Good.<br>
<br>
However, if pacemaker on ha2 starts up again, it will immediately remove <br>
ip2 from ha3 and keep it offline, while the services in the group are <br>
starting on ha2. As the services unfortunately take some time to come <br>
up, ip2 is offline for more than a minute.<br>
<br>
It seems the colocations with the clone are already good once the clone <br>
group begins to start services and thus allows the ip to be removed from <br>
the current node.<br></blockquote><div><br></div><div>To achieve this you have to add orders on top of collocations.</div><div><br></div><div>Klaus</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I was wondering how can I define the colocation to be accepted only if <br>
all services in the clone have been started? And not once the first <br>
service in the clone is starting?<br>
<br>
Thanks,<br>
<br>
Gerald<br>
<br>
<br>
_______________________________________________<br>
Manage your subscription:<br>
<a href="https://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>
<br>
ClusterLabs home: <a href="https://www.clusterlabs.org/" rel="noreferrer" target="_blank">https://www.clusterlabs.org/</a><br>
<br>
</blockquote></div></div>