Skip to content

Commit

Permalink
fix(tests/tiup): remove ipprefix
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvisa committed Dec 8, 2020
1 parent f6df856 commit 6238d42
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/tiup-cluster/script/scale_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ function scale_core() {
tiup-cluster $client --yes scale-in $name -N n1:4000
wait_instance_num_reach $name $total_sub_one $native_ssh
# ensure Prometheus's configuration is updated automatically
! tiup-cluster $client exec $name -N $ipprefix.101 --command "grep -q $ipprefix.101:10080 /home/tidb/deploy/prometheus-9090/conf/prometheus.yml"
! tiup-cluster $client exec $name -N n1 --command "grep -q n1:10080 /home/tidb/deploy/prometheus-9090/conf/prometheus.yml"

echo "start scale out tidb"
topo=./topo/full_scale_in_tidb.yaml
tiup-cluster $client --yes scale-out $name $topo
# after scale-out, ensure the service is enabled
tiup-cluster $client exec $name -N n1 --command "systemctl status tidb-4000 | grep Loaded |grep 'enabled; vendor'"
tiup-cluster $client exec $name -N n1 --command "grep -q $ipprefix.101:10080 /home/tidb/deploy/prometheus-9090/conf/prometheus.yml"
tiup-cluster $client exec $name -N n1 --command "grep -q n1:10080 /home/tidb/deploy/prometheus-9090/conf/prometheus.yml"

# scale in tikv maybe exists in several minutes or hours, and the GitHub CI is not guaranteed
# echo "start scale in tikv"
Expand All @@ -59,18 +59,17 @@ function scale_core() {
# tiup-cluster --yes scale-out $name $topo

echo "start scale in pump"
tiup-cluster $client --yes scale-in $name -N $ipprefix.103:8250
tiup-cluster $client --yes scale-in $name -N n3:8250
wait_instance_num_reach $name $total_sub_one $native_ssh

# ensure Prometheus's configuration is updated automatically
! tiup-cluster $client exec $name -N $ipprefix.101 --command "grep -q $ipprefix.103:8250 /home/tidb/deploy/prometheus-9090/conf/prometheus.yml"
! tiup-cluster $client exec $name -N n1 --command "grep -q n3:8250 /home/tidb/deploy/prometheus-9090/conf/prometheus.yml"

echo "start scale out pump"
topo=./topo/full_scale_in_pump.yaml
sed "s/__IPPREFIX__/$ipprefix/g" $topo.tpl > $topo
tiup-cluster $client --yes scale-out $name $topo
# after scale-out, ensure this instance come back
tiup-cluster $client exec $name -N $ipprefix.101 --command "grep -q $ipprefix.103:8250 /home/tidb/deploy/prometheus-9090/conf/prometheus.yml"
tiup-cluster $client exec $name -N n1 --command "grep -q n3:8250 /home/tidb/deploy/prometheus-9090/conf/prometheus.yml"

echo "start scale in pd"
tiup-cluster $client --yes scale-in $name -N n3:2379
Expand Down

0 comments on commit 6238d42

Please sign in to comment.