From 7fee581d8864396f4399ade4f84db920d7c16f11 Mon Sep 17 00:00:00 2001 From: zhaoyanggh Date: Wed, 21 Jul 2021 16:52:17 +0800 Subject: [PATCH] [TD-4812] add change replica operation in robust script --- tests/robust/cluster.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) mode change 100644 => 100755 tests/robust/cluster.sh diff --git a/tests/robust/cluster.sh b/tests/robust/cluster.sh old mode 100644 new mode 100755 index 166014fefb..b291fb4d9e --- a/tests/robust/cluster.sh +++ b/tests/robust/cluster.sh @@ -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 -- GitLab