1717# this script brings up new tablets for the two new shards that we will
1818# be creating in the customer keyspace and copies the schema
1919
20- source .. /env.sh
20+ source ./env.sh
2121
2222# Restart the replica tablets so that they come up with new vttablet versions
2323for i in 101 102; do
2424 echo " Shutting down tablet zone1-$i "
25- CELL=zone1 TABLET_UID=$i .. /scripts/vttablet-down.sh
25+ CELL=zone1 TABLET_UID=$i ./scripts/vttablet-down.sh
2626 echo " Shutting down mysql zone1-$i "
27- CELL=zone1 TABLET_UID=$i .. /scripts/mysqlctl-down.sh
27+ CELL=zone1 TABLET_UID=$i ./scripts/mysqlctl-down.sh
2828 echo " Removing tablet directory zone1-$i "
2929 vtctlclient DeleteTablet -- --allow_primary=true zone1-$i
3030 rm -Rf $VTDATAROOT /vt_0000000$i
3131 echo " Starting tablet zone1-$i again"
32- CELL=zone1 TABLET_UID=$i .. /scripts/mysqlctl-up.sh
33- CELL=zone1 KEYSPACE=commerce TABLET_UID=$i .. /scripts/vttablet-up.sh
32+ CELL=zone1 TABLET_UID=$i ./scripts/mysqlctl-up.sh
33+ CELL=zone1 KEYSPACE=commerce TABLET_UID=$i ./scripts/vttablet-up.sh
3434done
3535
3636for i in 201 202; do
3737 echo " Shutting down tablet zone1-$i "
38- CELL=zone1 TABLET_UID=$i .. /scripts/vttablet-down.sh
38+ CELL=zone1 TABLET_UID=$i ./scripts/vttablet-down.sh
3939 echo " Shutting down mysql zone1-$i "
40- CELL=zone1 TABLET_UID=$i .. /scripts/mysqlctl-down.sh
40+ CELL=zone1 TABLET_UID=$i ./scripts/mysqlctl-down.sh
4141 echo " Removing tablet directory zone1-$i "
4242 vtctlclient DeleteTablet -- --allow_primary=true zone1-$i
4343 rm -Rf $VTDATAROOT /vt_0000000$i
4444 echo " Starting tablet zone1-$i again"
45- CELL=zone1 TABLET_UID=$i .. /scripts/mysqlctl-up.sh
46- SHARD=-80 CELL=zone1 KEYSPACE=customer TABLET_UID=$i .. /scripts/vttablet-up.sh
45+ CELL=zone1 TABLET_UID=$i ./scripts/mysqlctl-up.sh
46+ SHARD=-80 CELL=zone1 KEYSPACE=customer TABLET_UID=$i ./scripts/vttablet-up.sh
4747done
4848
4949for i in 301 302; do
5050 echo " Shutting down tablet zone1-$i "
51- CELL=zone1 TABLET_UID=$i .. /scripts/vttablet-down.sh
51+ CELL=zone1 TABLET_UID=$i ./scripts/vttablet-down.sh
5252 echo " Shutting down mysql zone1-$i "
53- CELL=zone1 TABLET_UID=$i .. /scripts/mysqlctl-down.sh
53+ CELL=zone1 TABLET_UID=$i ./scripts/mysqlctl-down.sh
5454 echo " Removing tablet directory zone1-$i "
5555 vtctlclient DeleteTablet -- --allow_primary=true zone1-$i
5656 rm -Rf $VTDATAROOT /vt_0000000$i
5757 echo " Starting tablet zone1-$i again"
58- CELL=zone1 TABLET_UID=$i .. /scripts/mysqlctl-up.sh
59- SHARD=80- CELL=zone1 KEYSPACE=customer TABLET_UID=$i .. /scripts/vttablet-up.sh
58+ CELL=zone1 TABLET_UID=$i ./scripts/mysqlctl-up.sh
59+ SHARD=80- CELL=zone1 KEYSPACE=customer TABLET_UID=$i ./scripts/vttablet-up.sh
6060done
6161
6262# Wait for all the replica tablets to be in the serving state before reparenting to them.
@@ -85,13 +85,13 @@ vtctldclient PlannedReparentShard customer/80- --new-primary "zone1-301"
8585
8686# Restart the old primary tablets so that they are on the latest version of vttablet too.
8787echo " Restarting tablet zone1-100"
88- CELL=zone1 TABLET_UID=100 .. /scripts/vttablet-down.sh
89- CELL=zone1 KEYSPACE=commerce TABLET_UID=100 .. /scripts/vttablet-up.sh
88+ CELL=zone1 TABLET_UID=100 ./scripts/vttablet-down.sh
89+ CELL=zone1 KEYSPACE=commerce TABLET_UID=100 ./scripts/vttablet-up.sh
9090
9191echo " Restarting tablet zone1-200"
92- CELL=zone1 TABLET_UID=200 .. /scripts/vttablet-down.sh
93- SHARD=-80 CELL=zone1 KEYSPACE=customer TABLET_UID=200 .. /scripts/vttablet-up.sh
92+ CELL=zone1 TABLET_UID=200 ./scripts/vttablet-down.sh
93+ SHARD=-80 CELL=zone1 KEYSPACE=customer TABLET_UID=200 ./scripts/vttablet-up.sh
9494
9595echo " Restarting tablet zone1-300"
96- CELL=zone1 TABLET_UID=300 .. /scripts/vttablet-down.sh
97- SHARD=80- CELL=zone1 KEYSPACE=customer TABLET_UID=300 .. /scripts/vttablet-up.sh
96+ CELL=zone1 TABLET_UID=300 ./scripts/vttablet-down.sh
97+ SHARD=80- CELL=zone1 KEYSPACE=customer TABLET_UID=300 ./scripts/vttablet-up.sh
0 commit comments