<!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> Dan,</p><p> </p><p>Thanks for the swift reply.</p><p>I didn't know pacemaker was sort of loadbalancing across nodes.</p><p>Maybe I should read the documentation in more detail.</p><p> </p><p>Regarding the versions:</p><p>I would like to have the newest versions, but what I've done until now is just install what'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 looping when I change something in the config. Something that's supposed to be fixed in a higher level</p><p>of corosync/heartbeat/pacemaker</p><p> </p><p>About what you said: Is there a limited number of resources that can run on one node, before pacemaker decides it is going to run a subsequent resource on another node ?</p><p>Wouldn't it be best to always use the colocation and order directives to prevent this from happening ?</p><p> </p><p>Thanks again,</p><p> </p><p>Hans<br /> </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 <pacemaker@oss.clusterlabs.org>; <br /><strong>From:</strong> Dan Frincu <df.cluster@gmail.com><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 <j.lammerts@chello.nl> wrote:<br />> Hi all,<br />><br />><br />><br />> Just started to configure a two node cluster (Centos 6) with drbd<br />> 8.4.0-31.el6,<br />><br />> corosync 1.2.3 and pacemaker 1.1.2.<br /><br />Strange choice of versions, if it's a new setup, why don't you go for<br />corosync 1.4.1 and pacemaker 1.1.5?<br /><br />><br />> I created three DRBD filesystems, and started to add them in the crm config<br />> one by one.<br />><br />> Everything went OK. After adding these resources they start on node1, and<br />> when I set node1<br />><br />> in standby, these three DRBD resources failover nicely to the second node.<br />> And vice versa.<br />><br />> So far so good.<br />><br />><br />><br />> Next, I added one extra resource, that is supposed to put an IP alias on<br />> eth0.<br />><br />> This also works, but strangely enough the alias is set on eth0 of the second<br />> node, where I would have<br />><br />> expected it to start on the first node (just as the three drbd resources<br />> did).<br />><br />> Why the.... does Pacemaker decide that this resource is to be started on the<br />> second node ? I cannot grasp<br />><br />> 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'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 />><br />> Hope anyone can tell me what I'm doing wrong.<br />><br />><br />><br />> Thanks,<br />><br />> Hans<br />><br />><br />><br />> Just to be sure, I'll show my config below:<br />><br />><br />><br />> node cl1 \<br />><br />> attributes standby="off"<br />><br />> node cl2 \<br />><br />> attributes standby="off"<br />><br />> primitive drbd0 ocf:linbit:drbd \<br />><br />> params drbd_resource="mysql" drbdconf="/etc/drbd.conf" \<br />><br />> op start interval="0" timeout="240s" \<br />><br />> op monitor interval="20s" timeout="20s" \<br />><br />> op stop interval="0" timeout="100s"<br />><br />> primitive drbd1 ocf:linbit:drbd \<br />><br />> params drbd_resource="www" drbdconf="/etc/drbd.conf" \<br />><br />> op start interval="0" timeout="240s" \<br />><br />> op monitor interval="20s" timeout="20s" \<br />><br />> op stop interval="0" timeout="100s"<br />><br />> primitive drbd2 ocf:linbit:drbd \<br />><br />> params drbd_resource="zarafa" drbdconf="/etc/drbd.conf" \<br />><br />> op start interval="0" timeout="240s" \<br />><br />> op monitor interval="20s" timeout="20s" \<br />><br />> op stop interval="0" timeout="100s"<br />><br />> primitive mysqlfs ocf:heartbeat:Filesystem \<br />><br />> params device="/dev/drbd0" fstype="ext4" directory="/var/lib/mysql"<br />> \<br />><br />> op start interval="0" timeout="60s" \<br />><br />> op monitor interval="20s" timeout="40s" \<br />><br />> op stop interval="0" timeout="60s" \<br />><br />> meta target-role="Started"<br />><br />> primitive mysqlip ocf:heartbeat:IPaddr2 \<br />><br />> params ip="192.168.2.30" nic="eth0" cidr_netmask="24" \<br />><br />> op start interval="0s" timeout="60s" \<br />><br />> op monitor interval="5s" timeout="20s" \<br />><br />> op stop interval="0s" timeout="60s" \<br />><br />> meta target-role="Started"<br />><br />> primitive wwwfs ocf:heartbeat:Filesystem \<br />><br />> params device="/dev/drbd1" fstype="ext4" directory="/var/www" \<br />><br />> op start interval="0" timeout="60s" \<br />><br />> op monitor interval="20s" timeout="40s" \<br />><br />> op stop interval="0" timeout="60s"<br />><br />> primitive zarafafs ocf:heartbeat:Filesystem \<br />><br />> params device="/dev/drbd2" fstype="ext4" directory="/var/lib/zarafa"<br />> \<br />><br />> op start interval="0" timeout="60s" \<br />><br />> op monitor interval="20s" timeout="40s" \<br />><br />> op stop interval="0" timeout="60s"<br />><br />> ms ms_drbd0 drbd0 \<br />><br />> meta master-max="1" master-node-max="1" clone-max="2"<br />> clone-node-max="1" notify="true" target-role="Started"<br />><br />> ms ms_drbd1 drbd1 \<br />><br />> meta master-max="1" master-node-max="1" clone-max="2"<br />> clone-node-max="1" notify="true"<br />><br />> ms ms_drbd2 drbd2 \<br />><br />> meta master-max="1" master-node-max="1" clone-max="2"<br />> clone-node-max="1" notify="true"<br />><br />> colocation fs2_on_drbd inf: wwwfs ms_drbd1:Master<br />><br />> colocation fs3_on_drbd inf: zarafafs ms_drbd2:Master<br />><br />> colocation fs_on_drbd inf: mysqlfs ms_drbd0:Master<br />><br />> order fs2_after_drbd inf: ms_drbd1:promote wwwfs:start<br />><br />> order fs3_after_drbd inf: ms_drbd2:promote zarafafs:start<br />><br />> order fs_after_drbd inf: ms_drbd0:promote mysqlfs:start<br />><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 />> property $id="cib-bootstrap-options" \<br />><br />> dc-version="1.1.2-f059ec7ced7a86f18e5490b67ebf4a0b963bccfe" \<br />><br />> cluster-infrastructure="openais" \<br />><br />> expected-quorum-votes="2" \<br />><br />> no-quorum-policy="ignore" \<br />><br />> stonith-enabled="false"<br />><br />> rsc_defaults $id="rsc-options" \<br />><br />> resource_stickyness="INFINITY" \<br /><br />I wouldn't set INFINITY, it will cause problems, I'd give it a value<br />of 500 or 1000.<br /><br />Regards,<br />Dan<br /><br />><br />> migration-threshold="1"<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:<br />> http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker<br />><br />><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>