<div dir="ltr"><div><div><div><div>Hey Vladislav,<br><br></div>Thank you for the info. I've tried you suggestions but the behavior is still the same. When an offline/standby node rejoins the cluster all the resources are first stopped and then started. I've added the changes I've made, see below in reply message, next to your suggestions.<br><br></div>Once again thank you for info.<br><br></div>Best regards.<br></div>Octavian Ciobanu<br><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 26, 2017 at 8:17 PM, Vladislav Bogdanov <span dir="ltr"><<a href="mailto:bubble@hoster-ok.com" target="_blank">bubble@hoster-ok.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><a href="tel:26.08.2017%2019" value="+12608201719" target="_blank">26.08.2017 19</a>:36, Octavian Ciobanu wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thank you for your reply.<br>
<br>
There is no reason to set location for the resources, I think, because<br>
all the resources are set with clone options so they are started on all<br>
nodes at the same time.<br>
</blockquote>
<br></span>
You still need to colocate "upper" resources with their dependencies. Otherwise pacemaker will try to start them even if their dependencies fail. Order without colocation has very limited use (usually when resources may run on different nodes). For clones that is even more exotic.<br></blockquote><div><br></div><div>I've added collocation <br><br>pcs constraint colocation add iSCSI1-clone with DLM-clone<br>pcs constraint colocation add iSCSI2-clone with DLM-clone<br>pcs constraint colocation add iSCSI3-clone with DLM-clone<br>pcs constraint colocation add Mount1-clone with iSCSI1-clone<br>pcs constraint colocation add Mount2-clone with iSCSI2-clone<br>pcs constraint colocation add Mount4-clone with iSCSI3-clone<br><br></div><div>The result is the same ... all clones are first stopped and then started beginning with DLM resource and ending with the Mount ones.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
For you original question: ensure you have interleave=true set for all your clones. You seem to miss it for iSCSI ones. interleave=false (default) is for different uses (when upper resources require all clone instances to be up).<br></blockquote><div> </div><div>Modified iSCSI resources and added interleave="true" and still no change in behavior.<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Also, just a minor note, iSCSI resources do not actually depend on dlm, mounts should depend on it.<br></blockquote><div> </div><div>I know but the mount resource must know when the iSCSI resource to whom is connected is started so the only solution I've seen was to place DLM before iSCSI and then Mount. If there is another solution, a proper way to do it, please can you give a reference or a place from where to read on how to do it ?<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
And when it comes to stickiness I forgot to<br>
mention that but it set to 200. and also I have stonith configured to<br>
use vmware esxi.<br>
<br>
Best regards<br>
Octavian Ciobanu<br>
<br>
On Sat, Aug 26, 2017 at 6:16 PM, John Keates <<a href="mailto:john@keates.nl" target="_blank">john@keates.nl</a><br></span><span class="gmail-">
<mailto:<a href="mailto:john@keates.nl" target="_blank">john@keates.nl</a>>> wrote:<br>
<br>
While I am by no means a CRM/Pacemaker expert, I only see the<br>
resource primitives and the order constraints. Wouldn’t you need<br>
location and/or colocation as well as stickiness settings to prevent<br>
this from happening? What I think it might be doing is seeing the<br>
new node, then trying to move the resources (but not finding it a<br>
suitable target) and then moving them back where they came from, but<br>
fast enough for you to only see it as a restart.<br>
<br>
If you crm_resource -P, it should also restart all resources, but<br>
put them in the preferred spot. If they end up in the same place,<br>
you probably didn’t put and weighing in the config or have<br>
stickiness set to INF.<br>
<br>
Kind regards,<br>
<br>
John Keates<br>
<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
On 26 Aug 2017, at 14:23, Octavian Ciobanu<br></span><span class="gmail-">
<<a href="mailto:coctavian1979@gmail.com" target="_blank">coctavian1979@gmail.com</a> <mailto:<a href="mailto:coctavian1979@gmail.com" target="_blank">coctavian1979@gmail.co<wbr>m</a>>> wrote:<br>
<br>
Hello all,<br>
<br>
While playing with cluster configuration I noticed a strange<br>
behavior. If I stop/standby cluster services on one node and<br>
reboot it, when it joins the cluster all the resources that were<br>
started and working on active nodes get stopped and restarted.<br>
<br>
My testing configuration is based on 4 nodes. One node is a<br>
storage node that makes 3 iSCSI targets available for the other<br>
nodes to use,it is not configured to join cluster, and three nodes<br>
that are configured in a cluster using the following commands.<br>
<br>
pcs resource create DLM ocf:pacemaker:controld op monitor<br>
interval="60" on-fail="fence" clone meta clone-max="3"<br>
clone-node-max="1" interleave="true" ordered="true"<br>
pcs resource create iSCSI1 ocf:heartbeat:iscsi<br></span>
portal="<a href="http://10.0.0.1:3260" rel="noreferrer" target="_blank">10.0.0.1:3260</a> <<a href="http://10.0.0.1:3260/" rel="noreferrer" target="_blank">http://10.0.0.1:3260/</a>>"<br>
target="<a href="http://iqn.2017-08.example.com" rel="noreferrer" target="_blank">iqn.2017-08.example.co<wbr>m</a><br>
<<a href="http://iqn.2017-08.example.com" rel="noreferrer" target="_blank">http://iqn.2017-08.example.co<wbr>m</a>>:tgt1" op start interval="0"<span class="gmail-"><br>
timeout="20" op stop interval="0" timeout="20" op monitor<br>
interval="120" timeout="30" clone meta clone-max="3"<br>
clone-node-max="1"<br>
pcs resource create iSCSI2 ocf:heartbeat:iscsi<br></span>
portal="<a href="http://10.0.0.1:3260" rel="noreferrer" target="_blank">10.0.0.1:3260</a> <<a href="http://10.0.0.1:3260/" rel="noreferrer" target="_blank">http://10.0.0.1:3260/</a>>"<br>
target="<a href="http://iqn.2017-08.example.com" rel="noreferrer" target="_blank">iqn.2017-08.example.co<wbr>m</a><br>
<<a href="http://iqn.2017-08.example.com" rel="noreferrer" target="_blank">http://iqn.2017-08.example.co<wbr>m</a>>:tgt2" op start interval="0"<span class="gmail-"><br>
timeout="20" op stop interval="0" timeout="20" op monitor<br>
interval="120" timeout="30" clone meta clone-max="3"<br>
clone-node-max="1"<br>
pcs resource create iSCSI3 ocf:heartbeat:iscsi<br></span>
portal="<a href="http://10.0.0.1:3260" rel="noreferrer" target="_blank">10.0.0.1:3260</a> <<a href="http://10.0.0.1:3260/" rel="noreferrer" target="_blank">http://10.0.0.1:3260/</a>>"<br>
target="<a href="http://iqn.2017-08.example.com" rel="noreferrer" target="_blank">iqn.2017-08.example.co<wbr>m</a><br>
<<a href="http://iqn.2017-08.example.com" rel="noreferrer" target="_blank">http://iqn.2017-08.example.co<wbr>m</a>>:tgt3" op start interval="0"<div><div class="gmail-h5"><br>
timeout="20" op stop interval="0" timeout="20" op monitor<br>
interval="120" timeout="30" clone meta clone-max="3"<br>
clone-node-max="1"<br>
pcs resource create Mount1 ocf:heartbeat:Filesystem<br>
device="/dev/disk/by-label/MyC<wbr>luster:Data1" directory="/mnt/data1"<br>
fstype="gfs2" options="noatime,nodiratime,rw<wbr>" op monitor<br>
interval="90" on-fail="fence" clone meta clone-max="3"<br>
clone-node-max="1" interleave="true"<br>
pcs resource create Mount2 ocf:heartbeat:Filesystem<br>
device="/dev/disk/by-label/MyC<wbr>luster:Data2" directory="/mnt/data2"<br>
fstype="gfs2" options="noatime,nodiratime,rw<wbr>" op monitor<br>
interval="90" on-fail="fence" clone meta clone-max="3"<br>
clone-node-max="1" interleave="true"<br>
pcs resource create Mount3 ocf:heartbeat:Filesystem<br>
device="/dev/disk/by-label/MyC<wbr>luster:Data3" directory="/mnt/data3"<br>
fstype="gfs2" options="noatime,nodiratime,rw<wbr>" op monitor<br>
interval="90" on-fail="fence" clone meta clone-max="3"<br>
clone-node-max="1" interleave="true"<br>
pcs constraint order DLM-clone then iSCSI1-clone<br>
pcs constraint order DLM-clone then iSCSI2-clone<br>
pcs constraint order DLM-clone then iSCSI3-clone<br>
pcs constraint order iSCSI1-clone then Mount1-clone<br>
pcs constraint order iSCSI2-clone then Mount2-clone<br>
pcs constraint order iSCSI3-clone then Mount3-clone<br>
<br>
If I issue the command "pcs cluster standby node1" or "pcs cluster<br>
stop" on node 1 and after that I reboot the node. When the node<br>
gets back online (unstandby if it was put in standby mode) all the<br>
"MountX" resources get stopped on node 3 and 4 and started again.<br>
<br>
Can anyone help me figure out where and what is the mistake in my<br>
configuration as I would like to keep the started resources on<br>
active nodes (avoid stop and start of resources)?<br>
<br>
Thank you in advance<br>
Octavian Ciobanu<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br></div></div>
<mailto:<a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a>><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/m<wbr>ailman/listinfo/users</a><span class="gmail-"><br>
<<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</a>><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started:<br>
<a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc<wbr>/Cluster_from_Scratch.pdf</a><br>
<<a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/do<wbr>c/Cluster_from_Scratch.pdf</a>><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
</span></blockquote>
<br>
<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a> <mailto:<a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a>><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/m<wbr>ailman/listinfo/users</a><span class="gmail-"><br>
<<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</a>><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started:<br>
<a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc<wbr>/Cluster_from_Scratch.pdf</a><br>
<<a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/do<wbr>c/Cluster_from_Scratch.pdf</a>><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/m<wbr>ailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc<wbr>/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
</span></blockquote><div class="gmail-HOEnZb"><div class="gmail-h5">
<br>
<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/m<wbr>ailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc<wbr>/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
</div></div></blockquote></div><br></div></div></div></div></div></div></div>