<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Courier New" size="1"><span style="font-size:8pt;">
<div>Hello again</div>
<div>&nbsp;</div>
<div>After performing some million try&amp;error testcases (at least it feels like that) I finally come to the following conclusion:</div>
<div>I necessarily need to understand the scoring and allocation algorithm much better!</div>
<div>Unfortunately I could not find any good documentation&nbsp; - just some articles containing hints, but that proved insufficient.</div>
<div>Any pointers are very welcome.</div>
<div>&nbsp;</div>
<div>So first my original request contained a wrong colocation constraint (missing master role) as Ken pointed out correctly.</div>
<div>This would have been fixed successfully with the correct constraint.</div>
<div>&nbsp;</div>
<div>But in the meantime I had advanced to a more complex cluster configuration which exhibited another problem - although it looked at first very much alike.</div>
<div>&nbsp;</div>
<div>The new cluster config was for a system like that:</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; node1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; node2:</div>
<div>&nbsp;&nbsp;&nbsp; ---------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---------------</div>
<div>&nbsp;&nbsp; |&nbsp; FS_at_NFS&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; | FS_avoid_NFS&nbsp; |</div>
<div>&nbsp;&nbsp;&nbsp; ---------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---------------</div>
<div>&nbsp;&nbsp; |&nbsp; NFS_server&nbsp;&nbsp; |</div>
<div>&nbsp;&nbsp;&nbsp; ---------------</div>
<div>&nbsp;&nbsp; |&nbsp; NFS_ip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</div>
<div>&nbsp;&nbsp;&nbsp; ---------------</div>
<div>&nbsp;&nbsp; |&nbsp; DRBD_fs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</div>
<div>&nbsp;&nbsp;&nbsp; ---------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---------------</div>
<div>&nbsp;&nbsp; |&nbsp; DRBD-master&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; DRBD-slave&nbsp;&nbsp; |</div>
<div>&nbsp;&nbsp;&nbsp; ---------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---------------</div>
<div>&nbsp;</div>
<div>Again I tried to move the NFS server to the other node but DRBD-master was not promoted to the other node.</div>
<div>&nbsp;</div>
<div>As I now know there are 2 conditions necessary to see that problem:</div>
<div>&nbsp; * the -INFINITY colocation constraint for the FS_avoid_NFS</div>
<div>&nbsp; * a rather high value for resource stickiness (which was originally set to INFINITY)</div>
<div>&nbsp;</div>
<div>If I remove the FS_avoid_NFS resource the problem can no longer be reproduced.</div>
<div>As well if I remove the resource stickiness completely (or set it to a small value) the problem is gone.</div>
<div>&nbsp;</div>
<div>The maximum value I can use for resource stickiness without a problem is the score which the DRBD-slave returns minus &quot;2&quot;.</div>
<div>(At least that's what my experiments seem to show.)</div>
<div>&nbsp;</div>
<div>So apparently there is/was a configuration problem with the INFINITY score for stickiness and the -INFINITY score for the colocation constraint.</div>
<div>&nbsp;</div>
<div>Moreover I noticed that with my latter configuration there were some pending transitions (which were automatically resolved after the cluster-recheck-interval, which resulted in my first work-around to reduce this interval significantly and thus resolve
the problem more quickly).</div>
<div>These pending transitions can only be seen with my order constraints. If I remove these then there are no pending transitions (although the demote does not happen, with the stickiness set too high).</div>
<div>So maybe this could be a bug ... but I will no further investigate on this.</div>
<div>&nbsp;</div>
<div>------------------------------------------------------------------------------------------------</div>
<div>&nbsp;</div>
<div>And for all those curious out there here are my scores and what I guess how they are calculated.</div>
<div>&nbsp;</div>
<div>All primitive resources are colocated with DRBD-master (not one on top of the other).</div>
<div>My DRBD-RA returns 10000 for master and 1000 for slave.</div>
<div>I have set resource stickiness to 995.</div>
<div>&nbsp;</div>
<div>Here is the idle state before movement:</div>
<div>[root@deneb682 ~]# crm_simulate -LVs</div>
<div>&nbsp;</div>
<div>Current cluster status:</div>
<div>Online: [ deneb682 deneb683 ]</div>
<div>&nbsp;</div>
<div> Master/Slave Set: DRBD-master [DRBD]</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; Masters: [ deneb682 ]</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; Slaves: [ deneb683 ]</div>
<div> DRBD_fs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ocf::heartbeat:Dummy): Started deneb682</div>
<div> NFS_ip (ocf::heartbeat:Dummy): Started deneb682</div>
<div> NFS_server&nbsp;&nbsp;&nbsp;&nbsp; (ocf::heartbeat:Dummy): Started deneb682</div>
<div> FS_at_server&nbsp;&nbsp; (ocf::heartbeat:Dummy): Started deneb682</div>
<div> FS_avoid_server&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ocf::heartbeat:Dummy): Started deneb683</div>
<div>&nbsp;</div>
<div>Allocation scores:</div>
<div>clone_color: DRBD-master allocation score on deneb682: 3980&nbsp;&nbsp;&nbsp;&nbsp; &lt;= 4 * stickiness (once for each resource on top in the chain)</div>
<div>clone_color: DRBD-master allocation score on deneb683: 0</div>
<div>clone_color: DRBD:0 allocation score on deneb682: 10001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= master &#43; 1 for &#8216;started on this node&#8217;</div>
<div>clone_color: DRBD:0 allocation score on deneb683: 0</div>
<div>clone_color: DRBD:1 allocation score on deneb682: 0</div>
<div>clone_color: DRBD:1 allocation score on deneb683: 1001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= slave &#43; 1 for &#8216;started on this node&#8217;</div>
<div>native_color: DRBD:0 allocation score on deneb682: 10001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= same as clone_color above</div>
<div>native_color: DRBD:0 allocation score on deneb683: -995&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= same as clone_color above - stickiness</div>
<div>native_color: DRBD:1 allocation score on deneb682: -INFINITY&nbsp;&nbsp;&nbsp; &lt;= due to DRBD:0 already allocated for this node</div>
<div>native_color: DRBD:1 allocation score on deneb683: 6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= same as clone_color above - stickiness</div>
<div>DRBD:0 promotion score on deneb682: 17960&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= master &#43; 2 * 4 * stickiness</div>
<div>DRBD:1 promotion score on deneb683: 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= slave - stickiness</div>
<div>native_color: DRBD_fs allocation score on deneb682: 10996&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= inherit from DRBD:0 (master) &#43; stickiness</div>
<div>native_color: DRBD_fs allocation score on deneb683: -INFINITY&nbsp;&nbsp; &lt;= due to no DRBD master allocated for this node</div>
<div>native_color: NFS_ip allocation score on deneb682: 10996</div>
<div>native_color: NFS_ip allocation score on deneb683: -INFINITY</div>
<div>native_color: NFS_server allocation score on deneb682: 10996</div>
<div>native_color: NFS_server allocation score on deneb683: -INFINITY</div>
<div>native_color: FS_at_server allocation score on deneb682: 10996</div>
<div>native_color: FS_at_server allocation score on deneb683: -INFINITY</div>
<div>native_color: FS_avoid_server allocation score on deneb682: -INFINITY&nbsp; &lt;= due to DRBD master allocated for this node</div>
<div>native_color: FS_avoid_server allocation score on deneb683: 995&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= stickiness</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>And here is the successful transition following the &#8216;pcs resource move NFS_server&#8217;:</div>
<div>Allocation scores:</div>
<div>clone_color: DRBD-master allocation score on deneb682: 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= stickiness no longer considered; just 1 for &#8216;master on this node&#8217;</div>
<div>clone_color: DRBD-master allocation score on deneb683: 0</div>
<div>clone_color: DRBD:0 allocation score on deneb682: 10001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= no change</div>
<div>clone_color: DRBD:0 allocation score on deneb683: 0</div>
<div>clone_color: DRBD:1 allocation score on deneb682: 0</div>
<div>clone_color: DRBD:1 allocation score on deneb683: 1001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= no change</div>
<div>native_color: DRBD:0 allocation score on deneb682: 10001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= no change</div>
<div>native_color: DRBD:0 allocation score on deneb683: -995&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= no change</div>
<div>native_color: DRBD:1 allocation score on deneb682: -INFINITY&nbsp;&nbsp;&nbsp; &lt;= no change</div>
<div>native_color: DRBD:1 allocation score on deneb683: 6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= no change</div>
<div>DRBD:1 promotion score on deneb683: 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= no change</div>
<div>DRBD:0 promotion score on deneb682: 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= stickiness no longer considered; just 1 for &#8216;master on this node&#8217;</div>
<div>native_color: DRBD_fs allocation score on deneb682: -INFINITY</div>
<div>native_color: DRBD_fs allocation score on deneb683: 6</div>
<div>native_color: NFS_ip allocation score on deneb682: -INFINITY</div>
<div>native_color: NFS_ip allocation score on deneb683: 6</div>
<div>native_color: NFS_server allocation score on deneb682: -INFINITY&nbsp;&nbsp; &lt;= due to move constraint</div>
<div>native_color: NFS_server allocation score on deneb683: 6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= inherit from DRBD:1 (slave) - stickiness</div>
<div>native_color: FS_at_server allocation score on deneb682: -INFINITY</div>
<div>native_color: FS_at_server allocation score on deneb683: 6</div>
<div>native_color: FS_avoid_server allocation score on deneb682: 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= stickiness no longer considered</div>
<div>native_color: FS_avoid_server allocation score on deneb683: -INFINITY</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>In contrast here the same transition, which does not result in a demote with resource stickiness set to 2002:</div>
<div>Allocation scores:</div>
<div>clone_color: DRBD-master allocation score on deneb682: 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= similar to above</div>
<div>clone_color: DRBD-master allocation score on deneb683: 0</div>
<div>clone_color: DRBD:0 allocation score on deneb682: 10001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= similar to above</div>
<div>clone_color: DRBD:0 allocation score on deneb683: 0</div>
<div>clone_color: DRBD:1 allocation score on deneb682: 0</div>
<div>clone_color: DRBD:1 allocation score on deneb683: 1001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= similar to above</div>
<div>native_color: DRBD:0 allocation score on deneb682: 10001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= similar to above</div>
<div>native_color: DRBD:0 allocation score on deneb683: -2002&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= similar to above</div>
<div>native_color: DRBD:1 allocation score on deneb682: -INFINITY&nbsp;&nbsp;&nbsp; &lt;= similar to above</div>
<div>native_color: DRBD:1 allocation score on deneb683: 1001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= similar to above but with changed sign!?</div>
<div>DRBD:0 promotion score on deneb682: 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= similar to above</div>
<div>DRBD:1 promotion score on deneb683: 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= I have no clue where this could come from!?</div>
<div>native_color: DRBD_fs allocation score on deneb682: 12003&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;= inherit from DRBD:0 (master) &#43; stickiness</div>
<div>native_color: DRBD_fs allocation score on deneb683: -INFINITY</div>
<div>native_color: NFS_ip allocation score on deneb682: 12003</div>
<div>native_color: NFS_ip allocation score on deneb683: -INFINITY</div>
<div>native_color: NFS_server allocation score on deneb682: -INFINITY&nbsp;&nbsp; &lt;= due to move constraint</div>
<div>native_color: NFS_server allocation score on deneb683: -INFINITY&nbsp;&nbsp; &lt;= due to no DRBD master allocated for this node</div>
<div>native_color: FS_at_server allocation score on deneb682: 12003</div>
<div>native_color: FS_at_server allocation score on deneb683: -INFINITY</div>
<div>native_color: FS_avoid_server allocation score on deneb682: -INFINITY</div>
<div>native_color: FS_avoid_server allocation score on deneb683: 2002&nbsp;&nbsp; &lt;= stickiness</div>
<div>&nbsp;</div>
<div>From these I can guess how (most of) the scores are calculated in this situation.</div>
<div>But unfortunately that does only little help to understand scoring and allocation in advance.</div>
<div>(It&#8217;s always much easier to devise an explanation afterwards, but sometimes you should know in advance.)</div>
<div>&nbsp;</div>
<div>Kind regards</div>
<div>Andi</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</span></font>
</body>
</html>