<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">I've removed the location constraint
and it seems the resources don't move anymore if I reboot BX-1. <br>
During reboot I noticed on crm_mon that resources for one second
appeared offline and then they stayed on BX-2. Does anyone know
why that happened?<br>
<br>
I've tried reconfiguring my cluster following this official guide
(<a class="moz-txt-link-freetext" href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-plugin/html/Clusters_from_Scratch/index.html">http://clusterlabs.org/doc/en-US/Pacemaker/1.1-plugin/html/Clusters_from_Scratch/index.html</a>)
5. Creating an Active/Passive Cluster<br>
but I still get the same problem, at reboot nodes go back to the
preferred node BX-1 that is exactly the contrary of what is stated
in the guide.<br>
<br>
Still wondering how the location constraint and stickiness work.<br>
<br>
<blockquote type="cite">
<pre wrap="">Try crm_mon -o and look for monitor operations that return 0 instead of 7
</pre>
</blockquote>
<br>
I am sorry Andrew, I've tried to follow your advice but didn't
quite catch what you want me to look for :(<br>
<br>
<br>
Il 23/05/2014 2.42, Andrew Beekhof ha scritto:<br>
</div>
<blockquote
cite="mid:91558127-F21C-431E-888B-9552B8BE1A08@beekhof.net"
type="cite">
<pre wrap="">
On 22 May 2014, at 9:00 pm, Danilo Malcangio <a class="moz-txt-link-rfc2396E" href="mailto:d.malcangio@eletech.it"><d.malcangio@eletech.it></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Andrew, first of all thanks for answering.
</pre>
<blockquote type="cite">
<pre wrap="">Almost certainly the node is configured to start those resources at bootup.
Don't do that :)
</pre>
</blockquote>
<pre wrap="">
Are you advicing me to delete the location constraint? (location prefer-et-ipbx-1 cluster-group 100: BX-1)
Or is it something else that starts the resources on BX-1 Node??
</pre>
</blockquote>
<pre wrap="">
By the looks of it, yes.
Try crm_mon -o and look for monitor operations that return 0 instead of 7
</pre>
<blockquote type="cite">
<pre wrap="">I've removed all the scripts from the startup sequence with "update-rc.d -f SCRIPT_NAME remove"
Thank you
Il 22/05/2014 12.25, Andrew Beekhof ha scritto:
</pre>
<blockquote type="cite">
<pre wrap="">On 22 May 2014, at 5:31 pm, Danilo Malcangio <a class="moz-txt-link-rfc2396E" href="mailto:d.malcangio@eletech.it"><d.malcangio@eletech.it></a>
wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi everyone,
I've created an active/passive 2 node cluster following the documentation on clusterlabs.
My cluster has the following characteristics
Debian Wheezy 7.2.0
Pacemaker 1.1.7
Corosync 1.4.2
I've made it with the following configuration
node BX-1
node BX-2
primitive cluster-apache2 ocf:heartbeat:apache \
params configfile="/etc/apache2/apache2.conf" httpd="/usr/sbin/apache2" port="80" \
op monitor interval="10s" timeout="60s" \
op start interval="0" timeout="40s" \
op stop interval="0" timeout="60s"
primitive cluster-asterisk lsb:asterisk \
op monitor interval="30" \
op start interval="0" timeout="120s" \
op stop interval="0" timeout="120s"
primitive cluster-ip ocf:heartbeat:IPaddr2 \
params ip="10.2.30.10" cidr_netmask="20" \
op monitor interval="10s" timeout="20s" \
op start interval="0" timeout="20s" \
op stop interval="0" timeout="20s"
primitive cluster-ntp lsb:ntp \
op monitor interval="30" \
op start interval="0" timeout="120s" \
op stop interval="0" timeout="120s"
primitive cluster-tftp lsb:tftpd-hpa \
op monitor interval="30" \
op start interval="0" timeout="120s" \
op stop interval="0" timeout="120s"
group cluster-group cluster-ip cluster-asterisk cluster-apache2 cluster-tftp cluster-ntp \
meta resource-stickiness="101"
location prefer-et-ipbx-1 cluster-group 100: BX-1
colocation cluster-dependency inf: cluster-ip cluster-asterisk cluster-apache2 cluster-tftp cluster-ntp
property $id="cib-bootstrap-options" \
dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \
cluster-infrastructure="openais" \
expected-quorum-votes="2" \
stonith-enabled="false" \
no-quorum-policy="ignore" \
default-resource-stickiness="1"
rsc_defaults $id="rsc-options" \
failure-timeout="60s"
I've set location constraint to have BX-1 as the preferred node at cluster startup, and group stickiness at 101 to avoid moving resources when the master node comes back up (following this guide
<a class="moz-txt-link-freetext" href="http://foaa.de/old-blog/2010/10/intro-to-pacemaker-part-2-advanced-topics/trackback/index.html">http://foaa.de/old-blog/2010/10/intro-to-pacemaker-part-2-advanced-topics/trackback/index.html</a>
).
I've got the following problem: resources move when I reboot nodes.
If i stop corosync on BX-1 resources move to BX-2 and when i restart corosync on BX-1 they stay on BX-2 (as I expected).
But all this doesn't happen with reboot (when I reboot BX-1).
</pre>
</blockquote>
<pre wrap="">Almost certainly the node is configured to start those resources at bootup.
Don't do that :)
</pre>
<blockquote type="cite">
<pre wrap="">After the reboot of BX-1 resources move to BX-2 and when BX-1 comes back up the resources move back to BX-1.
What am I missing in the configuration??
Thank you very much for the support
P.s. I attach also the allocation scores obtained with ptest -sL
BX-1 has resources
Allocation scores:
group_color: et-cluster allocation score on ET-IPBX-1: 100
group_color: et-cluster allocation score on ET-IPBX-2: 0
group_color: cluster-ip allocation score on ET-IPBX-1: 201
group_color: cluster-ip allocation score on ET-IPBX-2: 0
group_color: cluster-asterisk allocation score on ET-IPBX-1: 101
group_color: cluster-asterisk allocation score on ET-IPBX-2: 0
group_color: cluster-apache2 allocation score on ET-IPBX-1: 101
group_color: cluster-apache2 allocation score on ET-IPBX-2: 0
group_color: cluster-tftp allocation score on ET-IPBX-1: 101
group_color: cluster-tftp allocation score on ET-IPBX-2: 0
group_color: cluster-ntp allocation score on ET-IPBX-1: 101
group_color: cluster-ntp allocation score on ET-IPBX-2: 0
native_color: cluster-ip allocation score on ET-IPBX-1: 3231
native_color: cluster-ip allocation score on ET-IPBX-2: 0
native_color: cluster-asterisk allocation score on ET-IPBX-1: 1515
native_color: cluster-asterisk allocation score on ET-IPBX-2: -INFINITY
native_color: cluster-apache2 allocation score on ET-IPBX-1: 707
native_color: cluster-apache2 allocation score on ET-IPBX-2: -INFINITY
native_color: cluster-tftp allocation score on ET-IPBX-1: 303
native_color: cluster-tftp allocation score on ET-IPBX-2: -INFINITY
native_color: cluster-ntp allocation score on ET-IPBX-1: 101
native_color: cluster-ntp allocation score on ET-IPBX-2: -INFINITY
BX-2 has resources (while BX-1 reboot)
Allocation scores:
group_color: et-cluster allocation score on ET-IPBX-1: -INFINITY
group_color: et-cluster allocation score on ET-IPBX-2: 0
group_color: cluster-ip allocation score on ET-IPBX-1: -INFINITY
group_color: cluster-ip allocation score on ET-IPBX-2: 101
group_color: cluster-asterisk allocation score on ET-IPBX-1: 0
group_color: cluster-asterisk allocation score on ET-IPBX-2: 101
group_color: cluster-apache2 allocation score on ET-IPBX-1: 0
group_color: cluster-apache2 allocation score on ET-IPBX-2: 101
group_color: cluster-tftp allocation score on ET-IPBX-1: 0
group_color: cluster-tftp allocation score on ET-IPBX-2: 101
group_color: cluster-ntp allocation score on ET-IPBX-1: 0
group_color: cluster-ntp allocation score on ET-IPBX-2: 101
native_color: cluster-ip allocation score on ET-IPBX-1: -INFINITY
native_color: cluster-ip allocation score on ET-IPBX-2: 3131
native_color: cluster-asterisk allocation score on ET-IPBX-1: -INFINITY
native_color: cluster-asterisk allocation score on ET-IPBX-2: 1515
native_color: cluster-apache2 allocation score on ET-IPBX-1: -INFINITY
native_color: cluster-apache2 allocation score on ET-IPBX-2: 707
native_color: cluster-tftp allocation score on ET-IPBX-1: -INFINITY
native_color: cluster-tftp allocation score on ET-IPBX-2: 303
native_color: cluster-ntp allocation score on ET-IPBX-1: -INFINITY
native_color: cluster-ntp allocation score on ET-IPBX-2: 101
_______________________________________________
Pacemaker mailing list:
<a class="moz-txt-link-abbreviated" href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a>
<a class="moz-txt-link-freetext" href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a>
Project Home:
<a class="moz-txt-link-freetext" href="http://www.clusterlabs.org">http://www.clusterlabs.org</a>
Getting started:
<a class="moz-txt-link-freetext" href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a>
Bugs:
<a class="moz-txt-link-freetext" href="http://bugs.clusterlabs.org">http://bugs.clusterlabs.org</a>
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
Pacemaker mailing list:
<a class="moz-txt-link-abbreviated" href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a>
<a class="moz-txt-link-freetext" href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a>
Project Home:
<a class="moz-txt-link-freetext" href="http://www.clusterlabs.org">http://www.clusterlabs.org</a>
Getting started:
<a class="moz-txt-link-freetext" href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a>
Bugs:
<a class="moz-txt-link-freetext" href="http://bugs.clusterlabs.org">http://bugs.clusterlabs.org</a>
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
Pacemaker mailing list: <a class="moz-txt-link-abbreviated" href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a>
<a class="moz-txt-link-freetext" href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a>
Project Home: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org">http://www.clusterlabs.org</a>
Getting started: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a>
Bugs: <a class="moz-txt-link-freetext" href="http://bugs.clusterlabs.org">http://bugs.clusterlabs.org</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Pacemaker mailing list: <a class="moz-txt-link-abbreviated" href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a>
<a class="moz-txt-link-freetext" href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a>
Project Home: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org">http://www.clusterlabs.org</a>
Getting started: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a>
Bugs: <a class="moz-txt-link-freetext" href="http://bugs.clusterlabs.org">http://bugs.clusterlabs.org</a>
</pre>
</blockquote>
<br>
</body>
</html>