4.0.0-3
- configure script update (globus flavors added to configure call)
+from 3.2.2-1
+- Fix edg_wll_NotifDrop prototype (#34649).
+
7.0.0-4
- configure script update (globus flavors added to configure call)
+from 6.1.3-1
+- Fixed parsing of strings containing '\' (bug #35770)
+
char *func = "edg_wll_ULMProcessParseTable";
char *eq;
int i,j;
- int eqCnt,qmCnt,spCnt;
+ int eqCnt,qmCnt,spCnt,bsCnt;
int iArrayEQ[ULM_FIELDS_MAX];
int iArraySP[ULM_FIELDS_MAX];
size_t size;
}
i = j = 0;
- qmCnt = eqCnt = spCnt = 0;
+ qmCnt = eqCnt = spCnt = bsCnt = 0;
size = strlen(this->raw);
switch (this->raw[i]) {
case ULM_SP :
case ULM_TB :
- if (qmCnt == 0) { iArraySP[spCnt] = i; spCnt++; }
+ if (qmCnt == 0) {
+ iArraySP[spCnt] = i; spCnt++;
+ } else {
+ if (this->raw[i-1] == ULM_BS) bsCnt = 0; // escaped ULM_SP or ULM_TB inside value
+ }
break;
case ULM_EQ :
if (i==0) {
- fprintf(stderr,"%s: PARSE ERROR: '%c' at the beginning of log line.\n", func, ULM_EQ);
- return ULM_PARSE_ERROR;
+ fprintf(stderr,"%s: PARSE ERROR: '%c' at the beginning of log line.\n", func, ULM_EQ);
+ return ULM_PARSE_ERROR;
}
if (qmCnt == 0) {
- if (isblank(this->raw[i-1]) || (!edg_wll_ULMisalphaext(this->raw[i-1]))) {
- fprintf(stderr,"%s: PARSE ERROR: Disallowed character ('%c') or space before delimiter '%c'.\n",
- func,this->raw[i-1],ULM_EQ);
- return ULM_PARSE_ERROR;
+ if (isblank(this->raw[i-1]) || (!edg_wll_ULMisalphaext(this->raw[i-1]))) {
+ fprintf(stderr,"%s: PARSE ERROR: Disallowed character ('%c') or space before delimiter '%c'.\n",
+ func,this->raw[i-1],ULM_EQ);
+ return ULM_PARSE_ERROR;
}
if (isblank(this->raw[i+1]) || ((!edg_wll_ULMisalphaext(this->raw[i-1])) && (this->raw[i+1] != ULM_QM ))) {
- fprintf(stderr,"%s: PARSE ERROR: Disallowed character ('%c') or space after delimiter '%c'.\n",
- func,this->raw[i+1],ULM_EQ);
- return ULM_PARSE_ERROR;
+ fprintf(stderr,"%s: PARSE ERROR: Disallowed character ('%c') or space after delimiter '%c'.\n",
+ func,this->raw[i+1],ULM_EQ);
+ return ULM_PARSE_ERROR;
}
iArrayEQ[eqCnt] = i;
eqCnt++;
- }
+ } else if (this->raw[i-1] == ULM_BS) bsCnt = 0; // escaped ULM_EQ inside value
break;
case ULM_LF :
- if (qmCnt == 0) { this->raw[i] = '\0'; }
+ if (qmCnt == 0) {
+ this->raw[i] = '\0';
+ } else if (this->raw[i-1] == ULM_BS) bsCnt = 0; // escaped ULM_LF inside value
break;
+ case ULM_BS :
+ if (qmCnt != 0) {
+ if (this->raw[i-1] == ULM_BS) {
+ if (bsCnt == 1) bsCnt = 0; // escaped ULM_BS inside value
+ else bsCnt = 1;
+ } else bsCnt = 1;
+ } else {
+ fprintf(stderr,"%s: PARSE ERROR: Disallowed character ('%c') at i=%d size=%lu char=%d bsCnt=%d qmCnt=%d.\n",
+ func,this->raw[i],i+1,(unsigned long)size,this->raw[i],bsCnt,qmCnt);
+ for (j=0; j<=i; j++) fputc(this->raw[j],stderr);
+ fputc(ULM_LF,stderr);
+ return ULM_PARSE_ERROR;
+ }
+ break;
case ULM_QM :
- if (this->raw[i-1] != ULM_BS) {
- if (qmCnt == 0) qmCnt++;
- else qmCnt--;
- }
+ if (qmCnt == 0) {
+ qmCnt++;
+ } else {
+ if (bsCnt == 0) qmCnt--;
+ if (this->raw[i-1] == ULM_BS) bsCnt = 0; // escaped ULM_QM inside value
+ }
if ((qmCnt == 0) && (!isspace(this->raw[i+1]) && (this->raw[i+1] != '\0'))) {
- fprintf(stderr,"%s: PARSE ERROR: Disallowed character ('%c') after ending '%c'at i=%d size=%lu char=%d.\n",
- func,this->raw[i+1],ULM_QM,i,(unsigned long)size,this->raw[i+1]);
+ fprintf(stderr,"%s: PARSE ERROR: Disallowed character ('%c') after ending '%c' at i=%d size=%lu char=%d bsCnt=%d qmCnt=%d.\n",
+ func,this->raw[i+1],ULM_QM,i+1,(unsigned long)size,this->raw[i+1],bsCnt,qmCnt);
for (j=0; j<=i; j++) fputc(this->raw[j],stderr);
fputc(ULM_LF,stderr);
return ULM_PARSE_ERROR;
}
break;
default :
+ if (this->raw[i-1] == ULM_BS) bsCnt = 0; // escaped character inside value
break;
} /* switch */
} /* for */
}
if (qmCnt != 0) {
- fprintf(stderr,"%s: PARSE ERROR: Last quoted value did not finish.\n",func);
+ fprintf(stderr,"%s: PARSE ERROR: Last quoted value did not finish (i=%d size=%lu char=%d bsCnt=%d qmCnt=%d).\n",
+ func,i+1,(unsigned long)size,this->raw[i+1],bsCnt,qmCnt);
+ return ULM_PARSE_ERROR;
+ }
+
+ if (bsCnt != 0) {
+ fprintf(stderr,"%s: PARSE ERROR: Probably an unescaped '%c' occured (i=%d size=%lu char=%d bsCnt=%d qmCnt=%d).\n",
+ func,ULM_BS,i+1,(unsigned long)size,this->raw[i+1],bsCnt,qmCnt);
return ULM_PARSE_ERROR;
}
#!/bin/sh
+# chkconfig: 345 76 24
GLITE_LOCATION=${GLITE_LOCATION:-/opt/glite}
GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-$GLITE_LOCATION/var}
1.4.9-1 (lb-1.7.3-1)
- treat zero event expiration time as "never"
-1.4.9-2 (lb-1.74-1)
+1.4.9-2 (lb-1.7.4-1)
- rebuild wrt. downgraded security 3.1.57-1
1.4.9-3 (lb-1.8.0-1)
2.0.0-4
- configure script update (globus flavors added to configure call)
+from 1.4.11-1
+- Support chconfig in startup scripts (#27055)
+- Proper kill signal handling (#36470)
DEBUG:=-g -O0 -Wall
GRIDSITE_CFLAGS = -I${gridsite_prefix}/include `xml2-config --cflags`
-GRIDSITE_LIBS = -L${gridsite_prefix}/lib -lgridsite_globus `xml2-config --libs`
+GRIDSITE_LIBS = -L${gridsite_prefix}/${archlib} -lgridsite_globus `xml2-config --libs`
LCAS_CFLAGS=-I${lcas_prefix}/include
#!/bin/sh
+# chkconfig: 345 75 25
GLITE_LOCATION=${GLITE_LOCATION:-/opt/glite}
GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-/var/glite}
--- /dev/null
+#! /bin/bash
+
+#
+# bug #29165: Times in job status history downloaded from LB are schifted
+#
+# description:
+# Test compares returned history from:
+# - official job status example (C API)
+# - WS call (gsoap)
+# - WS XML response message (gsoap)
+#
+# requirements:
+# - stage area, default `pwd`
+# - built WS LB server examples
+# - gsoap-plugin in stage built with 'make DEBUG="-DDEBUG"'
+# - running LB server, LB locallogger, and LB interlogger
+# - proxy certificate for logging and querying
+#
+
+STAGE_LOCATION=${STAGE_LOCATION:-`pwd`}
+WS_EXAMPLES_LOCATION=${WS_EXAMPLES_LOCATION:-$STAGE_LOCATION/../org.glite.lb.server/build}
+LBSERVER=${LBSERVER:-`hostname -f`:9000}
+LBLOGGER=${LBLOGGER:-`hostname -f`:9002}
+
+script=$(EDG_WL_LOG_DESTINATION=$LBLOGGER $STAGE_LOCATION/examples/glite-lb-submitted.sh -m $LBSERVER 2>log | tail -n 1)
+eval $script
+test -z "$EDG_JOBID" && exit 2
+
+echo "jobid: $EDG_JOBID"
+EDG_WL_LOG_DESTINATION=$LBLOGGER $STAGE_LOCATION/examples/glite-lb-waiting.sh -j $EDG_JOBID 2>>log|| exit 3
+sleep 1
+EDG_WL_LOG_DESTINATION=$LBLOGGER $STAGE_LOCATION/examples/glite-lb-ready.sh -j $EDG_JOBID 2>>log|| exit 4
+sleep 1
+EDG_WL_LOG_DESTINATION=$LBLOGGER $STAGE_LOCATION/examples/glite-lb-done.sh -j $EDG_JOBID 2>>log|| exit 5
+sleep 1
+EDG_WL_LOG_DESTINATION=$LBLOGGER $STAGE_LOCATION/examples/glite-lb-cleared.sh -j $EDG_JOBID 2>>log|| exit 6
+sleep 1
+rm -f log
+
+# C API
+status="`TZ=C $STAGE_LOCATION/examples/glite-lb-job_status $EDG_JOBID`"
+if test x$(echo "$status" | grep '^state[ :]' | sed -e 's/^.*:[ ]*\(.*\)/\1/') != xCleared; then
+ echo "ERROR: Expected Cleared status of $EDG_JOBID"
+ exit 7
+fi
+echo "$status" | grep '^stateEnterTimes[ :]' -A 12 > hist-c.txt
+
+# WS call result
+rm -f RECV.log SENT.log TEST.log
+TZ=C $WS_EXAMPLES_LOCATION/ws_jobstat -j $EDG_JOBID | grep stateEnterTimes -A 12 > hist-ws.txt
+diff -u hist-c.txt hist-ws.txt
+ret1=$?
+if [ "$ret1" != "0" ]; then
+ echo "FAILED: WS and C API results differs"
+fi
+
+# WS XML message
+if [ ! -s "RECV.log" ]; then
+ echo "WARNING: RECV.log not found, WS/XML not compared"
+ exit $ret1
+fi
+echo "stateEnterTimes : " > hist-ws-recv.txt
+echo " Undefined - not available -" >> hist-ws-recv.txt
+grep '^[ \t]*<' RECV.log | xmllint --format - | grep -A3 '<stateEnterTimes>' | grep '<state>\|<time\>' | tr '\n' ' ' | sed -e 's/<\/time>/<\/time>\n/g' | while read statexml timexml; do
+ state=`echo $statexml | tr '\n' ' ' | sed -e 's/.*<state>\(.*\)<\/state>.*/\1/'`
+ time=`echo $timexml | tr '\n' ' ' | sed -e 's/.*<time>\(.*\)<\/time>.*/\1/'`
+ if [ x"$time" = x"1970-01-01T00:00:00Z" ]; then
+ timetxt=" - not available -"
+ else
+ timetxt=`TZ=C perl -e 'use POSIX; $ARGV[0] =~ /^(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)Z$/; print ctime(mktime($6, $5, $4, $3, $2 - 1, $1 - 1900, 0, 0, 0));' $time`
+ fi
+ printf "%14s " $state; printf "$timetxt\n";
+done >> hist-ws-recv.txt
+diff -iu hist-c.txt hist-ws-recv.txt
+ret2=$?
+if [ "$ret2" != "0" ]; then
+ echo "FAILED: XML and C API results differs"
+fi
+
+if [ x"$ret1" = x"0" -a x"$ret2" = x"0" ]; then
+ echo "PASSED"
+ exit 0
+else
+ exit 1
+fi
+#ident "$Header$"
+
#ifndef GLITE_LB_STORE_H
#define GLITE_LB_STORE_H
-#ident "$Header$"
-
#include "jobstat.h"
#include "lb_authz.h"
edg_wll_ErrorCode intJobStat_embryonic(edg_wll_Context ctx, glite_jobid_const_t jobid, const edg_wll_RegJobEvent *e, intJobStat *stat);
-
int edg_wll_delete_event(edg_wll_Context,const char *, int);
- fixed credential setting via gsoap-plugin (switching to a newly introduced API call)
- minor initialization/freeing fixes
- printout typo fix
-
+
+from 1.9.2-1
+- Support for chconfig in startup scripts (#27055)
+- Support for JP importer in startup scripts
+- Support for variant DN certificates (workaround for #41820)
+- Recalculate subjob states after DB version upgrade (#25871)
+- Ignore reseource_usage events when computing job states (#43767)
+- Fix sequence code processing for Change ACL events
+- Reflect job conditions while processing queries for events (#32390)
+- WS example fix
+
+#ident "$Header$"
+
#ifndef GLITE_LB_LBS_JOBSTAT_H
#define GLITE_LB_LBS_JOBSTAT_H
-#ident "$Header$"
-
#include "glite/lb/jobstat.h"
#include "glite/lb/intjobstat.h"
#include "glite/lbu/db.h"
for (f = fqans; f && *f; f++)
if (strcmp(*f, super_users[i]+5) == 0) return 1;
} else
- if (strcmp(subj,super_users[i]) == 0) return 1;
+ if (edg_wll_gss_equal_subj(subj,super_users[i])) return 1;
return 0;
}
free(XMLCtx.job_conditions);
}
free(XMLCtx.notifFunction);
- edg_wll_NotifIdFree(&XMLCtx.notifId);
+ edg_wll_NotifIdFree(XMLCtx.notifId);
free(XMLCtx.notifClientAddress);
*function = NULL;
my %fmap = ( children_hist=>'count', stateEnterTimes=>'time');
gen qq {
! if (src->__size$usuc) {
-! dest->$_ = calloc(EDG_WLL_NUMBER_OF_STATCODES+1, sizeof *dest->$_);
-! dest->$_\[0] = src->__size$usuc;
+! dest->$_ = calloc(src->__size$usuc + 1, sizeof *dest->$_);
+! dest->$_\[0] = src->__size$usuc + 2;
! for (i=0; i<src->__size$usuc; i++) {
! edg_wll_JobStatCode s;
! edg_wll_SoapToJobStatCode(GLITE_SECURITY_GSOAP_LIST_GET(src->$usuc, i)->state,&s);
SRC_INSTANCE (nil)
select name,value from long_fields where jobid = 'WrCEKje9QTXFiSOZuPMLtw' and event = 1
+
+SELECT DISTINCT j.dg_jobid,j.userid FROM jobs j WHERE (j.jobid='WrCEKje9QTXFiSOZuPMLtw')
+https://lhun.ics.muni.cz:4850/WrCEKje9QTXFiSOZuPMLtw 294de3557d9d00b3d2d8a1e6aab028cf
+
+SELECT e.event,j.userid,j.dg_jobid,e.code,e.prog,e.host,u.cert_subj,e.time_stamp,e.usec,e.level,e.arrived FROM events e,users u,jobs j WHERE j.dg_jobid = 'https://lhun.ics.muni.cz:4850/WrCEKje9QTXFiSOZuPMLtw' AND e.jobid=j.jobid AND e.userid=u.userid AND e.code != 0
+0 294de3557d9d00b3d2d8a1e6aab028cf https://lhun.ics.muni.cz:4850/WrCEKje9QTXFiSOZuPMLtw 17 UserInterface lhun.ics.muni.cz anonymous 2003-08-07 11:08:40 432100 8 2003-08-07 11:08:40
+1 294de3557d9d00b3d2d8a1e6aab028cf https://lhun.ics.muni.cz:4850/WrCEKje9QTXFiSOZuPMLtw 2 NetworkServer lhun.ics.muni.cz anonymous 2003-08-07 11:09:05 664600 8 2003-08-07 11:09:05
+
int flags,
edg_wll_JobStat *stat)
{
+ edg_wlc_JobIdDup(job,&stat->jobId);
return 0;
}
case EDG_WLL_EVENT_CHKPT:
/* these three event are probably dead relics */
case EDG_WLL_EVENT_RESOURCEUSAGE:
- /* ignore too - not used? */
+ /* ignore, not reflected in job status */
break;
case EDG_WLL_EVENT_CHANGEACL:
/* ignore, only for event log */