一次RAC VIP漂移的结果诊断及修复(二)

2015-07-16 12:09:22 · 作者: · 浏览: 5
pinging gateway


if [ -n "$DEFAULTGW" ]
?


?


? 修改后:



# Check the status of the interface thro' pinging gateway
if [ -n "$DEFAULTGW" -a $FAIL_WHEN_DEFAULTGW_NO_FOUND -eq 1 ]?
?


?


?


查阅oracle11.2.0.3版本的 RACGVIP代码,同样以次修改
?


以下为Oracle11G的racgvip代码



if [ -n "$DEFAULTGW" -a $FAIL_WHEN_DEFAULTGW_NOT_FOUND -eq 1 ]


? ? then


? ? ? _RET=1


? ? ? # get RX packets numbers


? ? ? _O1=`$IFCONFIG $_IF | $AWK '{ if (/RX packets:/) { sub("packets:", "", $2); print $2}}'`


? ? ? x=$CHECK_TIMES


? ? ? while [ $x -gt 0 ]


? ? ? do


? ? ? ? logx "About to execute $PING -r -I $_IF $DEFAULTGW $PING_TIMEOUT"


? ? ? ? $PING -r -I $_IF $DEFAULTGW $PING_TIMEOUT > /dev/null 2>&1


? ? ? ? rc=$?


? ? ? ? if [ $rc -eq 0 ]


? ? ? ? then


? ? ? ? ? _RET=0


? ? ? ? ? break


? ? ? ? else


? ? ? ? ? echo "ping to $DEFAULTGW via $_IF failed, rc = $rc (host=$HOSTNAME)"


? ? ? ? fi?


? ? ? ? x=$(($x-1))


? ? ? done
?


?结论及解决方案


修改racgvip代码


修改完成后,需要观察ora.s9lp1.vip.log里出现如下信息:


?IsIfAlive: Default gateway is not defined (host=$HOSTNAME)


表明修改失效