From: Zdeněk Šustr Date: Thu, 4 Mar 2010 12:00:27 +0000 (+0000) Subject: BDII extended with checking for server version through WS and comparing it to that... X-Git-Tag: glite-lb-harvester_R_1_0_4_1~19 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=8d4cecce704a7fb0d88b833394e70aa2d908d150;p=jra1mw.git BDII extended with checking for server version through WS and comparing it to that received through BDII. --- diff --git a/org.glite.testsuites.ctb/LB/tests/lb-common.sh b/org.glite.testsuites.ctb/LB/tests/lb-common.sh index 4654d64..4bd5014 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-common.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-common.sh @@ -31,6 +31,7 @@ LBJOBREG=glite-lb-job_reg LBUSERJOBS=glite-lb-user_jobs LBJOBSTATUS=glite-lb-job_status LBWSJOBSTATUS=glite-lb-ws_jobstat +LBWSGETVERSION=glite-lb-ws_getversion LBPURGE=glite-lb-purge LBCHANGEACL=glite-lb-change_acl LBMON=glite-lb-lbmon diff --git a/org.glite.testsuites.ctb/LB/tests/lb-test-bdii.sh b/org.glite.testsuites.ctb/LB/tests/lb-test-bdii.sh index e865934..8c3b12e 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-test-bdii.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-test-bdii.sh @@ -74,13 +74,41 @@ test_start # check_binaries -printf "Testing if all binaries are available" +printf "Testing if all essential binaries are available" check_binaries $SYS_GREP $SYS_SED $SYS_AWK $SYS_LDAPSEARCH if [ $? -gt 0 ]; then test_failed else test_done + printf "Testing optional WS client binary" + check_binaries $LBWSGETVERSION + if [ $? -gt 0 ]; then + printf " ... not present. Some tests will be skipped\n" + WSBIN="no" + else + test_done + + printf "Testing credentials" + + timeleft=`${GRIDPROXYINFO} | ${SYS_GREP} -E "^timeleft" | ${SYS_SED} "s/timeleft\s*:\s//"` + + if [ "$timeleft" = "" ]; then + printf "No credentials, not critical\n" + WSBIN="no" + else + if [ "$timeleft" = "0:00:00" ]; then + printf "Credentials expired, not critical\n" + WSBIN="no" + else + test_done + WSBIN="yes" + fi + + fi + + fi + # Register job: server=`${SYS_ECHO} ${GLITE_WMS_QUERY_SERVER} | ${SYS_SED} 's/:.*$//'` @@ -111,6 +139,27 @@ else else printf "$glservver" test_done + + printf "Reading version through WS... " + if [ "$WSBIN" == "yes" ]; then + servername=`echo ${GLITE_WMS_QUERY_SERVER} | ${SYS_SED} "s/:.*//"` + wsglservver=`$LBWSGETVERSION -m ${servername}:${GLITE_LB_SERVER_WPORT} | $SYS_SED 's/^.*Server version:\s*//'` + if [ "$wsglservver" == "" ]; then + test_failed + else + printf "$wsglservver" + test_done + + printf "Comparing versions: $glservver == $wsglservver" + if [ "$glservver" == "$wsglservver" ]; then + test_done + else + test_failed + fi + fi + else + test_skipped + fi fi printf "Checking Glue 2.0 entry with 'o=glue'... "