[Pacemaker] howto stop node from becoming primary

Serge Dubrouski sergeyfd at gmail.com
Thu Aug 12 22:01:40 UTC 2010


The right answer to this answer is use stonith. Other possible option
is to use pingd to configure one node to never run any resources if
it's disconnected from the network.

On Thu, Aug 12, 2010 at 3:42 PM,  <lxnf98mm at comcast.net> wrote:
> I have managed to get a 2 node cluster working with the exception of one
> thing
> If the nodes loose connectivity they each think the other is dead and both
> become primaries
> I do not want this to happen
> Suggestion please
>
> [root at abctest2 ~]# crm configure show
> node abctest1
> node abctest2
> primitive apache ocf:heartbeat:apache \
>        params configfile="/etc/httpd/conf/httpd.conf" \
>        op monitor interval="60s" timeout="40s" \
>        meta target-role="Started"
> primitive clusterip1 ocf:heartbeat:IPaddr2 \
>        params ip="172.17.32.11" cidr_netmask="32" \
>        op monitor interval="30s" \
>        meta target-role="Started"
> primitive clusterip2 ocf:heartbeat:IPaddr2 \
>        params ip="172.17.32.12" cidr_netmask="32" \
>        op monitor interval="30s" \
>        meta target-role="Started"
> primitive drbd0 ocf:linbit:drbd \
>        params drbd_resource="r0" \
>        op monitor interval="59s" role="Master" timeout="30s" \
>        op monitor interval="60s" role="Slave" timeout="30s"
> primitive fs0 ocf:heartbeat:Filesystem \
>        params fstype="ext3" directory="/drbd_r0/" device="/dev/drbd0" \
>        meta target-role="Started"
> primitive mysql ocf:heartbeat:mysql \
>        params binary="/usr/bin/mysqld_safe" datadir="/var/lib/mysql"
> socket="/var/lib/mysql/mysql.sock" log="/var/log/mysqld.log"
> pid="/var/run/mysqld/mysqld.pid" user="mysql" \
>        op monitor interval="30s"
> primitive tomcat ocf:heartbeat:tomcat \
>        params java_home="/opt/IBMJava2-142"
> catalina_home="/opt/apache-tomcat-4.1.40" \
>        op monitor interval="10s" timeout="30s" depth="0" \
>        meta target-role="Started"
> ms ms-drbd0 drbd0 \
>        meta clone-max="2" notify="true" globally-unique="false"
> target-role="Master" is-managed="true"
> colocation apache-on-fs0 inf: apache fs0
> colocation clusterip1-on-drbd inf: clusterip1 ms-drbd0:Master
> colocation clusterip2-on-drbd inf: clusterip2 ms-drbd0:Master
> colocation fs-on-drbd inf: fs0 ms-drbd0:Master
> colocation mysql-on-fs0 inf: mysql fs0
> colocation tomcat-on-fs0 inf: tomcat fs0
> order apache-after-clusterip1 inf: clusterip1 apache
> order apache-after-clusterip2 inf: clusterip2 apache
> order apache-after-fs0 inf: fs0 apache
> order apache-after-mysql inf: mysql apache
> order apache-after-tomcat inf: tomcat apache
> order fs0-after-drbd0 inf: ms-drbd0:promote fs0:start
> order mysql-after-fs0 inf: fs0 mysql
> order tomcat-after-fs0 inf: fs0 tomcat
> property $id="cib-bootstrap-options" \
>        dc-version="1.0.9-89bd754939df5150de7cd76835f98fe90851b677" \
>        cluster-infrastructure="openais" \
>        expected-quorum-votes="2" \
>        last-lrm-refresh="1281644620" \
>        stonith-enabled="false" \
>        no-quorum-policy="ignore"
> rsc_defaults $id="rsc-options" \
>        resource-stickiness="100"
>
>
> Thanks
> Richard
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>



-- 
Serge Dubrouski.




More information about the Pacemaker mailing list