Hi all,
I'm setting up a corosync+pacemaker cluster active/passive with 2 nodes
and some resource managed by crm.
I must control the location of a group of resource based on the node
connectivity.
As you can see in my configuration below, I set a group of resource
"gr_freeswitch" and I want that this group runs on the node with the
best connectivity; so I created a resource "ping" and I cloned it
primitive pingd ocf:pacemaker:ping \
params host_list="alfa beta 192.168.3.100 192.168.3.1" multiplier="100"
attempts="3" \
op monitor interval="10s" timeout="60s" \
op start interval="0" timeout="60s" \
op stop interval="0" timeout="20s"
clone pingdClone pingd \
meta globally-unique="false" target-role="Started"
then I create a "location" entry to configure the location where the
gr_freeswitch resource should run based on node connectivity
location lo_gr_freeswitch gr_freeswitch \
rule $id="lo_gr_freeswitch-rule" pingd: defined pingd \
rule $id="lo_gr_freeswitch-rule-0" -inf: not_defined pingd or pingd lte
100 \
rule $id="lo_gr_freeswitch-rule-1" 10: #uname eq alfa
The problem is that when the connectivity of the node master decreases,
the resource doesn't switch to the other node, this only happens when
the connectivity of master Node is equal to 100 or less.
Just a note: before to install the cluster on the server I tried to test
this environment on a couple of VM and I used the pingd function and it
worked well, but now it seems pingd is deprecated and when I replicated
the configuration on my servers with a newer version of pacemaker I saw
some error of resource pingd configuration. I tried to use "ping" and I
felt in trouble.
Could anyone help me?
Thank you
Cheers,
Luca
LOG:
OS: centos5.5 64bit kernel 2.6.18-194.32.1.el5
corosync: corosync-1.2.7-1.1.el5
pacemaker: pacemaker-1.1.5-1.1.el5
Below there is the complete configuration and the log of "crm_mon -A"
============
Last updated: Thu Mar 3 10:05:36 2011
Stack: openais
Current DC: alfa - partition with quorum
Version: 1.1.5-1.1.el5-01e86afaaa6d4a8c4836f68df80ababd6ca3902f
2 Nodes configured, 2 expected votes
7 Resources configured.
============
Online: [ alfa beta ]
Resource Group: gr_freeswitch
fs_drbd_freeswitch (ocf::heartbeat:Filesystem): Started beta
ClusterIP (ocf::heartbeat:IPaddr2): Started beta
freeswitch (lsb:freeswitch): Started beta
resMON (ocf::pacemaker:ClusterMon): Started beta
WebSite (ocf::heartbeat:apache): Started beta
Master/Slave Set: ms_drbd_logAlfa [drbd_logAlfa]
Masters: [ alfa ]
Slaves: [ beta ]
Master/Slave Set: ms_drbd_logBeta [drbd_logBeta]
Masters: [ beta ]
Slaves: [ alfa ]
fs_drbd_logAlfa (ocf::heartbeat:Filesystem): Started alfa
fs_drbd_logBeta (ocf::heartbeat:Filesystem): Started beta
Master/Slave Set: ms_drbd_freeswitch [drbd_freeswitch]
Masters: [ beta ]
Slaves: [ alfa ]
Clone Set: pingdClone [pingd]
Started: [ alfa beta ]
Node Attributes:
* Node alfa:
+ master-drbd_freeswitch:0 : 10000
+ master-drbd_logAlfa:0 : 10000
+ master-drbd_logBeta:0 : 10000
+ pingd : 400
* Node beta:
+ master-drbd_freeswitch:1 : 10000
+ master-drbd_logAlfa:1 : 10000
+ master-drbd_logBeta:1 : 10000
+ pingd : 400
============
Last updated: Thu Mar 3 10:07:27 2011
Stack: openais
Current DC: alfa - partition with quorum
Version: 1.1.5-1.1.el5-01e86afaaa6d4a8c4836f68df80ababd6ca3902f
2 Nodes configured, 2 expected votes
7 Resources configured.
============
Online: [ alfa beta ]
Resource Group: gr_freeswitch
fs_drbd_freeswitch (ocf::heartbeat:Filesystem): Started beta
ClusterIP (ocf::heartbeat:IPaddr2): Started beta
freeswitch (lsb:freeswitch): Started beta
resMON (ocf::pacemaker:ClusterMon): Started beta
WebSite (ocf::heartbeat:apache): Started beta
Master/Slave Set: ms_drbd_logAlfa [drbd_logAlfa]
Masters: [ alfa ]
Slaves: [ beta ]
Master/Slave Set: ms_drbd_logBeta [drbd_logBeta]
Masters: [ beta ]
Slaves: [ alfa ]
fs_drbd_logAlfa (ocf::heartbeat:Filesystem): Started alfa
fs_drbd_logBeta (ocf::heartbeat:Filesystem): Started beta
Master/Slave Set: ms_drbd_freeswitch [drbd_freeswitch]
Masters: [ beta ]
Slaves: [ alfa ]
Clone Set: pingdClone [pingd]
Started: [ alfa beta ]
Node Attributes:
* Node alfa:
+ master-drbd_freeswitch:0 : 10000
+ master-drbd_logAlfa:0 : 10000
+ master-drbd_logBeta:0 : 10000
+ pingd : 400
* Node beta:
+ master-drbd_freeswitch:1 : 10000
+ master-drbd_logAlfa:1 : 10000
+ master-drbd_logBeta:1 : 10000
+ pingd : 300 : Connectivity is
degraded (Expected=400)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
node alfa
node beta
primitive ClusterIP ocf:heartbeat:IPaddr2 \
params ip="192.168.3.10" cidr_netmask="24" nic="eth0" iflabel="0" \
op monitor interval="2s"
primitive WebSite ocf:heartbeat:apache \
params configfile="/etc/httpd/conf/httpd.conf" \
op monitor start-delay="15s" interval="60s" \
op start interval="0" timeout="40s" \
op stop interval="0" timeout="60s"
primitive drbd_freeswitch ocf:linbit:drbd \
params drbd_resource="r2" \
op monitor interval="30s" \
op start interval="0" timeout="240s" \
op stop interval="0" timeout="100s"
primitive drbd_logAlfa ocf:linbit:drbd \
params drbd_resource="r0" \
op monitor interval="30s" \
op start interval="0" timeout="240s" \
op stop interval="0" timeout="100s"
primitive drbd_logBeta ocf:linbit:drbd \
params drbd_resource="r1" \
op monitor interval="30s" \
op start interval="0" timeout="240s" \
op stop interval="0" timeout="100s"
primitive freeswitch lsb:freeswitch \
op monitor interval="60s" \
op start interval="0" timeout="60s" \
op stop interval="0" timeout="60s"
primitive fs_drbd_freeswitch ocf:heartbeat:Filesystem \
params device="/dev/drbd2" directory="/data" fstype="ext3" \
op monitor interval="20s" timeout="40s" \
op start interval="0" timeout="60s" \
op stop interval="0" timeout="60s"
primitive fs_drbd_logAlfa ocf:heartbeat:Filesystem \
params device="/dev/drbd0" directory="/log_alfa" fstype="ext3" \
op monitor interval="20s" timeout="40s" \
op start interval="0" timeout="60s" \
op stop interval="0" timeout="60s"
primitive fs_drbd_logBeta ocf:heartbeat:Filesystem \
params device="/dev/drbd1" directory="/log_beta" fstype="ext3" \
op monitor interval="20s" timeout="40s" \
op start interval="0" timeout="60s" \
op stop interval="0" timeout="60s"
primitive pingd ocf:pacemaker:ping \
params host_list="alfa beta 192.168.3.100 192.168.3.1" multiplier="100"
attempts="3" \
op monitor interval="10s" timeout="60s" \
op start interval="0" timeout="60s" \
op stop interval="0" timeout="20s"
primitive resMON ocf:pacemaker:ClusterMon \
operations $id="resMON-operations" \
op monitor interval="180" timeout="20" \
op start interval="0" timeout="90s" \
op stop interval="0" timeout="100s" \
params htmlfile="/data/srv/www/cluster-info/index.html"
extra_options="--snmp-trap 192.168.25.49"
group gr_freeswitch fs_drbd_freeswitch ClusterIP freeswitch resMON WebSite \
meta resource-stickiness="50" target-role="Started"
ms ms_drbd_freeswitch drbd_freeswitch \
meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true"
ms ms_drbd_logAlfa drbd_logAlfa \
meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true"
ms ms_drbd_logBeta drbd_logBeta \
meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true"
clone pingdClone pingd \
meta globally-unique="false" target-role="Started"
location lo_gr_freeswitch gr_freeswitch \
rule $id="lo_gr_freeswitch-rule" pingd: defined pingd \
rule $id="lo_gr_freeswitch-rule-0" -inf: not_defined pingd or pingd lte
100 \
rule $id="lo_gr_freeswitch-rule-1" 10: #uname eq alfa
location ms_logAlfa__on__alfa ms_drbd_logAlfa \
rule $id="ms_logAlfa__on__alfa-rule" $role="master" 1000: #uname eq alfa
location ms_logBeta__on__beta ms_drbd_logBeta \
rule $id="ms_logBeta__on__beta-rule" $role="master" 1000: #uname eq beta
colocation freeswitch_on_drbd inf: gr_freeswitch ms_drbd_freeswitch:Master
colocation fs_logAlfa__on__drbd_logAlfa inf: fs_drbd_logAlfa
ms_drbd_logAlfa:Master
colocation fs_logBeta__on__drbd_logBeta inf: fs_drbd_logBeta
ms_drbd_logBeta:Master
order freeswitch_after_drbd inf: ms_drbd_freeswitch:promote gr_freeswitch:start
order fs_logAlfa__after__drbd_logAlfa inf: ms_drbd_logAlfa:promote
fs_drbd_logAlfa:start
order fs_logBeta__after__drbd_logBeta inf: ms_drbd_logBeta:promote
fs_drbd_logBeta:start
property $id="cib-bootstrap-options" \
stonith-enabled="false" \
default-resource-stickiness="1" \
no-quorum-policy="ignore" \
dc-version="1.1.5-1.1.el5-01e86afaaa6d4a8c4836f68df80ababd6ca3902f" \
cluster-infrastructure="openais" \
expected-quorum-votes="2"
:: SYSNET TELEMATICA srl ::
CONFIDENZIALE:
Questo messaggio e gli eventuali allegati sono confidenziali e riservati.
Se vi è stato recapitato per errore e non siete fra i destinatari elencati,
siete pregati di darne immediatamente avviso al mittente e cancellare il
messaggio
di posta e gli eventuali file allegati. Le informazioni contenute non devono
essere mostrate ad altri, né utilizzate, memorizzate o copiate in qualsiasi
forma.
CONFIDENTIALITY :
This e-mail and any attachments are confidential and may be privileged.
If you are not a named recipient, please notify the sender immediately and
delete
this e-mail and any attachment. Do not disclose the contents to another person,
use it for any purpose or store or copy the information in any medium.
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems