mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-19 08:56:34 +00:00
test-env start cluster: Check that the cluster size is correct
This commit is contained in:
@@ -292,6 +292,17 @@ case $opt in
|
|||||||
exit_status=$((exit_status | $?))
|
exit_status=$((exit_status | $?))
|
||||||
./start-sandbox "${2:-"slave"}" 12347 12346
|
./start-sandbox "${2:-"slave"}" 12347 12346
|
||||||
exit_status=$((exit_status | $?))
|
exit_status=$((exit_status | $?))
|
||||||
|
|
||||||
|
if [ "${2:-""}" = "cluster" ]; then
|
||||||
|
echo "Checking that the cluster size is correct... "
|
||||||
|
size=$(/tmp/12345/use -ss -e "SHOW STATUS LIKE 'wsrep_cluster_size'" 2>/dev/null)
|
||||||
|
if [ "${size:-""}" -ne 3 ]; then
|
||||||
|
echo "FAILED"
|
||||||
|
else
|
||||||
|
echo "OK"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $? -eq 0 -a "$MYSQL_VERSION" '>' "4.1" ]; then
|
if [ $? -eq 0 -a "$MYSQL_VERSION" '>' "4.1" ]; then
|
||||||
echo -n "Loading sakila database... "
|
echo -n "Loading sakila database... "
|
||||||
./load-sakila-db 12345 "${2:-""}"
|
./load-sakila-db 12345 "${2:-""}"
|
||||||
|
Reference in New Issue
Block a user