[Pacemaker] How to disallow resources to re-run after they were stopped

Mistina Michal Michal.Mistina at virte.sk
Tue Oct 1 10:09:29 UTC 2013


Dear all.

I am using ping resource agent to check if the resources can run on the
node. I have 2 node cluster.

If the destination is down resources are also down on that particular node.
If the destination can be pinged again the resources boot again on the node.

My question is, how can I achieve the node which once couldn't ping the
destination is marked as the host where the resources cannot run anymore, so
the resources stay in stopped state?

 

Versions:

OS: RHEL 6.3

pacemaker-1.1.7-6

corosync-1.4.1-7

resource-agents-3.9.2-12

 

Config:

node node1

node node2

primitive drbd_pg ocf:linbit:drbd \

        params drbd_resource="postgres" \

        op monitor interval="15" role="Master" \

        op monitor interval="16" role="Slave" \

        op start interval="0" timeout="240" \

        op stop interval="0" timeout="120"

primitive pg_fs ocf:heartbeat:Filesystem \

        params device="/dev/vg_local-lv_pgsql/lv_pgsql"
directory="/var/lib/pgsql/9.2/data" options="noatime,nodiratime"
fstype="xfs" \

        op start interval="0" timeout="60" \

        op stop interval="0" timeout="120"

primitive pg_lsb lsb:postgresql-9.2 \

        op monitor interval="30" timeout="60" \

        op start interval="0" timeout="60" \

        op stop interval="0" timeout="60" \

        meta is-managed="true"

primitive pg_lvm ocf:heartbeat:LVM \

        params volgrpname="vg_local-lv_pgsql" \

        op start interval="0" timeout="30" \

        op stop interval="0" timeout="30"

primitive pg_ping ocf:pacemaker:ping \

        params dampen="5s" host_list="192.168.100.254" multiplier="101"
attempts="10" \

        op monitor interval="15s" timeout="30s"

primitive pg_pool ocf:heartbeat:pgpool \

        params pgpoolconf="/etc/pgpool-II/pgpool.conf"
pcpconf="/etc/pgpool-II/pcp.conf" hbaconf="/etc/pgpool-II/pool_hba.conf"
logfile="/var/log/pgpool/pgpool.log" pgpooluser="postgres" checkmethod="pid"
checkstring="/var/run/pgpool/pgpool.pid" pgpoolcmd="/usr/bin/pgpool"
psqlcmd="/usr/pgsql-9.2/bin/psql" pcpnccmd="/usr/bin/pcp_node_count" \

        op monitor interval="20" timeout="30" \

        op start interval="0" timeout="20" \

        op stop interval="0" timeout="20" \

        meta is-managed="true"

primitive pg_vip ocf:heartbeat:IPaddr2 \

        params ip="192.168.100.20" iflabel="nodevip" \

        op monitor interval="5"

group PGServer pg_lvm pg_fs pg_vip pg_lsb pg_pool \

        meta target-role="Started"

ms ms_drbd_pg drbd_pg \

        meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true" target-role="Started"

clone clone_pg_ping pg_ping \

        meta target-role="Started"

location master-prefer-node1 pg_vip 50: node1

location promote_master_on_node_w_reachable_hosts ms_drbd_pg \

        rule $id="promote_master_on_node_w_reachable_hosts-rule"
$role="master" -inf: pingd lte 0

location run_grp_on_node_w_reachable_hosts PGServer \

        rule $id="run_grp_on_node_w_reachable_hosts-rule" -inf: pingd lte 0

colocation col_pg_drbd inf: PGServer ms_drbd_pg:Master

order ord_pg inf: ms_drbd_pg:promote PGServer:start

property $id="cib-bootstrap-options" \

        dc-version="1.1.7-6.el6-148fccfd5985c5590cc601123c6c16e966b85d14" \

        cluster-infrastructure="openais" \

        expected-quorum-votes="4" \

        stonith-enabled="false" \

        no-quorum-policy="ignore" \

        maintenance-mode="false" \

        last-lrm-refresh="1379343052"

rsc_defaults $id="rsc-options" \

        resource-stickiness="100"

 

Any help would be appreciated.

 

Best regards,

Michal Mistina

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20131001/65f3810d/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3076 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20131001/65f3810d/attachment-0003.p7s>


More information about the Pacemaker mailing list