Hi,
[email protected] wrote:
hi everybody!
I have some questions about corosync-cfgtool and about rrp_mode.
1. What should I do when "corosync-cfgtool -s" return "Could not
initialize corosync configuration API error 6" ? Restart corosync ?(I
don't think it's a good idea)
2. How can the process happen automatically when network problems
is repaired, instead of using "corosync-cfgtool -r" manually?
You can't through the means of corosync, it's a feature to be made
available in the upcoming Weaver's Needle release (a.k.a. corosync 2.y.z
branch).
https://lists.linux-foundation.org/pipermail/openais/2010-November/015337.html
3 rrp_mode has two options: active and passive. Which one is
better? What's the difference between them?
man 5 corosync.conf
rrp_mode
This specifies the mode of redundant ring, which may be
none, active, or passive. Active replication offers slightly lower
latency from transmit to delivery in faulty network environments but
with less performance. Passive replication may nearly double the speed
of the totem protocol if the protocol doesn’t become cpu bound. The
final option is none, in which case only one network interface will be
used to operate the totem protocol.
If only one interface directive is specified, none is
automatically chosen. If multiple interface directives are specified,
only active or passive may be chosen.
http://www.gossamer-threads.com/lists/linuxha/pacemaker/63130#63130
hth
My testing environment is :
2 PC (on virtualbox-3.2.12)
Double network card and double heart-beat link(eth0 and eth1)
OS: RHEL 5.3 x86
primary rpms: corosync-1.3.0 and pacemaker-1.0.10
corosync.conf:(relevant portion)
compatibility: whitetank
totem {
version: 2
secauth: off
threads: 0
rrp_mode: active
interface{
ringnumber:0
bindnetaddr:10.10.10.0
mcastaddr:235.3.4.5
mcastport:9876
}
interface{
ringnumber:1
bindnetaddr:20.20.20.0
mcastaddr:235.3.4.6
mcastport:9877
}
}
When something bad happen on one of the double-heart-beat-link
--------just like: ifdown eth0, or pull out one of the netting
twine-----
I use:(ifdown eth1 before)
corosync-cfgtool -s
found that:
Printing ring status.
Local node ID 185207306
RING ID 0
id = 10.10.10.11
status = ring 0 active with no faults
RING ID 1
id = 20.20.20.11
status = Marking seqid 14089 ringid 1 interface 20.20.20.11
FAULTY - adminisrtative intervention required.
then:
ifup eth1
and:
corosync-cfgtool -r
The problem is repaired.
BUT, I want this process happen automatically when network
problems is repaired, I write this shell, and start it when service
corosync start:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/bash
local_is_down=0
ip_res=`corosync-cfgtool -s|grep id|awk '{print $3}'`
while [ -z "$ip_res" ]
do
sleep 5
ip_res=`corosync-cfgtool -s|grep id|awk '{print $3}'`
done
ip_num=`corosync-cfgtool -s|grep "no faults"|wc -l`
while true
do
sleep 10
res=`corosync-cfgtool -s`
echo "$res" |grep FAULTY &> /dev/null
if [ "$?" -ne 0 ];then
tmp_num=`echo "$res"|grep "no faults"|wc -l`
if [ "$tmp_num" -eq "$ip_num" ];then
local_is_down=0
else
continue
fi
else
mii-tool |grep "no link" &> /dev/null
if [ $? -eq 0 ];then
local_is_down=1 #pull out one of
the netting twine
else
for IP in $ip_res
do
ifconfig|grep "$IP" &>
/dev/null
if [ $? -ne 0 ];then
local_is_down=1 #ifdown
fi
done
fi
if [ $local_is_down -eq 1 ];then
corosync-cfgtool -r &> /dev/null
fi
fi
done &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The shell works well mostly, however, it does not work sometimes
because command "corosync-cfgtool -s" return
"Could not initialize corosync configuration API error 6"
and the pacemaker process seems also done.
------------------------------------------------------------------------
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais
--
Dan FRINCU
Systems Engineer
CCNA, RHCE
Streamwide Romania
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais