On 22 May 2014, at 5:31 pm, Danilo Malcangio <d.malcan...@eletech.it> wrote:

> 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 
> http://foaa.de/old-blog/2010/10/intro-to-pacemaker-part-2-advanced-topics/trackback/index.html).
> 
> 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).

Almost certainly the node is configured to start those resources at bootup.
Don't do that :)

> 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: Pacemaker@oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to