[DRBD-user] Fw: DRBD STONITH - how is Pacemaker constraint cleared?

Bob Schatz bschatz at yahoo.com
Tue Aug 23 19:18:24 CEST 2011

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Jake,

Thank you!   This really helped.


Thanks,

Bob


From: Jake Smith <jsmith at argotec.com>

To: Bob Schatz <bschatz at yahoo.com>
Cc: drbd-user at lists.linbit.com
Sent: Wednesday, August 17, 2011 8:10 AM
Subject: Re: [DRBD-user] Fw: DRBD STONITH - how is Pacemaker constraint cleared?


Bob - 
I noticed I don't currently have any colo or ordering "sets" (more than 2 resources) defined in my current config however I did have these two working lines prior to dropping a dual primary setup: 

colocation c_fs_srv_on_ocfs2control_on_drbd_srv_master inf: cl_fs_srv cl_ocfs2control ms_drbd_srv:Master 
order o_drbd_srv_master_before_ocfs2control_before_fs_srv 0: ms_drbd_srv:promote cl_ocfs2control:start cl_fs_srv:start 

*****Correction****** Grouping and Ordering: 
I got myself mixed up and gave you mis-information!!  You're grouping was fine contrary to what I said in the last post!  Sorry about that!
Groups start in the order written, stop in reverse order, and collocate
in reverse i.e. "group my_group primitive_IP primitive_FS" is basically
writing order primitive_IP primitive_FS and collocation primitive_FS
primitive_IP in one step. If you go back to using groups (once you've got things working reliably) you can keep adding to them as you add dependent resources which makes things clearer as the config grows. The big gotchas are you can't put clones in groups and master/slaves basically equal clones so no ms in groups. . You can do the groups and ordering together like this: 

group g-glance glance-fs-p glance-ip-p 
order o-glance-drbd-before-g-glance inf: ms-glance-drbd:promote g-glance:start
colocation c-g-glance-with-glance-drbd inf: g-glance ms-glance-drbd:Master

The advantages are the scalability - for example here's the next step.  Assume you've created a mysql resource glance-mysql-p:

group g-glance glance-fs-p glance-ip-p glance-mysql-p
order o-glance-drbd-before-g-glance inf: ms-glance-drbd:promote g-glance:start
colocation c-g-glance-with-glance-drbd inf: g-glance ms-glance-drbd:Master

The only thing I had to change to accommodate mysql in ordering and colo was to add it to the existing group.  Beautifully simple once you wrap your head around the logic of it! 

(Tip) I don't know if you have used it but there is a property stop-all-resources which I will set to true and commit before making mass changes. It prevents all kinds of fails and weirdness. Then once the config is where you want it commit it and then commit property stop-all-resources=false and everything will start up per the new config. 

(A) My config (I have ClusterMon off for right as it puts out a ton of info every time I test anything): 

node Condor \
        attributes standby="off"
node Vulture \
        attributes standby="off"
primitive p_crm_monitor ocf:pacemaker:ClusterMon \
        params htmlfile="/tmp/ClusterMon_undef.html" extra_options="-n -r --mail-to sysadmin at argotec.com --mail-from ha_cluster at argotec.com --mail-host mail.argotec.com:25" \
        op monitor interval="10" timeout="20" \
        op start interval="0" timeout="90" \
        op stop interval="0" timeout="100" \
        meta target-role="Stopped"
primitive p_drbd_arpwatch ocf:linbit:drbd \
        params drbd_resource="arpwatch" \
        operations $id="p_drbd_arpwatch-operations" \
        op start interval="0" timeout="240" \
        op stop interval="0" timeout="100" \
        op monitor interval="30" role="Slave" \
        op monitor interval="20" role="Master"
primitive p_drbd_bind ocf:linbit:drbd \
        params drbd_resource="bind" \
        operations $id="p_drbd_bind-operations" \
        op start interval="0" timeout="240" \
        op stop interval="0" timeout="100" \
        op monitor interval="30" role="Slave" \
        op monitor interval="20" role="Master"
primitive p_drbd_ldap ocf:linbit:drbd \
        params drbd_resource="ldap" \
        operations $id="p_drbd_ldap-operations" \
        op start interval="0" timeout="240" \
        op stop interval="0" timeout="100" \
        op monitor interval="30" role="Slave" \
        op monitor interval="20" role="Master"
primitive p_drbd_postfix ocf:linbit:drbd \
        params drbd_resource="postfix" \
        operations $id="p_drbd_postfix-operations" \
        op start interval="0" timeout="240" \
        op stop interval="0" timeout="100" \
        op monitor interval="30" role="Slave" \
        op monitor interval="20" role="Master"
primitive p_drbd_samba ocf:linbit:drbd \
        params drbd_resource="samba" \
        operations $id="p_drbd_samba-operations" \
        op start interval="0" timeout="240" \
        op stop interval="0" timeout="100" \
        op monitor interval="30" role="Slave" \
        op monitor interval="20" role="Master"
primitive p_fs_arpwatch ocf:heartbeat:Filesystem \
        params device="/dev/drbd/by-res/arpwatch" directory="/srv/arpwatch" fstype="ext4" options="noatime" \
        op monitor interval="120" timeout="40" \
        op start interval="0" timeout="60" \
        op stop interval="0" timeout="60"
primitive p_fs_bind ocf:heartbeat:Filesystem \
        params device="/dev/drbd/by-res/bind" directory="/srv/bind" fstype="ext4" options="noatime" \
        op monitor interval="120" timeout="40" \
        op start interval="0" timeout="60" \
        op stop interval="0" timeout="60"
primitive p_fs_ldap ocf:heartbeat:Filesystem \
        params device="/dev/drbd/by-res/ldap" directory="/srv/ldap" fstype="ext4" options="noatime" \
        op monitor interval="120" timeout="40" \
        op start interval="0" timeout="60" \
        op stop interval="0" timeout="60"
primitive p_fs_postfix ocf:heartbeat:Filesystem \
        params device="/dev/drbd/by-res/postfix" directory="/srv/postfix" fstype="ext4" options="noatime" \
        op monitor interval="120" timeout="40" \
        op start interval="0" timeout="60" \
        op stop interval="0" timeout="60"
primitive p_fs_samba ocf:heartbeat:Filesystem \
        params device="/dev/drbd/by-res/samba" directory="/srv/samba" fstype="ext4" options="noatime" \
        op monitor interval="120" timeout="40" \
        op start interval="0" timeout="60" \
        op stop interval="0" timeout="60"
primitive p_ip_ntp ocf:heartbeat:IPaddr2 \
        params ip="192.168.2.203" nic="bond0" cidr_netmask="32" broadcast="192.168.3.255" iflabel="NTP" \
        operations $id="p_ip_ntp-operations" \
        op start interval="0" timeout="20" \
        op stop interval="0" timeout="20" \
        op monitor interval="10" timeout="20" start-delay="0" \
        meta target-role="Started"
primitive p_ipmilan_condor stonith:ipmilan \
        params hostname="Condor" ipaddr="192.168.2.61" port="623" auth="md5" priv="admin" login="foo" password="bar" \
        operations $id="p_ipmilan_condor-operations" \
        op start interval="0" timeout="60" \
        op stop interval="0" timeout="60" \
        op monitor interval="60" timeout="60" start-delay="0"
primitive p_ipmilan_vulture stonith:ipmilan \
        params hostname="Vulture" ipaddr="192.168.2.62" port="623" auth="md5" priv="admin" login="foo" password="bar" \
        operations $id="p_ipmilan_vulture-operations" \
        op start interval="0" timeout="60" \
        op stop interval="0" timeout="60" \
        op monitor interval="60" timeout="60" start-delay="0"
primitive p_lsb_arpwatch lsb:arpwatch \
        operations $id="p_lsb_arpwatch-operations" \
        op start interval="0" timeout="15" \
        op stop interval="0" timeout="15" \
        op monitor interval="15" timeout="15" start-delay="15"
primitive p_lsb_ntp lsb:ntp \
        operations $id="p_lsb_ntp-operations" \
        op start interval="0" timeout="15" \
        op stop interval="0" timeout="15" \
        op monitor interval="15" timeout="15" start-delay="15"
group g_arpwatch p_fs_arpwatch p_lsb_arpwatch \
        meta target-role="Started"
ms ms_drbd_arpwatch p_drbd_arpwatch \
        meta notify="true" master-max="1" master-node-max="1" clone-max="2" clone-node-max="1"
ms ms_drbd_bind p_drbd_bind \
        meta notify="true" master-max="1" master-node-max="1" clone-max="2" clone-node-max="1"
ms ms_drbd_ldap p_drbd_ldap \
        meta notify="true" master-max="1" master-node-max="1" clone-max="2" clone-node-max="1"
ms ms_drbd_postfix p_drbd_postfix \
        meta notify="true" master-max="1" master-node-max="1" clone-max="2" clone-node-max="1"
ms ms_drbd_samba p_drbd_samba \
        meta notify="true" master-max="1" master-node-max="1" clone-max="2" clone-node-max="1"
clone cl_ntp p_lsb_ntp \
        meta clone-node-max="1" globally-unique="false"
location l_ipmilan_condor p_ipmilan_condor -inf: Condor
location l_ipmilan_vulture p_ipmilan_vulture -inf: Vulture
colocation c_fs_bind_on_drbd_bind_master inf: p_fs_bind ms_drbd_bind:Master
colocation c_fs_ldap_on_drbd_ldap_master inf: p_fs_ldap ms_drbd_ldap:Master
colocation c_fs_postfix_on_drbd_postfix_master inf: p_fs_postfix ms_drbd_postfix:Master
colocation c_fs_samba_on_drbd_samba_master inf: p_fs_samba ms_drbd_samba:Master
colocation c_g_arpwatch_on_drbd_arpwatch_master inf: g_arpwatch ms_drbd_arpwatch:Master
colocation c_ip_ntp_on_cl_ntp inf: p_ip_ntp cl_ntp
order o_cl_ntp_before_ip_ntp inf: cl_ntp p_ip_ntp
order o_drbd_arpwatch_master_before_g_arpwatch inf: ms_drbd_arpwatch:promote g_arpwatch:start
order o_drbd_bind_master_before_fs_bind inf: ms_drbd_bind:promote p_fs_bind:start
order o_drbd_ldap_master_before_fs_ldap inf: ms_drbd_ldap:promote p_fs_ldap:start
order o_drbd_postfix_master_before_fs_postfix inf: ms_drbd_postfix:promote p_fs_postfix:start
order o_drbd_samba_master_before_fs_samba inf: ms_drbd_samba:promote p_fs_samba:start
property $id="cib-bootstrap-options" \
        dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \
        stop-all-resources="false" \
        no-quorum-policy="ignore" \
        stonith-enabled="true" \
        last-lrm-refresh="1313505520"
rsc_defaults $id="rsc-options" \
        resource-stickiness="200"

*snip*

HTH
Jake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20110823/70472d44/attachment.htm>


More information about the drbd-user mailing list