Changeset 1201

Show
Ignore:
Timestamp:
02/22/10 16:16:43 (2 years ago)
Author:
Gary
Message:

boot-cluster/boot-slave.sh minor edit of var name and further testing passed.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tools/mysql-server/boot-cluster/boot-slave.sh

    r1200 r1201  
    1212 
    1313#Configuration section 
    14 cTimeoutSecs="300"; 
     14iTimeoutSecs="300"; 
    1515cWarnEmail="supportgrp@unixservice.com"; 
    1616cSSHPort="22" 
     
    2525fi 
    2626 
    27 #wait for master to come up. If does not come up after cTimeoutSecs send warning email, exit error. 
     27#wait for master to come up. If does not come up after iTimeoutSecs send warning email, exit error. 
    2828iCounter=0; 
    2929ping -c 1 $2 > /dev/null 2>&1; 
    30 while [ $? != 0 ] && [ $iCounter -lt $cTimeoutSecs ];do 
     30while [ $? != 0 ] && [ $iCounter -lt $iTimeoutSecs ];do 
    3131        let iCounter=iCounter+1; 
    3232        ping -c 1 $2 > /dev/null 2>&1; 
    3333done 
    34 if [ $iCounter -eq "$cTimeoutSecs" ];then 
     34if [ $iCounter -eq "$iTimeoutSecs" ];then 
    3535        fLog "ping master timeout $iCounter"; 
    3636        exit 1; 
     
    3939iCounter=0; 
    4040/usr/bin/ssh -p $cSSHPort $2 ps -ef | grep mysqld  > /dev/null 2>&1; 
    41 while [ $? != 0 ] && [ $iCounter -lt $cTimeoutSecs ];do 
     41while [ $? != 0 ] && [ $iCounter -lt $iTimeoutSecs ];do 
    4242        let iCounter=iCounter+1; 
    4343        /usr/bin/ssh -p $cSSHPort $2 ps -ef | grep mysqld  > /dev/null 2>&1; 
    4444        sleep 1; 
    4545done 
    46 if [ $iCounter -eq "$cTimeoutSecs" ];then 
     46if [ $iCounter -eq "$iTimeoutSecs" ];then 
    4747        fLog "remote mysqld timeout"; 
    4848        exit 2; 
     
    7575        fi 
    7676 
    77         #check status. if slave did not catch up in max cTimeoutSecs send warning email, exit error. 
     77        #check status. if slave did not catch up in max iTimeoutSecs send warning email, exit error. 
    7878        eval `echo "SHOW SLAVE STATUS\G" | mysql -p$1 | grep Seconds_Behind_Master | awk '{printf"iSecondsBehindMaster=%s\n",$2}'`; 
    7979        if [ $? != 0 ];then 
     
    8383        #echo $iSecondsBehindMaster; 
    8484        iCounter=0; 
    85         while [ $iCounter -lt $cTimeoutSecs ] && [ $iSecondsBehindMaster -gt "0" ];do 
     85        while [ $iCounter -lt $iTimeoutSecs ] && [ $iSecondsBehindMaster -gt "0" ];do 
    8686                let iCounter=iCounter+1; 
    8787                eval `echo "SHOW SLAVE STATUS\G" | mysql -p$1 | grep Seconds_Behind_Master | awk '{printf"iSecondsBehindMaster=%s\n",$2}'`; 
     
    9393                sleep 2; 
    9494        done 
    95         if [ $iCounter -eq "$cTimeoutSecs" ];then 
     95        if [ $iCounter -eq "$iTimeoutSecs" ];then 
    9696                fLog "local slave catch-up timeout"; 
    9797                exit 9;