Skip to content

Commit

Permalink
tests/tiup-cluster: check result of pd scale-in
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvisa committed Oct 9, 2020
1 parent 074662d commit 2304ef8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/tiup-cluster/script/scale_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 2304ef8

Please sign in to comment.