Commit 57ec978b authored by unknown's avatar unknown

ndb - autotest

  fix count of nodes needed in test


ndb/test/run-test/conf-daily-basic-dl145a.txt:
  Fix typo
ndb/test/run-test/conf-daily-basic-ndbmaster.txt:
  Fix typo
ndb/test/run-test/conf-daily-devel-ndbmaster.txt:
  Fix typo
ndb/test/run-test/conf-daily-sql-ndbmaster.txt:
  Fix typo
ndb/test/run-test/ndb-autotest.sh:
  Fix count of needed computers for test
parent a2fe4d1b
...@@ -2,7 +2,7 @@ baseport: 16000 ...@@ -2,7 +2,7 @@ baseport: 16000
basedir: /space/autotest basedir: /space/autotest
mgm: CHOOSE_host1 mgm: CHOOSE_host1
ndb: CHOOSE_host2 CHOOSE_host3 ndb: CHOOSE_host2 CHOOSE_host3
api: CHOOSE_host1 CHOOSE_host1 CHOOSE_hosts1 api: CHOOSE_host1 CHOOSE_host1 CHOOSE_host1
-- cluster config -- cluster config
[DB DEFAULT] [DB DEFAULT]
NoOfReplicas: 2 NoOfReplicas: 2
......
...@@ -2,7 +2,7 @@ baseport: 16000 ...@@ -2,7 +2,7 @@ baseport: 16000
basedir: /space/autotest basedir: /space/autotest
mgm: CHOOSE_host1 mgm: CHOOSE_host1
ndb: CHOOSE_host2 CHOOSE_host3 CHOOSE_host2 CHOOSE_host3 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 -- cluster config
[DB DEFAULT] [DB DEFAULT]
NoOfReplicas: 2 NoOfReplicas: 2
......
...@@ -2,7 +2,7 @@ baseport: 16000 ...@@ -2,7 +2,7 @@ baseport: 16000
basedir: /space/autotest basedir: /space/autotest
mgm: CHOOSE_host1 mgm: CHOOSE_host1
ndb: CHOOSE_host2 CHOOSE_host3 CHOOSE_host2 CHOOSE_host3 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 -- cluster config
[DB DEFAULT] [DB DEFAULT]
NoOfReplicas: 2 NoOfReplicas: 2
......
...@@ -2,8 +2,8 @@ baseport: 16000 ...@@ -2,8 +2,8 @@ baseport: 16000
basedir: /space/autotest basedir: /space/autotest
mgm: CHOOSE_host1 mgm: CHOOSE_host1
ndb: CHOOSE_host2 CHOOSE_host3 ndb: CHOOSE_host2 CHOOSE_host3
mysqld: CHOOSE_host1 CHOOSE_hosts4 mysqld: CHOOSE_host1 CHOOSE_host4
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 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 -- cluster config
[DB DEFAULT] [DB DEFAULT]
NoOfReplicas: 2 NoOfReplicas: 2
......
...@@ -211,6 +211,12 @@ start(){ ...@@ -211,6 +211,12 @@ start(){
rm -f /tmp/res.$$.tgz 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` p=`pwd`
for dir in $RUN for dir in $RUN
do do
...@@ -222,7 +228,8 @@ do ...@@ -222,7 +228,8 @@ do
mkdir -p $run_dir $res_dir mkdir -p $run_dir $res_dir
rm -rf $res_dir/* $run_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_hosts=`filter /tmp/filter_hosts.$$ $hosts`
avail=`echo $avail_hosts | wc -w` avail=`echo $avail_hosts | wc -w`
if [ $count -gt $avail ] if [ $count -gt $avail ]
...@@ -233,7 +240,6 @@ do ...@@ -233,7 +240,6 @@ do
fi fi
run_hosts=`echo $avail_hosts| awk '{for(i=1;i<='$count';i++)print $i;}'` 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 choose $conf $run_hosts > $run_dir/d.txt
(cd $run_dir; $mkconfig 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