Commit 46265f9a authored by joreland@mysql.com's avatar joreland@mysql.com

ndb - autotest

  fix count of nodes needed in test
parent 44fea287
......@@ -2,7 +2,7 @@ baseport: 16000
basedir: /space/autotest
mgm: CHOOSE_host1
ndb: CHOOSE_host2 CHOOSE_host3
api: CHOOSE_host1 CHOOSE_host1 CHOOSE_hosts1
api: CHOOSE_host1 CHOOSE_host1 CHOOSE_host1
-- cluster config
[DB DEFAULT]
NoOfReplicas: 2
......
......@@ -2,7 +2,7 @@ baseport: 16000
basedir: /space/autotest
mgm: CHOOSE_host1
ndb: CHOOSE_host2 CHOOSE_host3 CHOOSE_host2 CHOOSE_host3
api: CHOOSE_host1 CHOOSE_host1 CHOOSE_hosts1
api: CHOOSE_host1 CHOOSE_host1 CHOOSE_host1
-- cluster config
[DB DEFAULT]
NoOfReplicas: 2
......
......@@ -2,7 +2,7 @@ baseport: 16000
basedir: /space/autotest
mgm: CHOOSE_host1
ndb: CHOOSE_host2 CHOOSE_host3 CHOOSE_host2 CHOOSE_host3
api: CHOOSE_host1 CHOOSE_host1 CHOOSE_hosts1
api: CHOOSE_host1 CHOOSE_host1 CHOOSE_host1
-- cluster config
[DB DEFAULT]
NoOfReplicas: 2
......
......@@ -2,8 +2,8 @@ baseport: 16000
basedir: /space/autotest
mgm: CHOOSE_host1
ndb: CHOOSE_host2 CHOOSE_host3
mysqld: CHOOSE_host1 CHOOSE_hosts4
mysql: CHOOSE_host1 CHOOSE_host1 CHOOSE_host1 CHOOSE_host1 CHOOSE_host1 CHOOSE_host1 CHOOSE_hosts4 CHOOSE_hosts4 CHOOSE_hosts4 CHOOSE_hosts4 CHOOSE_hosts4 CHOOSE_hosts4
mysqld: CHOOSE_host1 CHOOSE_host4
mysql: CHOOSE_host1 CHOOSE_host1 CHOOSE_host1 CHOOSE_host1 CHOOSE_host1 CHOOSE_host1 CHOOSE_host4 CHOOSE_host4 CHOOSE_host4 CHOOSE_host4 CHOOSE_host4 CHOOSE_host4
-- cluster config
[DB DEFAULT]
NoOfReplicas: 2
......
......@@ -211,6 +211,12 @@ start(){
rm -f /tmp/res.$$.tgz
}
count_hosts(){
grep "CHOOSE_host" $1 |
awk '{for(i=1; i<=NF;i++) if(match($i, "CHOOSE_host") > 0) print $i;}' |
wc -l
}
p=`pwd`
for dir in $RUN
do
......@@ -222,7 +228,8 @@ do
mkdir -p $run_dir $res_dir
rm -rf $res_dir/* $run_dir/*
count=`grep -c "COMPUTER" $run_dir/1.ndb_mgmd/initconfig.template`
conf=`choose_conf $dir`
count=`count_hosts $conf`
avail_hosts=`filter /tmp/filter_hosts.$$ $hosts`
avail=`echo $avail_hosts | wc -w`
if [ $count -gt $avail ]
......@@ -233,7 +240,6 @@ do
fi
run_hosts=`echo $avail_hosts| awk '{for(i=1;i<='$count';i++)print $i;}'`
conf=`choose_conf $dir`
choose $conf $run_hosts > $run_dir/d.txt
(cd $run_dir; $mkconfig d.txt )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment