<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
  <meta name="Generator" content="Zarafa WebAccess v6.40.8-27223">
  <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
  <title>RE: [Pacemaker] Resource starts on wrong node ?</title>
  <style type="text/css">
      body
      {
        font-family: Arial, Verdana, Sans-Serif ! important;
        font-size: 12px;
        padding: 5px 5px 5px 5px;
        margin: 0px;
        border-style: none;
        background-color: #ffffff;
      }

      p, ul, li
      {
        margin-top: 0px;
        margin-bottom: 0px;
      }
  </style>
</head>
<body>
<p>&nbsp;Dan,</p><p>&nbsp;</p><p>Thanks for the swift reply.</p><p>I didn&#39;t know pacemaker was sort of loadbalancing across nodes.</p><p>Maybe I should read the documentation in&nbsp;more detail.</p><p>&nbsp;</p><p>Regarding&nbsp;the versions:</p><p>I would like to have the newest versions, but what I&#39;ve done until now is just install what&#39;s available</p><p>from the Centos repositories.</p><p>Indeed I would like to upgrade since I also sometimes experience the issue that several heartbeat daemons</p><p>start&nbsp;looping when I change something in the config. Something that&#39;s supposed to be fixed in a higher level</p><p>of corosync/heartbeat/pacemaker</p><p>&nbsp;</p><p>About what you said: Is there a limited number of resources that can run on one node, before pacemaker&nbsp;decides it is going to run a subsequent resource on&nbsp;another node ?</p><p>Wouldn&#39;t it be best to always use the colocation and order directives to prevent this from happening ?</p><p>&nbsp;</p><p>Thanks again,</p><p>&nbsp;</p><p>Hans<br />&nbsp;</p><blockquote style="padding-left: 5px; margin-left: 5px; border-left: #325fba 2px solid">-----Original message-----<br /><strong>To:</strong> The Pacemaker cluster resource manager &lt;pacemaker@oss.clusterlabs.org&gt;; <br /><strong>From:</strong> Dan Frincu &lt;df.cluster@gmail.com&gt;<br /><strong>Sent:</strong> Wed 21-09-2011 12:44<br /><strong>Subject:</strong> Re: [Pacemaker] Resource starts on wrong node ?<br />Hi,<br /><br />On Wed, Sep 21, 2011 at 1:02 PM, Hans Lammerts &lt;j.lammerts@chello.nl&gt; wrote:<br />&gt; Hi all,<br />&gt;<br />&gt;<br />&gt;<br />&gt; Just started to configure a two node cluster (Centos 6) with drbd<br />&gt; 8.4.0-31.el6,<br />&gt;<br />&gt; corosync 1.2.3 and pacemaker 1.1.2.<br /><br />Strange choice of versions, if it&#39;s a new setup, why don&#39;t you go for<br />corosync 1.4.1 and pacemaker 1.1.5?<br /><br />&gt;<br />&gt; I created three DRBD filesystems, and started to add them in the crm config<br />&gt; one by one.<br />&gt;<br />&gt; Everything went OK. After adding these resources they start on node1, and<br />&gt; when I set node1<br />&gt;<br />&gt; in standby, these three DRBD resources failover nicely to the second node.<br />&gt; And vice versa.<br />&gt;<br />&gt; So far so good.<br />&gt;<br />&gt;<br />&gt;<br />&gt; Next, I added one extra resource, that is supposed to put an IP alias on<br />&gt; eth0.<br />&gt;<br />&gt; This also works, but strangely enough the alias is set on eth0 of the second<br />&gt; node, where I would have<br />&gt;<br />&gt; expected it to start on the first node (just as the three drbd resources<br />&gt; did).<br />&gt;<br />&gt; Why the.... does Pacemaker decide that this resource is to be started on the<br />&gt; second node ? I cannot grasp<br />&gt;<br />&gt; the reason why.<br /><br />Because it tries to load balance resources on available nodes. You<br />have several resources running on one node, and didn&#39;t specify any<br />restrictions on the mysqlip, therefore it chose the second node as it<br />had less resources on it. You override the behavior with constraints.<br />See below.<br /><br />&gt;<br />&gt; Hope anyone can tell me what I&#39;m doing wrong.<br />&gt;<br />&gt;<br />&gt;<br />&gt; Thanks,<br />&gt;<br />&gt; Hans<br />&gt;<br />&gt;<br />&gt;<br />&gt; Just to be sure, I&#39;ll show my config below:<br />&gt;<br />&gt;<br />&gt;<br />&gt; node cl1 \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attributes standby=&quot;off&quot;<br />&gt;<br />&gt; node cl2 \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attributes standby=&quot;off&quot;<br />&gt;<br />&gt; primitive drbd0 ocf:linbit:drbd \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; params drbd_resource=&quot;mysql&quot; drbdconf=&quot;/etc/drbd.conf&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op start interval=&quot;0&quot; timeout=&quot;240s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op monitor interval=&quot;20s&quot; timeout=&quot;20s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op stop interval=&quot;0&quot; timeout=&quot;100s&quot;<br />&gt;<br />&gt; primitive drbd1 ocf:linbit:drbd \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; params drbd_resource=&quot;www&quot; drbdconf=&quot;/etc/drbd.conf&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op start interval=&quot;0&quot; timeout=&quot;240s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op monitor interval=&quot;20s&quot; timeout=&quot;20s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op stop interval=&quot;0&quot; timeout=&quot;100s&quot;<br />&gt;<br />&gt; primitive drbd2 ocf:linbit:drbd \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; params drbd_resource=&quot;zarafa&quot; drbdconf=&quot;/etc/drbd.conf&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op start interval=&quot;0&quot; timeout=&quot;240s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op monitor interval=&quot;20s&quot; timeout=&quot;20s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op stop interval=&quot;0&quot; timeout=&quot;100s&quot;<br />&gt;<br />&gt; primitive mysqlfs ocf:heartbeat:Filesystem \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; params device=&quot;/dev/drbd0&quot; fstype=&quot;ext4&quot; directory=&quot;/var/lib/mysql&quot;<br />&gt; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op start interval=&quot;0&quot; timeout=&quot;60s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op monitor interval=&quot;20s&quot; timeout=&quot;40s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op stop interval=&quot;0&quot; timeout=&quot;60s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; meta target-role=&quot;Started&quot;<br />&gt;<br />&gt; primitive mysqlip ocf:heartbeat:IPaddr2 \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; params ip=&quot;192.168.2.30&quot; nic=&quot;eth0&quot; cidr_netmask=&quot;24&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op start interval=&quot;0s&quot; timeout=&quot;60s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op monitor interval=&quot;5s&quot; timeout=&quot;20s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op stop interval=&quot;0s&quot; timeout=&quot;60s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; meta target-role=&quot;Started&quot;<br />&gt;<br />&gt; primitive wwwfs ocf:heartbeat:Filesystem \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; params device=&quot;/dev/drbd1&quot; fstype=&quot;ext4&quot; directory=&quot;/var/www&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op start interval=&quot;0&quot; timeout=&quot;60s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op monitor interval=&quot;20s&quot; timeout=&quot;40s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op stop interval=&quot;0&quot; timeout=&quot;60s&quot;<br />&gt;<br />&gt; primitive zarafafs ocf:heartbeat:Filesystem \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; params device=&quot;/dev/drbd2&quot; fstype=&quot;ext4&quot; directory=&quot;/var/lib/zarafa&quot;<br />&gt; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op start interval=&quot;0&quot; timeout=&quot;60s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op monitor interval=&quot;20s&quot; timeout=&quot;40s&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op stop interval=&quot;0&quot; timeout=&quot;60s&quot;<br />&gt;<br />&gt; ms ms_drbd0 drbd0 \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; meta master-max=&quot;1&quot; master-node-max=&quot;1&quot; clone-max=&quot;2&quot;<br />&gt; clone-node-max=&quot;1&quot; notify=&quot;true&quot; target-role=&quot;Started&quot;<br />&gt;<br />&gt; ms ms_drbd1 drbd1 \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; meta master-max=&quot;1&quot; master-node-max=&quot;1&quot; clone-max=&quot;2&quot;<br />&gt; clone-node-max=&quot;1&quot; notify=&quot;true&quot;<br />&gt;<br />&gt; ms ms_drbd2 drbd2 \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; meta master-max=&quot;1&quot; master-node-max=&quot;1&quot; clone-max=&quot;2&quot;<br />&gt; clone-node-max=&quot;1&quot; notify=&quot;true&quot;<br />&gt;<br />&gt; colocation fs2_on_drbd inf: wwwfs ms_drbd1:Master<br />&gt;<br />&gt; colocation fs3_on_drbd inf: zarafafs ms_drbd2:Master<br />&gt;<br />&gt; colocation fs_on_drbd inf: mysqlfs ms_drbd0:Master<br />&gt;<br />&gt; order fs2_after_drbd inf: ms_drbd1:promote wwwfs:start<br />&gt;<br />&gt; order fs3_after_drbd inf: ms_drbd2:promote zarafafs:start<br />&gt;<br />&gt; order fs_after_drbd inf: ms_drbd0:promote mysqlfs:start<br />&gt;<br /><br />You either set a location constraint for mysqlip or use a colocation<br />and ordering constraint for it.<br /><br />e.g.: colocation mysqlip_on_drbd inf: mysqlip ms_drbd0:Master<br />order mysqlip_after_drbd inf: ms_drbd0:promote mysqlip:start<br /><br />&gt; property $id=&quot;cib-bootstrap-options&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dc-version=&quot;1.1.2-f059ec7ced7a86f18e5490b67ebf4a0b963bccfe&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cluster-infrastructure=&quot;openais&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expected-quorum-votes=&quot;2&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; no-quorum-policy=&quot;ignore&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stonith-enabled=&quot;false&quot;<br />&gt;<br />&gt; rsc_defaults $id=&quot;rsc-options&quot; \<br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resource_stickyness=&quot;INFINITY&quot; \<br /><br />I wouldn&#39;t set INFINITY, it will cause problems, I&#39;d give it a value<br />of 500 or 1000.<br /><br />Regards,<br />Dan<br /><br />&gt;<br />&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; migration-threshold=&quot;1&quot;<br />&gt;<br />&gt; _______________________________________________<br />&gt; Pacemaker mailing list: Pacemaker@oss.clusterlabs.org<br />&gt; http://oss.clusterlabs.org/mailman/listinfo/pacemaker<br />&gt;<br />&gt; Project Home: http://www.clusterlabs.org<br />&gt; Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf<br />&gt; Bugs:<br />&gt; http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker<br />&gt;<br />&gt;<br /><br /><br /><br />-- <br />Dan Frincu<br />CCNA, RHCE<br /><br />_______________________________________________<br />Pacemaker mailing list: Pacemaker@oss.clusterlabs.org<br />http://oss.clusterlabs.org/mailman/listinfo/pacemaker<br /><br />Project Home: http://www.clusterlabs.org<br />Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf<br />Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker<br /></blockquote>
</body>
</html>