[TD-4812] add change replica operation in robust script

This commit is contained in:
zhaoyanggh 2021-07-21 16:52:17 +08:00
parent 655a514835
commit 7fee581d88
1 changed files with 11 additions and 1 deletions

12
tests/robust/cluster.sh Normal file → Executable file
View File

@ -23,7 +23,9 @@ menu(){
echo "=============================="
echo "3 arbitrator"
echo "=============================="
echo "4 exit"
echo "4 alter replica"
echo "=============================="
echo "5 exit"
echo "=============================="
}
@ -310,6 +312,7 @@ do
2)
var=`ps -ef | grep tarbitrator | awk '{print $2}' | head -n 1`
kill -9 $var
echo -e "\033[32mSuccessfully stop arbitrator $3 \033[0m"
break
;;
3)
@ -318,6 +321,13 @@ do
esac
;;
4)
read -p "Enter replica number: " rep
read -p "Enter database name: " db
taos -s "alter database $db replica $rep"
echo -e "\033[32mSuccessfully change $db's replica to $rep \033[0m"
break
;;
5)
break
;;
esac