From 2304ef8b2cc805498956e45dc7aba860d664748f Mon Sep 17 00:00:00 2001 From: 9547 Date: Tue, 29 Sep 2020 01:08:52 +0800 Subject: [PATCH] tests/tiup-cluster: check result of pd scale-in --- tests/tiup-cluster/script/scale_core.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tiup-cluster/script/scale_core.sh b/tests/tiup-cluster/script/scale_core.sh index 718415f637..6b7316c4e9 100755 --- a/tests/tiup-cluster/script/scale_core.sh +++ b/tests/tiup-cluster/script/scale_core.sh @@ -58,10 +58,17 @@ function scale_core() { echo "start scale in pd" tiup-cluster $client --yes scale-in $name -N $ipprefix.103:2379 wait_instance_num_reach $name $total_sub_one $native_ssh + + # validate https://github.com/pingcap/tiup/issues/786 + # ensure that this instance is removed from the startup scripts of other components that need to rely on PD + tiup-cluster $client exec $name -N $ipprefix.101 --command "grep -q $ipprefix.103:2379 /home/tidb/deploy/tidb-4000/scripts/run_tidb.sh && exit 1 || exit 0" echo "start scale out pd" topo=./topo/full_scale_in_pd.yaml sed "s/__IPPREFIX__/$ipprefix/g" $topo.tpl > $topo tiup-cluster $client --yes scale-out $name $topo + # after scalue-out, ensure this instance come back + tiup-cluster $client exec $name -N $ipprefix.101 --command "grep -q $ipprefix.103:2379 /home/tidb/deploy/tidb-4000/scripts/run_tidb.sh" + tiup-cluster $client _test $name writable }