Hello Andreas, first of all, thanks for the quick reply. I've noticed that stop and start is executed on any resource when I'm running cleanup on. Which also affects all other resources when it is in an "order". Please find attached the configuration. Regards, Georgios ------------------------------ Message: 4 Date: Fri, 02 Dec 2011 11:42:11 +0100 From: Andreas Kurz <andr...@hastexo.com> To: pacemaker@oss.clusterlabs.org Subject: Re: [Pacemaker] Cleanup on Master/Slave DRBD resource changes the roles Message-ID: <4ed8ab83.5050...@hastexo.com> Content-Type: text/plain; charset="iso-8859-1" Hello Georgios, On 12/02/2011 10:54 AM, Georgios Kasapoglou wrote:

Hi all,
I've a 2-nodes cluster using pacemaker 1-2.
I've set a DRBD resource, according to
http://www.clusterlabs.org/wiki/PostgresHowto#4._Configuring_DRBD

Everything works fine, except when I'm trying to cleanup the "master".
E.g., when I ran cleanup on drbd_r0:0 which runs on node1 while it is
Master, then it will change to Slave
and drbd_r0:1 on node2 will become Master.
please show us your complete Pacemaker configuration


I've checked the /var/log/messages and saw the message below:
r0 already Primary, demoting.

I found that  drbd_start function in
"/usr/lib/ocf/resource.d/linbit/drbd" is responsible for this.

I've searched in the documentation, how cleanup works but found nothing.
Maybe I have not searched in the
right documents. I suspect that it calls stop and start.
Is that true?
cleanup removes all information from the status section of the resource
and triggers a reprobe followed by any other action that brings the
resource into the desired state.

Regards,
Andreas

--
Georgios Kasapoglou
Telecom and Systems Engineer
Operation/Business Support Systems

INTRACOM TELECOM
19.7 km Markopoulou Ave.
19002 Peania, Athens, Greece
tel: +30 210 667 7667
fax: +30 210 667 7137
e-mail: gka...@intracom.com
www.intracom-telecom.com


node node1 \
        attributes standby="off"
node node2 \
        attributes standby="off"
primitive drbd_filesystem ocf:heartbeat:Filesystem \
        params device="/dev/drbd0" directory="/drbdarea" fstype="ext2" \
        op start interval="0" timeout="60s" \
        op stop interval="0" timeout="60s" \
        meta is-managed="true"
primitive drbd_r0 ocf:linbit:drbd \
        params drbd_resource="r0" \
        op monitor interval="15s" \
        op start interval="0" timeout="240s" \
        op stop interval="0" timeout="100s" \
        meta target-role="started"
primitive floating_ip ocf:heartbeat:IPaddr2 \
        params ip="10.1.1.5" nic="eth0"
primitive mail_notification ocf:heartbeat:MailTo \
        params email="gka...@intracom.gr" subject="UniMS Cluster Notification"
primitive ping_GW ocf:pacemaker:ping \
        operations $id="ping_GW-operations" \
        op monitor interval="10s" timeout="5s" on-fail="standby" \
        params host_list="10.1.1.1" \
        meta migration-threshold="1"
primitive postgresql ocf:heartbeat:pgsql \
        meta failure-timeout="60" \
        params pgctl="/drbdarea/PostgreSQL/9.1/bin/pg_ctl" 
psql="/drbdarea/PostgreSQL/9.1/bin/psql" pgdata="/drbdarea/PostgreSQL/9.1/data" 
pgdba="postgres" \
        op monitor interval="10" timeout="30s" on-fail="standby" 
start-delay="10s" \
        op start interval="0" timeout="30s" start-delay="5s" \
        op stop interval="0" timeout="30s"
group unims_apps drbd_filesystem floating_ip postgresql mail_notification 
ping_GW \
        meta target-role="started"
ms drbd_master drbd_r0 \
        meta master-max="1" master-node-max="1" clone-max="2" 
clone-node-max="1" notify="true" target-role="started"
colocation coloc1 inf: _rsc_set_ unims_apps drbd_master:Master
order order1 inf: drbd_master:promote unims_apps:start
property $id="cib-bootstrap-options" \
        cluster-infrastructure="openais" \
        enable-startup-probes="false" \
        startup-fencing="false" \
        dc-deadtime="10s" \
        dc-version="1.1.2-2e096a41a5f9e184a1c1537c82c6da1093698eb5" \
        expected-quorum-votes="2" \
        last-lrm-refresh="1322821403" \
        no-quorum-policy="ignore" \
        stonith-action="poweroff" \
        stonith-enabled="false"
_______________________________________________
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