This commit was manufactured by cvs2svn to create tag 'merge_313_dst'. merge_313_dst
authorcvs2svn <admin@example.com>
Thu, 24 May 2007 15:57:13 +0000 (15:57 +0000)
committercvs2svn <admin@example.com>
Thu, 24 May 2007 15:57:13 +0000 (15:57 +0000)
Sprout from branch_RC31_3 2007-03-29 15:49:15 UTC cvs2svn <admin@example.com> 'This commit was manufactured by cvs2svn to create branch 'branch_RC31_3'.'
Cherrypick from master 2007-05-24 15:57:12 UTC Miloš Mulač <mulac@civ.zcu.cz> 'enable queries on non-indexed attributes (under option --no-Index)':
    org.glite.lb.client/examples/job_reg.c
    org.glite.lb.client/src/export.sh
    org.glite.lb.client/src/producer.c
    org.glite.lb.common/Makefile
    org.glite.lb.common/src/context.c
    org.glite.lb.server-bones/src/srvbones.c
    org.glite.lb.server/Makefile
    org.glite.lb.server/examples/ws_joblog.c
    org.glite.lb.server/interface/lbs_db.h
    org.glite.lb.server/src/bkserverd.c
    org.glite.lb.server/src/jobstat.c
    org.glite.lb.server/src/lbs_db.c
    org.glite.lb.server/src/query.c
    org.glite.lb.server/src/srv_purge.c
    org.glite.lb.server/src/userjobs.c
    org.glite.lb.server/src/ws_fault.c
    org.glite.lb.server/src/ws_query.c
    org.glite.lb.server/src/ws_typemap.h
    org.glite.lb.server/src/ws_typeref.c.T
    org.glite.lb.server/src/ws_typeref.h
    org.glite.lb/deployment/deploy_all.diff
    org.glite.lb/project/build.properties
    org.glite.lb/project/dependencies.properties

23 files changed:
org.glite.lb.client/examples/job_reg.c
org.glite.lb.client/src/export.sh
org.glite.lb.client/src/producer.c
org.glite.lb.common/Makefile
org.glite.lb.common/src/context.c
org.glite.lb.server-bones/src/srvbones.c
org.glite.lb.server/Makefile
org.glite.lb.server/examples/ws_joblog.c
org.glite.lb.server/interface/lbs_db.h
org.glite.lb.server/src/bkserverd.c
org.glite.lb.server/src/jobstat.c
org.glite.lb.server/src/lbs_db.c
org.glite.lb.server/src/query.c
org.glite.lb.server/src/srv_purge.c
org.glite.lb.server/src/userjobs.c
org.glite.lb.server/src/ws_fault.c
org.glite.lb.server/src/ws_query.c
org.glite.lb.server/src/ws_typemap.h
org.glite.lb.server/src/ws_typeref.c.T
org.glite.lb.server/src/ws_typeref.h
org.glite.lb/deployment/deploy_all.diff
org.glite.lb/project/build.properties
org.glite.lb/project/dependencies.properties

index b9300eb..f8dd497 100644 (file)
@@ -14,7 +14,7 @@ extern int opterr,optind;
 
 static void usage(char *me)
 {
-       fprintf(stderr,"usage: %s [-m bkserver] [-x] [-j dg_jobid] [-s source_id] [-n num_subjobs [-S][-C]] [-l jdl_file] [-e seed]\n", me);
+       fprintf(stderr,"usage: %s [-m bkserver] [-x] [-j dg_jobid] [-s source_id] [-n num_subjobs [-S][-C]] [-P] [-l jdl_file] [-e seed]\n", me);
 }
 
 int main(int argc, char *argv[])
@@ -36,8 +36,8 @@ int main(int argc, char *argv[])
                        case 'j': job = (char *) strdup(optarg); break;
                        case 'm': server = strdup(optarg); break;
                        case 'n': num_subjobs = atoi(optarg); break;
-                       case 'S': if (num_subjobs>0) { reg_subjobs = 1; break; }
-                       case 'C': if (num_subjobs>0) { collection = 1; break; }
+                       case 'S': reg_subjobs = 1; break;
+                       case 'C': collection = 1; break;
                        case 'P': pbs = 1; break;
                        case 'l': jdl = (char *) strdup(optarg); break;
                        case 'e': seed = strdup(optarg); break;
@@ -46,6 +46,11 @@ int main(int argc, char *argv[])
                }
        } while (!done);
 
+       if ((num_subjobs <= 0) && (reg_subjobs || collection) ) {
+               usage(argv[0]);
+               exit(EINVAL);
+       }       
+
        if (!job && !server) {
                fprintf(stderr,"%s: either -m server or -j jobid has to be specified\n",argv[0]);
                exit(1);
index eda817c..97e69c7 100644 (file)
@@ -43,6 +43,8 @@ GLITE_LB_EXPORT_PURGE_ARGS=${GLITE_LB_EXPORT_PURGE_ARGS:---cleared 2d --aborted
 # Book Keeping Server
 GLITE_LB_SERVER_PORT=${GLITE_LB_SERVER_PORT:-9000}
 GLITE_LB_EXPORT_BKSERVER=${GLITE_LB_EXPORT_BKSERVER:-localhost:$GLITE_LB_SERVER_PORT}
+GLITE_LB_PURGE_ENABLED=${GLITE_LB_PURGE_ENABLED:true}
+GLITE_LB_EXPORT_ENABLED=$GLITE_LB_EXPORT_ENABLED:true}
 
 [ -d $GLITE_LB_EXPORT_JPDUMP_MAILDIR ] || mkdir -p $GLITE_LB_EXPORT_JPDUMP_MAILDIR
 [ -d $GLITE_LB_EXPORT_DUMPDIR ] || mkdir -p $GLITE_LB_EXPORT_DUMPDIR
@@ -51,24 +53,27 @@ GLITE_LB_EXPORT_BKSERVER=${GLITE_LB_EXPORT_BKSERVER:-localhost:$GLITE_LB_SERVER_
 [ -d $GLITE_LB_EXPORT_PURGEDIR_KEEP ] || mkdir -p $GLITE_LB_EXPORT_PURGEDIR_KEEP
 [ -d $GLITE_LB_EXPORT_JOBSDIR ] || mkdir -p $GLITE_LB_EXPORT_JOBSDIR
 
-X509_USER_CERT="$X509_USER_CERT" X509_USER_KEY="$X509_USER_KEY" $PREFIX/sbin/glite-lb-purge $GLITE_LB_EXPORT_PURGE_ARGS -l -m $GLITE_LB_EXPORT_BKSERVER
+if [ x"$GLITE_LB_PURGE_ENABLED" = x"true" ]; then
+       X509_USER_CERT="$X509_USER_CERT" X509_USER_KEY="$X509_USER_KEY" $PREFIX/sbin/glite-lb-purge $GLITE_LB_EXPORT_PURGE_ARGS -l -m $GLITE_LB_EXPORT_BKSERVER -s
+fi
 
-for file in $GLITE_LB_EXPORT_PURGEDIR/*; do
-  if [ -s $file ]; then
-    $PREFIX/sbin/glite-lb-lb_dump_exporter -d $file -s $GLITE_LB_EXPORT_JOBSDIR -m $GLITE_LB_EXPORT_JPDUMP_MAILDIR
-    if [ -n "$GLITE_LB_EXPORT_PURGEDIR_KEEP" ]; then
-      mv $file $GLITE_LB_EXPORT_PURGEDIR_KEEP
+if [ x"$GLITE_LB_EXPORT_ENABLED" = x"true" ]; then
+  for file in $GLITE_LB_EXPORT_PURGEDIR/*; do
+    if [ -s $file ]; then
+      $PREFIX/sbin/glite-lb-lb_dump_exporter -d $file -s $GLITE_LB_EXPORT_JOBSDIR -m $GLITE_LB_EXPORT_JPDUMP_MAILDIR
+      if [ -n "$GLITE_LB_EXPORT_PURGEDIR_KEEP" ]; then
+        mv $file $GLITE_LB_EXPORT_PURGEDIR_KEEP
+      else
+        rm $file
+      fi
     else
       rm $file
     fi
+  done
+
+  if [ -n "$GLITE_LB_EXPORT_DUMPDIR_KEEP" ]; then
+    ls $GLITE_LB_EXPORT_DUMPDIR | xargs  -i'{}' cp $GLITE_LB_EXPORT_DUMPDIR/'{}' $GLITE_LB_EXPORT_DUMPDIR_KEEP;
   else
-    rm $file
+    ls $GLITE_LB_EXPORT_DUMPDIR | xargs -i'{}' rm -f $GLITE_LB_EXPORT_DUMPDIR/'{}'
   fi
-done
-
-if [ -n "$GLITE_LB_EXPORT_DUMPDIR_KEEP" ]; then
-  ls $GLITE_LB_EXPORT_DUMPDIR | xargs  -i'{}' cp $GLITE_LB_EXPORT_DUMPDIR/'{}' $GLITE_LB_EXPORT_DUMPDIR_KEEP;
-else
-  ls $GLITE_LB_EXPORT_DUMPDIR | xargs -i'{}' rm -f $GLITE_LB_EXPORT_DUMPDIR/'{}'
 fi
-
index a06a7ba..a0b4b62 100644 (file)
@@ -756,11 +756,11 @@ static int edg_wll_RegisterJobMaster(
         const char *            seed,
         edg_wlc_JobId **        subjobs)
 {
-       char    *seq,*type_s,*intseed,*parent_s;
+       char    *seq,*type_s,*parent_s;
        int     err = 0;
        struct timeval sync_to;
 
-       seq = type_s = intseed = parent_s = NULL;
+       seq = type_s = parent_s = NULL;
 
        edg_wll_ResetError(ctx);
        memcpy(&sync_to, &ctx->p_sync_timeout, sizeof sync_to);
@@ -774,8 +774,8 @@ static int edg_wll_RegisterJobMaster(
             type == EDG_WLL_REGJOB_PARTITIONED ||
             type == EDG_WLL_REGJOB_COLLECTION)
                && num_subjobs > 0) {
+               err = edg_wll_GenerateSubjobIds(ctx,job,num_subjobs,seed,subjobs);
                edg_wll_SetSequenceCode(ctx, NULL, EDG_WLL_SEQ_NORMAL);
-               err = edg_wll_GenerateSubjobIds(ctx,job,num_subjobs,intseed,subjobs);
                /* increase log timeout on client (the same as on BK server) */
                ctx->p_sync_timeout.tv_sec += num_subjobs;
                if (ctx->p_sync_timeout.tv_sec > 86400) ctx->p_sync_timeout.tv_sec = 86400;
@@ -789,11 +789,9 @@ static int edg_wll_RegisterJobMaster(
        if (flags & LOGFLAG_DIRECT) {
                /* SetLoggingJob and log directly the message */
                if (edg_wll_SetLoggingJob(ctx,job,NULL,EDG_WLL_SEQ_NORMAL) == 0) {
-                       intseed = seed ? strdup(seed) : 
-                               str2md5base64(seq = edg_wll_GetSequenceCode(ctx));
                        edg_wll_LogEventMaster(ctx,LOGFLAG_DIRECT | LOGFLAG_SYNC,
                                EDG_WLL_EVENT_REGJOB,EDG_WLL_FORMAT_REGJOB,
-                               (char *)jdl,ns,parent_s,type_s,num_subjobs,intseed);
+                               (char *)jdl,ns,parent_s,type_s,num_subjobs,seed);
                }
        } else if (flags & LOGFLAG_PROXY) {
                /* SetLoggingJobProxy and and log to proxy */
@@ -801,20 +799,16 @@ static int edg_wll_RegisterJobMaster(
                if (seq) free(seq);
                seq = edg_wll_GetSequenceCode(ctx);
                if (edg_wll_SetLoggingJobProxy(ctx,job,seq,NULL,EDG_WLL_SEQ_NORMAL) == 0) {
-                       intseed = seed ? strdup(seed) : 
-                               str2md5base64(seq = edg_wll_GetSequenceCode(ctx));
                        edg_wll_LogEventMaster(ctx,LOGFLAG_PROXY | LOGFLAG_SYNC,
                                EDG_WLL_EVENT_REGJOB,EDG_WLL_FORMAT_REGJOB,
-                               (char *)jdl,ns,parent_s,type_s,num_subjobs,intseed);
+                               (char *)jdl,ns,parent_s,type_s,num_subjobs,seed);
                }
        } else if (flags & LOGFLAG_NORMAL) {
                /* SetLoggingJob and log normally the message through the local-logger */
                if (edg_wll_SetLoggingJob(ctx,job,NULL,EDG_WLL_SEQ_NORMAL) == 0) {
-                       intseed = seed ? strdup(seed) : 
-                               str2md5base64(seq = edg_wll_GetSequenceCode(ctx));
                        edg_wll_LogEventMaster(ctx, LOGFLAG_NORMAL,
                                EDG_WLL_EVENT_REGJOB,EDG_WLL_FORMAT_REGJOB,
-                               (char *)jdl,ns,parent_s,type_s,num_subjobs,intseed);
+                               (char *)jdl,ns,parent_s,type_s,num_subjobs,seed);
                }
        } else {
                edg_wll_SetError(ctx,EINVAL,"edg_wll_RegisterJobMaster(): wrong flag specified");
@@ -824,7 +818,6 @@ edg_wll_registerjobmaster_end:
        memcpy(&ctx->p_sync_timeout, &sync_to, sizeof sync_to);
        if (seq) free(seq);
        if (type_s) free(type_s); 
-       if (intseed) free(intseed); 
        if (parent_s) free(parent_s);
        return edg_wll_Error(ctx,NULL,NULL);
 }
@@ -886,7 +879,6 @@ int edg_wll_RegisterJobProxy(
         const char *            seed,
         edg_wlc_JobId **        subjobs)
 {
-#define        MY_SEED "edg_wll_RegisterJobProxy()"
        char    *seq,*type_s;
        edg_wll_LogLine logline = NULL;
        int     ret = 0,n,count,fd;
@@ -914,7 +906,7 @@ int edg_wll_RegisterJobProxy(
             type == EDG_WLL_REGJOB_COLLECTION)
                && num_subjobs > 0) {
                edg_wll_SetSequenceCode(ctx, NULL, EDG_WLL_SEQ_NORMAL);
-               ret = edg_wll_GenerateSubjobIds(ctx,job,num_subjobs,seed ? seed : MY_SEED,subjobs);
+               ret = edg_wll_GenerateSubjobIds(ctx,job,num_subjobs,seed,subjobs);
                /* increase log timeout on client (the same as on BK server) */
                ctx->p_sync_timeout.tv_sec += num_subjobs;
                if (ctx->p_sync_timeout.tv_sec > 86400) ctx->p_sync_timeout.tv_sec = 86400;
@@ -935,7 +927,7 @@ int edg_wll_RegisterJobProxy(
        /* format the RegJob event message */
        if (edg_wll_FormatLogLine(ctx,LOGFLAG_SYNC | LOGFLAG_PROXY | LOGFLAG_PROXY,
                EDG_WLL_EVENT_REGJOB,&logline,
-               EDG_WLL_FORMAT_REGJOB,(char *)jdl,ns,"",type_s,num_subjobs,seed ? seed : MY_SEED) != 0 ) {
+               EDG_WLL_FORMAT_REGJOB,(char *)jdl,ns,"",type_s,num_subjobs,seed) != 0 ) {
                edg_wll_UpdateError(ctx,EINVAL,"edg_wll_RegisterJobProxy(): edg_wll_FormatLogLine() error");
                goto edg_wll_registerjobproxy_end; 
        }       
@@ -1029,7 +1021,6 @@ edg_wll_registerjobproxy_end:
        if (logline) free(logline);
 
        return edg_wll_Error(ctx,NULL,NULL);
-#undef MY_SEED
 }
 
 /**
@@ -1049,16 +1040,14 @@ int edg_wll_RegisterJobProxyOld(
         const char *            seed,
         edg_wlc_JobId **        subjobs)
 {
-#define        MY_SEED "edg_wll_RegisterJobProxyOld()"
        /* first register with bkserver */
-       int ret = edg_wll_RegisterJobMaster(ctx,LOGFLAG_DIRECT,job,type,jdl,ns,NULL,num_subjobs,seed ? seed : MY_SEED,subjobs);
+       int ret = edg_wll_RegisterJobMaster(ctx,LOGFLAG_DIRECT,job,type,jdl,ns,NULL,num_subjobs,seed,subjobs);
        if (ret) {
                edg_wll_UpdateError(ctx,0,"edg_wll_RegisterJobProxyOld(): unable to register with bkserver");
                return edg_wll_Error(ctx,NULL,NULL);
        }
        /* and then with L&B Proxy */
-       return edg_wll_RegisterJobMaster(ctx,LOGFLAG_PROXY,job,type,jdl,ns,NULL,num_subjobs,seed ? seed : MY_SEED,subjobs);
-#undef MY_SEED
+       return edg_wll_RegisterJobMaster(ctx,LOGFLAG_PROXY,job,type,jdl,ns,NULL,num_subjobs,seed,subjobs);
 }
 
 #else /* LB_SERIAL_REG */
@@ -1080,16 +1069,14 @@ int edg_wll_RegisterJobProxy(
         const char *            seed,
         edg_wlc_JobId **        subjobs)
 {
-#define        MY_SEED "edg_wll_RegisterJobProxy()"
        /* first register with bkserver */
-       int ret = edg_wll_RegisterJobMaster(ctx,LOGFLAG_DIRECT,job,type,jdl,ns,NULL,num_subjobs,seed ? seed : MY_SEED,subjobs);
+       int ret = edg_wll_RegisterJobMaster(ctx,LOGFLAG_DIRECT,job,type,jdl,ns,NULL,num_subjobs,seed,subjobs);
        if (ret) {
                edg_wll_UpdateError(ctx,0,"edg_wll_RegisterJobProxy(): unable to register with bkserver");
                return edg_wll_Error(ctx,NULL,NULL);
        }
        /* and then with L&B Proxy */
-       return edg_wll_RegisterJobMaster(ctx,LOGFLAG_PROXY,job,type,jdl,ns,NULL,num_subjobs,seed ? seed : MY_SEED,subjobs);
-#undef MY_SEED
+       return edg_wll_RegisterJobMaster(ctx,LOGFLAG_PROXY,job,type,jdl,ns,NULL,num_subjobs,seed,subjobs);
 }
 
 #endif /* LB_SERIAL_REG */
@@ -1114,9 +1101,7 @@ int edg_wll_RegisterJobProxyOnly(
         const char *            seed,
         edg_wlc_JobId **        subjobs)
 {
-#define        MY_SEED "edg_wll_RegisterJobProxyOnly()"
-       return edg_wll_RegisterJobMaster(ctx,LOGFLAG_PROXY,job,type,jdl,ns,NULL,num_subjobs,seed ? seed : MY_SEED,subjobs);
-#undef MY_SEED
+       return edg_wll_RegisterJobMaster(ctx,LOGFLAG_PROXY,job,type,jdl,ns,NULL,num_subjobs,seed,subjobs);
 }
 
 #endif /* LB_SERIAL_REG */
index c20a7b3..4f050e9 100644 (file)
@@ -182,8 +182,7 @@ mkreports:
 check.parse: test_parse
        ./test_parse ${REPORTS}/parse.xml
 
-test_parse: parse.cpp
-       ${CXX} -c ${CFLAGS} ${TEST_INC} $<
+test_parse: parse.o
        ${LINKXX} -o test_parse parse.o ${LTLIB} ${TEST_LIBS} ${EXT_LIBS}
 
 check.il: il_test
@@ -243,7 +242,7 @@ clean:
 %.o: %.c
        ${COMPILE} ${GLOBUSINC} ${CFLAGS} -c $<
 
-il_int_test.o il_string_test.o il_test.o il_msg_test.o: %.o: %.cpp
+il_int_test.o il_string_test.o il_test.o il_msg_test.o parse.o: %.o: %.cpp
        ${CXX} -c ${CFLAGS} ${TEST_INC} $<
 
 %.thr.o: %.c
index 4ce4365..3f5e0a5 100644 (file)
@@ -449,10 +449,6 @@ int edg_wll_GenerateSubjobIds(
        if (num_subjobs < 1)
                return edg_wll_SetError(ctx, EINVAL,
                                "edg_wll_GenerateSubjobIds(): num_subjobs < 1");
-       if (seed == NULL)
-               intseed = edg_wll_GetSequenceCode(ctx);
-       else
-               intseed = strdup(seed);
 
        p_unique = edg_wlc_JobIdGetUnique(parent);
        edg_wlc_JobIdGetServerParts(parent, &p_bkserver, &p_port);
@@ -460,11 +456,16 @@ int edg_wll_GenerateSubjobIds(
        retjobs = calloc(num_subjobs+1, sizeof(edg_wlc_JobId));
 
        if (p_unique == NULL ||
-               intseed == NULL ||
                p_bkserver == NULL ||
                retjobs == NULL)
                return edg_wll_SetError(ctx, ENOMEM, NULL);
 
+       if ( !seed || !strcmp(seed, "(nil)") ) {
+               intseed = strdup("edg_wll_GenerateSubjobIds()");
+       }
+       else
+               intseed = strdup(seed);
+
        for (subjob = 0; subjob < num_subjobs; subjob++) {
 
                asprintf(&unhashed, "%s,%s,%d", p_unique, intseed, subjob);
index b41312c..1d42a3f 100644 (file)
@@ -570,6 +570,7 @@ static int do_sendmsg(int to_sock, int sock, unsigned long clnt_dispatched, int
        char                            sendbuf[MSG_BUFSIZ];                    /* to store unsigned int + \0 */
 
 
+       memset(sendbuf, 0, sizeof(sendbuf));
        snprintf(sendbuf, sizeof(sendbuf), "%u %lu", srv, clnt_dispatched);
 
        msg.msg_name = NULL;
index e514603..4ba51ff 100644 (file)
@@ -376,9 +376,9 @@ install:
                mkdir -p ${PREFIX}/include/${globalprefix}/${lbprefix} ; \
                (cd ${top_srcdir}/interface && install -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${lbprefix}) ; \
                install -m 644 ${STATIC_LIB_BK} ${PREFIX}/lib; \
+               ${INSTALL} -m 644 jp_job_attrs.h ${PREFIX}/include/${globalprefix}/${lbprefix} ; \
                if [ x${LB_STANDALONE} = x -a x${PLUGIN_LIB} != x ]; then \
                        ${INSTALL} -m 755 ${PLUGIN_LIB} ${PREFIX}/lib; \
-                       ${INSTALL} -m 644 jp_job_attrs.h ${PREFIX}/include/${globalprefix}/${lbprefix} ; \
                fi; \
                ${INSTALL} -m 644 ${top_srcdir}/interface/srv_perf.h ${PREFIX}/include/${globalprefix}/${lbprefix}; \
        fi
index a3bff54..a369178 100644 (file)
@@ -112,9 +112,14 @@ int main(int argc,char** argv)
        memset(&in, 0, sizeof in);
        memset(&out, 0, sizeof out);
 
+       soap_begin(mydlo);
        if (edg_wll_QueryCondsExtToSoap(mydlo, (const edg_wll_QueryRec **)jconds,
                        &in.__sizejobConditions, &in.jobConditions) != SOAP_OK) {
                printf("Error converting QueryConds to Soap!\n");
+               soap_end(mydlo);
+               soap_done(mydlo);
+               glite_gsplugin_free_context(gsplugin_ctx);
+               edg_wll_FreeContext(ctx);
                return(1);
        }
 
@@ -162,7 +167,10 @@ int main(int argc,char** argv)
                edg_wll_FaultToErr(mydlo,ctx);
                edg_wll_Error(ctx,&et,&ed);
                fprintf(stderr,"%s: %s (%s)\n",argv[0],et,ed);
-               soap_done(mydlo);
+               soap_end(mydlo);
+               soap_done(mydlo); free(mydlo);
+               glite_gsplugin_free_context(gsplugin_ctx);
+               edg_wll_FreeContext(ctx);
                exit(1);
                }
        default:
index 38c49f6..2fbdc0f 100644 (file)
@@ -15,6 +15,7 @@ extern "C" {
 #define EDG_WLL_MYSQL_VERSION          40001
 #define BUF_INSERT_ROW_ALLOC_BLOCK     1000
 
+#define DEFAULTCS      "lbserver/@localhost:lbserver20"
 
 typedef struct _edg_wll_Stmt *edg_wll_Stmt;
 
index 48a3f96..c50d946 100644 (file)
@@ -574,6 +574,7 @@ a.sin_addr.s_addr = INADDR_ANY;
 #endif /* GLITE_LB_SERVER_WITH_WS */
 
        if (!dbstring) dbstring = getenv("LBDB");
+       if (!dbstring) dbstring = strdup(DEFAULTCS);
 
        /* Just check the database and let it be. The slaves do the job. */
        edg_wll_InitContext(&ctx);
index 052bb62..2e74c9b 100644 (file)
@@ -710,10 +710,10 @@ static char* hist_to_string(int * hist)
 
 
        assert(hist[0] == EDG_WLL_NUMBER_OF_STATCODES);
-       asprintf(&s, "%s=%d", edg_wll_StatToString(1), hist[1]);
+       asprintf(&s, "%s=%d", edg_wll_StatToString(1), hist[2]);
 
-       for (i=1; i<hist[0] ; i++) {
-               asprintf(&s1, "%s, %s=%d", s, edg_wll_StatToString(i), hist[i]);
+       for (i=2; i<hist[0] ; i++) {
+               asprintf(&s1, "%s, %s=%d", s, edg_wll_StatToString(i), hist[i+1]);
                free(s); s=s1; s1=NULL;
        }
 
@@ -819,6 +819,32 @@ static edg_wll_ErrorCode update_parent_status(edg_wll_Context ctx, edg_wll_JobSt
        // XXX: if load_parent_intJobStat occure (and survives in future) in each subcase
        //      load parent status at the beginning of this function
 
+       /* Decrement histogram for interesting states
+        */
+       switch (old_state) {
+               case EDG_WLL_JOB_RUNNING:
+                       if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
+                       pis->pub.children_hist[old_state+1]--;
+                       update_hist = 1;
+                       break;
+               case EDG_WLL_JOB_DONE:
+                       if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
+                       pis->pub.children_hist[old_state+1]--;
+                       pis->children_done_hist[old_done_code]--;
+                       update_hist = 1;
+                       break;
+               case EDG_WLL_JOB_CLEARED:
+                       if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
+                       pis->pub.children_hist[old_state+1]--;
+                       update_hist = 1;
+                       break;
+               default:
+                       if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
+                       pis->pub.children_hist[EDG_WLL_JOB_UNKNOWN+1]--;
+                       // update_hist = 1; - triggered by the previous case or not needed
+                       break;
+       }
+
        /* Increment histogram for interesting states and 
         * cook artificial events to enable parent job state shift 
         */
@@ -845,9 +871,22 @@ static edg_wll_ErrorCode update_parent_status(edg_wll_Context ctx, edg_wll_JobSt
                                if (pis->pub.children_hist[cis->pub.state+1] == pis->pub.children_num) {
                                        /* not DONE yet? */
                                        if (pis->pub.state < EDG_WLL_JOB_DONE) {
-                                               if (log_collectionState_event(ctx, cis->pub.state, 
-                                                               cis->pub.done_code, cis, pis, ce))
-                                                       goto err;
+                                               if (pis->children_done_hist[EDG_WLL_STAT_FAILED]) {
+                                                       if (log_collectionState_event(ctx, cis->pub.state, 
+                                                                       EDG_WLL_STAT_FAILED, cis, pis, ce))
+                                                               goto err;
+                                               }
+                                               /* XXX: is this meaningful semantics?
+                                               else if (pis->children_done_hist[EDG_WLL_STAT_CANCELLED]) {
+                                                       if (log_collectionState_event(ctx, cis->pub.state, 
+                                                                       EDG_WLL_STAT_CANCELLED, cis, pis, ce))
+                                                               goto err;
+                                               }
+                                               */
+                                               else 
+                                                       if (log_collectionState_event(ctx, cis->pub.state, 
+                                                                       EDG_WLL_STAT_OK, cis, pis, ce))
+                                                               goto err;
                                        }
                                }
                        }
@@ -862,7 +901,7 @@ static edg_wll_ErrorCode update_parent_status(edg_wll_Context ctx, edg_wll_JobSt
                                        /* not CLEARED yet? */
                                        if (pis->pub.state < EDG_WLL_JOB_CLEARED) {
                                                if (log_collectionState_event(ctx, cis->pub.state, 
-                                                               cis->pub.done_code, cis, pis, ce))
+                                                               0, cis, pis, ce))
                                                        goto err;
                                        }
                                }
@@ -876,33 +915,6 @@ static edg_wll_ErrorCode update_parent_status(edg_wll_Context ctx, edg_wll_JobSt
                        break;
        }
        
-
-       /* Decrement histogram for interesting states
-        */
-       switch (old_state) {
-               case EDG_WLL_JOB_RUNNING:
-                       if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
-                       pis->pub.children_hist[old_state+1]--;
-                       update_hist = 1;
-                       break;
-               case EDG_WLL_JOB_DONE:
-                       if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
-                       pis->pub.children_hist[old_state+1]--;
-                       pis->children_done_hist[old_done_code]--;
-                       update_hist = 1;
-                       break;
-               case EDG_WLL_JOB_CLEARED:
-                       if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
-                       pis->pub.children_hist[old_state+1]--;
-                       update_hist = 1;
-                       break;
-               default:
-                       if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
-                       pis->pub.children_hist[EDG_WLL_JOB_UNKNOWN+1]--;
-                       // update_hist = 1; - triggered by the previous case or not needed
-                       break;
-       }
-
        if (update_hist) 
                edg_wll_StoreSubjobHistogram(ctx, cis->pub.parent_job, pis);
 
index 80b6b33..a10bd56 100644 (file)
@@ -17,8 +17,6 @@
 #include "glite/lb/context-int.h"
 #include "glite/lb/trio.h"
 
-#define DEFAULTCS      "lbserver/@localhost:lbserver20"
-
 #define my_err() edg_wll_SetError(ctx,EDG_WLL_ERROR_DB_CALL,mysql_error((MYSQL *) ctx->mysql))
 
 struct _edg_wll_Stmt {
index 7cbcc6e..802e945 100644 (file)
@@ -7,12 +7,15 @@
 #include <time.h>
 #include <assert.h>
 
+#include <expat.h>
+
 #include "glite/wmsutils/jobid/strmd5.h"
 
 #include "glite/lb/consumer.h"
 #include "glite/lb/producer.h"
 #include "glite/lb/context-int.h"
 #include "glite/lb/trio.h"
+#include "glite/lb/xml_conversions.h"
 
 
 #include "get_events.h"
@@ -24,6 +27,7 @@
 #define FL_SEL_STATUS          1
 #define FL_SEL_TAGS                    (1<<1)
 #define FL_SEL_JOB                     (1<<2)
+#define FL_FILTER                      (1<<3)  // DB query result needs further filtering
 
 
 static int check_event_query_index(edg_wll_Context,const edg_wll_QueryRec **,const edg_wll_QueryRec **);
@@ -58,7 +62,8 @@ int edg_wll_QueryEventsServer(
                                        ret = 0,
                                        offset = 0, limit = 0,
                                        limit_loop = 1,
-                                       eperm = 0;
+                                       eperm = 0,
+                                       where_flags = 0;
 
 
        edg_wll_ResetError(ctx);
@@ -80,11 +85,11 @@ int edg_wll_QueryEventsServer(
        if (event_conditions && *event_conditions && (*event_conditions)->attr &&
                !(event_where = ec_to_head_where(ctx,event_conditions)) &&
                edg_wll_Error(ctx,NULL,NULL) != 0)
-               goto cleanup;
+               if (!ctx->noIndex) goto cleanup;
 
        if ( job_conditions && *job_conditions && (*job_conditions)->attr &&
-               !(job_where = jc_to_head_where(ctx, job_conditions, &i)) )
-               goto cleanup;
+               !(job_where = jc_to_head_where(ctx, job_conditions, &where_flags)) )
+               if (!ctx->noIndex) goto cleanup;
 
 /* XXX: similar query in srv_purge.c ! They has to match due to common
  * convert_event_head() called on the result
@@ -94,13 +99,13 @@ int edg_wll_QueryEventsServer(
                "FROM events e,users u,jobs j%s "
                "WHERE %se.jobid=j.jobid AND e.userid=u.userid AND e.code != %d "
                "%s %s %s %s",
-               i & FL_SEL_STATUS                       ? ",states s"                           : "",
-               i & FL_SEL_STATUS                       ? "s.jobid=j.jobid AND "        : "",
+               where_flags & FL_SEL_STATUS ? ",states s"       : "",
+               where_flags & FL_SEL_STATUS ? "s.jobid=j.jobid AND " : "",
                EDG_WLL_EVENT_UNDEF,
-               job_where                                       ? "AND"                                         : "",
-               job_where                                       ? job_where                                     : "",
-               event_where                                     ? "AND"                                         : "",
-               event_where                                     ? event_where                           : "");
+               job_where ? "AND" : "",
+               job_where ? job_where : "",
+               event_where ? "AND" : "",
+               event_where ? event_where : "");
 
        if ( ctx->softLimit )
        {
@@ -146,6 +151,7 @@ int edg_wll_QueryEventsServer(
                        int     n = atoi(res[0]);
                        free(res[0]);
 
+                       /* Check non-indexed event conditions */
                        if ( convert_event_head(ctx, res+2, out+i) || edg_wll_get_event_flesh(ctx, n, out+i) )
                        {
                                free(res[1]);
@@ -161,6 +167,29 @@ int edg_wll_QueryEventsServer(
                                goto fetch_cycle_cleanup;
                        }
 
+                       /* Check non-indexed job conditions */
+                       if (where_flags & FL_FILTER) {
+                               edg_wll_JobStat state_out;
+
+                               if ( edg_wll_JobStatus(ctx, out[i].any.jobId, 0, &state_out) )
+                               {
+                                       edg_wll_FreeEvent(out+i);
+                                       if (edg_wll_Error(ctx,NULL,NULL) == EPERM) eperm = 1;
+                                       goto fetch_cycle_cleanup;
+                               }
+
+                               if ( !match_status(ctx, (&state_out), job_conditions) )
+                               {
+                                       edg_wll_FreeEvent(out+i);
+                                       edg_wll_FreeStatus(&state_out);
+                                       edg_wll_ResetError(ctx);        /* check_strict_jobid() sets it */
+                                       goto fetch_cycle_cleanup;
+                               }
+
+                               edg_wll_FreeStatus(&state_out);
+                       }
+
+
                        if ( !noAuth )
                        {
                                if (!ctx->peerName || strcmp(res[1],strmd5(ctx->peerName,NULL))) {
@@ -256,7 +285,9 @@ int edg_wll_QueryJobsServer(
                                                ret = 0,
                                                eperm = 0,
                                                limit = 0, offset = 0,
-                                               limit_loop = 1;
+                                               limit_loop = 1,
+                                               where_flags = 0;
+                                               
 
 
        memset(res,0,sizeof res);
@@ -280,15 +311,19 @@ int edg_wll_QueryJobsServer(
        if ( (!ctx->noIndex && check_job_query_index(ctx, conditions)) || check_strict_jobid_cond(ctx,conditions))
                goto cleanup;
 
-       if ( !(job_where = jc_to_head_where(ctx, conditions, &i)) )
-               goto cleanup;
+       if ( !(job_where = jc_to_head_where(ctx, conditions, &where_flags)) )
+               if (!ctx->noIndex) goto cleanup;
 
-       if ( (i & FL_SEL_STATUS) )
+       if ( (where_flags & FL_SEL_STATUS) )
                trio_asprintf(&qbase,"SELECT DISTINCT j.dg_jobid,j.userid "
-                                                "FROM jobs j, states s WHERE j.jobid=s.jobid AND %s", job_where);
+                                                "FROM jobs j, states s WHERE j.jobid=s.jobid %s %s", 
+                                               (job_where) ? "AND" : "",
+                                               (job_where) ? job_where : "");
        else
                trio_asprintf(&qbase,"SELECT DISTINCT j.dg_jobid,j.userid "
-                                                "FROM jobs j WHERE %s", job_where);
+                                                "FROM jobs j %s %s", 
+                                               (job_where) ? "WHERE" : "",
+                                               (job_where) ? job_where : "");
 
        if ( ctx->softLimit )
        {
@@ -347,20 +382,25 @@ int edg_wll_QueryJobsServer(
                                edg_wlc_JobIdFree(jobs_out[i]);
                                goto fetch_cycle_cleanup;
                        }
+                       
+                       // if some condition hits unindexed column or states of matching jobs wanted
+                       if ((where_flags & FL_FILTER) || !(flags & EDG_WLL_STAT_NO_STATES)) {
+                               if ( edg_wll_JobStatus(ctx, jobs_out[i], flags, &states_out[i]) )
+                               {
+                                       edg_wlc_JobIdFree(jobs_out[i]);
+                                       if (edg_wll_Error(ctx,NULL,NULL) == EPERM) eperm = 1;
+                                       goto fetch_cycle_cleanup;
+                               }
 
-                       if ( edg_wll_JobStatus(ctx, jobs_out[i], flags, &states_out[i]) )
-                       {
-                               edg_wlc_JobIdFree(jobs_out[i]);
-                               if (edg_wll_Error(ctx,NULL,NULL) == EPERM) eperm = 1;
-                               goto fetch_cycle_cleanup;
                        }
-
-                       if ( !match_status(ctx, states_out+i, conditions) )
-                       {
-                               edg_wlc_JobIdFree(jobs_out[i]);
-                               edg_wll_FreeStatus(states_out+i);
-                               edg_wll_ResetError(ctx);        /* check_strict_jobid() sets it */
-                               goto fetch_cycle_cleanup;
+                       if (where_flags & FL_FILTER) {
+                               if ( !match_status(ctx, states_out+i, conditions) )
+                               {
+                                       edg_wlc_JobIdFree(jobs_out[i]);
+                                       edg_wll_FreeStatus(states_out+i);
+                                       edg_wll_ResetError(ctx);        /* check_strict_jobid() sets it */
+                                       goto fetch_cycle_cleanup;
+                               }
                        }
 
 #if 0
@@ -729,6 +769,7 @@ static int is_indexed(const edg_wll_QueryRec *cond, const edg_wll_Context ctx)
 {
        int             i, j;
 
+
        if ( !(ctx->job_index) )
                return 0;
 
@@ -868,7 +909,10 @@ static char *jc_to_head_where(
                case EDG_WLL_QUERY_ATTR_TIME:
                        if (   !is_indexed(&(jc[m][n]), ctx)
                                || !(cname = edg_wll_QueryRecToColumn(&(jc[m][n]))) )
+                       {
+                               *where_flags |= FL_FILTER;
                                break;
+                       }
 
                        *where_flags |= FL_SEL_STATUS;
 
@@ -917,7 +961,10 @@ static char *jc_to_head_where(
                case EDG_WLL_QUERY_ATTR_PARENT:
                        if (   !is_indexed(&(jc[m][n]), ctx)
                                || !(cname = edg_wll_QueryRecToColumn(&(jc[m][n]))) )
+                       {
+                               *where_flags |= FL_FILTER;
                                break;
+                       }
 
                        *where_flags |= FL_SEL_STATUS;
                        aux = edg_wlc_JobIdGetUnique(jc[m][n].value.j);
@@ -934,7 +981,10 @@ static char *jc_to_head_where(
                case EDG_WLL_QUERY_ATTR_OWNER:
                        if (   !is_indexed(&(jc[m][n]), ctx)
                                || !(cname = edg_wll_QueryRecToColumn(&(jc[m][n]))) )
+                       {
+                               *where_flags |= FL_FILTER;
                                break;
+                       }
 
                        if ( !jc[m][n].value.c && !ctx->peerName ) 
                        { 
@@ -966,7 +1016,10 @@ static char *jc_to_head_where(
                case EDG_WLL_QUERY_ATTR_STATUS:
                        if (   !is_indexed(&(jc[m][n]), ctx)
                                || !(cname = edg_wll_QueryRecToColumn(&(jc[m][n]))) )
+                       {
+                               *where_flags |= FL_FILTER;
                                break;
+                       }
 
                        *where_flags |= FL_SEL_STATUS;
                        if ( conds )
@@ -992,7 +1045,10 @@ static char *jc_to_head_where(
                case EDG_WLL_QUERY_ATTR_USERTAG:
                        if (   !is_indexed(&(jc[m][n]), ctx)
                                || !(cname = edg_wll_QueryRecToColumn(&(jc[m][n]))) )
+                       {
+                               *where_flags |= FL_FILTER;
                                break;
+                       }
 
                        *where_flags |= FL_SEL_STATUS;
                        if ( conds )
@@ -1008,6 +1064,7 @@ static char *jc_to_head_where(
 
                default:
                        /* this may never occure, but keep compiler happy */
+                       *where_flags |= FL_FILTER;      // just to be sure
                        break;
                }
 
index 5a625bd..5efad98 100644 (file)
@@ -330,10 +330,18 @@ abort:
 
        if (parse && !edg_wll_Error(ctx,NULL,NULL))
        {
-               if ( naffected_jobs )
-                       edg_wll_SetError(ctx,EINVAL,"Invalid JobId(s) but other jobs purged");
-               else
-                       edg_wll_SetError(ctx,EINVAL,"Invalid JobId(s)");
+               if ( naffected_jobs ) {
+                       fprintf(stderr,"[%d] Found some jobs not matching server address/port;"\
+                               " these were not purged but other jobs purged.\n", getpid());
+                       syslog(LOG_INFO,"Found some jobs not matching server address/port;"\
+                               " these were not purged but other jobs purged");
+               }
+               else {
+                       fprintf(stderr,"[%d] Found only jobs not matching server address/port;"\
+                               " these were not purged.\n", getpid());
+                       syslog(LOG_INFO,"Found only jobs not matching server address/port;"\
+                               " these were not purged.");
+               }
        }
 
        switch ( edg_wll_Error(ctx,NULL,NULL) )
@@ -347,6 +355,9 @@ abort:
                case EPERM:
                        ret = HTTP_UNAUTH;
                        break;
+               case ENOENT:
+                       ret = HTTP_NOTFOUND;
+                       break;
                
                /* fatal errors */
                case ENOMEM:
@@ -559,12 +570,6 @@ int purge_one(edg_wll_Context ctx,const edg_wlc_JobId job,int dump, int purge)
        }
 
        edg_wll_FreeStmt(&q);
-       if (ret == 0 && dumped == 0) {
-               if (ctx->strict_locking) unlock_and_check(ctx,job);
-               fprintf(stderr,"%s: no events, i.e. no such job or internal inconsistency\n",dbjob);
-               edg_wll_SetError(ctx,ENOENT,dbjob);
-               goto clean;
-       }
 
 unlock:
        if (ctx->strict_locking) unlock_and_check(ctx,job);
index 66448f0..e90043a 100644 (file)
@@ -19,7 +19,7 @@ int edg_wll_UserJobs(
 {
        char    *userid = strmd5(ctx->peerName,NULL),*stmt = NULL,
                *res = NULL;
-       int     njobs = 0,ret,i;
+       int     njobs = 0,ret,i,j;
        edg_wlc_JobId   *out = NULL;
        edg_wll_Stmt    sth = NULL;
        edg_wll_ErrorCode       err = 0;
@@ -61,6 +61,14 @@ int edg_wll_UserJobs(
                free(res); res = NULL;
        }
 
+       *states = calloc(njobs, sizeof(**states));
+       for (i = 0; i < njobs; i++) {
+               if (edg_wll_JobStatus(ctx, out[i], -1, &(*states)[i]) != 0) {
+                       for (j = 0; j < i; j++) edg_wll_FreeStatus(&(*states)[j]);
+                       *states = NULL;
+                       break;
+               }
+       }
 err:
        free(res);
        free(stmt);
index 869cf01..2d76c96 100644 (file)
@@ -9,10 +9,8 @@
 
 
 #if GSOAP_VERSION >= 20709
-  #define GFITEM reason
   #define GFNUM SOAP_TYPE_lbt__genericFault
 #else
-  #define GFITEM lbe__genericFault
   #define GFNUM SOAP_TYPE__genericFault
 #endif
 
 void edg_wll_ErrToFault(const edg_wll_Context ctx,struct soap *soap)
 {
        char    *et,*ed;
-       struct SOAP_ENV__Detail *detail = soap_malloc(soap,sizeof *detail);
+       struct SOAP_ENV__Detail *detail;
 #if GSOAP_VERSION >= 20709
        struct lbt__genericFault *f = soap_malloc(soap,sizeof *f);
+       struct lbt__genericFault *item = f;
 #else
        struct _genericFault *f = soap_malloc(soap,sizeof *f);
+       struct lbt__genericFault *item = f->lbe__genericFault = soap_malloc(soap, sizeof *item);
 #endif
 
-       f->GFITEM = soap_malloc(soap,sizeof *f->GFITEM);
-       memset(f->GFITEM, 0, sizeof(*f->GFITEM));
+       memset(item, 0, sizeof(*item));
 
-       f->GFITEM->code = edg_wll_Error(ctx,&et,&ed);
-       f->GFITEM->text = soap_malloc(soap,strlen(et)+1);
-       strcpy(f->GFITEM->text,et); 
+       item->code = edg_wll_Error(ctx,&et,&ed);
+       item->text = soap_malloc(soap,strlen(et)+1);
+       strcpy(item->text, et); 
        free(et);
        if (ed) {
-               f->GFITEM->description = soap_malloc(soap,strlen(ed)+1);
-               strcpy(f->GFITEM->description,ed); 
+               item->description = soap_malloc(soap,strlen(ed)+1);
+               strcpy(item->description,ed); 
                free(ed);
        }
 
+       detail = soap_faultdetail(soap);
        detail->__type = GFNUM;
 #if GSOAP_VERSION >= 20700
        detail->fault = f;
@@ -67,7 +67,7 @@ void edg_wll_FaultToErr(const struct soap *soap,edg_wll_Context ctx)
        detail = soap->version == 2 ? soap->fault->SOAP_ENV__Detail : soap->fault->detail;
        if (detail->__type == GFNUM) {
 #if GSOAP_VERSION >= 20709
-               f = detail->lbe__genericFault;
+               f = (struct lbt__genericFault *)detail->fault;
 #elif GSOAP_VERSION >= 20700
                f = ((struct _genericFault *) detail->fault)
                        ->lbe__genericFault;
@@ -75,12 +75,14 @@ void edg_wll_FaultToErr(const struct soap *soap,edg_wll_Context ctx)
                f = ((struct _genericFault *) detail->value)
                        ->lbe__genericFault;
 #endif
-               edg_wll_SetError(ctx,f->code,f->description);
+               if (f) edg_wll_SetError(ctx,f->code,f->description);
+               else edg_wll_SetError(ctx, EIO, "no or not parsable error from SOAP");
        }
        else {
                char    *s;
 
-               asprintf(&s,"SOAP: %s", soap->version == 2 ?
+               if (detail->__any) asprintf(&s, "SOAP: %s", detail->__any);
+               else asprintf(&s,"SOAP: %s", soap->version == 2 ?
                        GLITE_SECURITY_GSOAP_REASON(soap) : soap->fault->faultstring);
                edg_wll_SetError(ctx,EINVAL,s);
                free(s);
index 58086aa..f8cd589 100644 (file)
@@ -122,22 +122,28 @@ SOAP_FMAC5 int SOAP_FMAC6 __lb__UserJobs(
        struct _lbe__UserJobs *in,
        struct _lbe__UserJobsResponse *out)
 {
-       return SOAP_OK;
-}
-
-#if 0
-int edgwll2__UserJobs(
-       struct soap                                                *soap,
-       struct edgwll2__UserJobsResponse   *out)
-{
-       out->jobs = NULL;
-       out->states = NULL;
+       edg_wll_Context ctx;
+       edg_wlc_JobId   *jobs;
+       edg_wll_JobStat *states;
 
+       ctx = (edg_wll_Context) glite_gsplugin_get_udata(soap);
+       memset(out, 0, sizeof *out);
+       if (edg_wll_UserJobs(ctx, &jobs, &states) != 0) goto fault;
+       if (edg_wll_UserJobsResToSoap(soap, jobs, states, out) != SOAP_OK) {
+               edg_wll_SetError(ctx, ENOMEM, "Couldn't create internal structures");
+               goto freefault;
+       }
+       freeJobIds(jobs);
+       freeJobStats(states);
        return SOAP_OK;
+freefault:
+       freeJobIds(jobs);
+       freeJobStats(states);
+fault:
+       edg_wll_ErrToFault(ctx, soap);
+       return SOAP_FAULT;
 }
 
-#endif
-
 
 SOAP_FMAC5 int SOAP_FMAC6 __lb__QueryEvents(
        struct soap *soap,
index 9c7d1cc..6ea2d81 100644 (file)
@@ -46,6 +46,8 @@
 #define CLASSADS       lbt__jobFlagsValue__CLASSADS
 #define CHILDREN       lbt__jobFlagsValue__CHILDREN
 #define CHILDSTAT      lbt__jobFlagsValue__CHILDSTAT
+#define CHILDHIST_FAST lbt__jobFlagsValue__CHILDHIST_USCOREFAST
+#define CHILDHIST_THOROUGH lbt__jobFlagsValue__CHILDHIST_USCORETHOROUGH
 
 #define UserInterface  lbt__eventSource__UserInterface
 #define NetworkServer  lbt__eventSource__NetworkServer
index 361cab1..35a4a05 100644 (file)
@@ -317,6 +317,8 @@ void edg_wll_SoapToJobStatFlags(const struct lbt__jobFlags *in, int *out)
        case CLASSADS: *out |= EDG_WLL_STAT_CLASSADS; break;
        case CHILDREN: *out |= EDG_WLL_STAT_CHILDREN; break;
        case CHILDSTAT: *out |= EDG_WLL_STAT_CHILDSTAT; break;
+       case CHILDHIST_FAST: *out |= EDG_WLL_STAT_CHILDHIST_FAST; break;
+       case CHILDHIST_THOROUGH: *out |= EDG_WLL_STAT_CHILDHIST_THOROUGH; break;
        }
 }
 
@@ -329,6 +331,8 @@ int edg_wll_JobStatFlagsToSoap(struct soap *soap, const int in, struct lbt__jobF
        if ( in & EDG_WLL_STAT_CLASSADS ) out->__sizeflag++;
        if ( in & EDG_WLL_STAT_CHILDREN ) out->__sizeflag++;
        if ( in & EDG_WLL_STAT_CHILDSTAT ) out->__sizeflag++;
+       if ( in & EDG_WLL_STAT_CHILDHIST_FAST ) out->__sizeflag++;
+       if ( in & EDG_WLL_STAT_CHILDHIST_THOROUGH ) out->__sizeflag++;
        if ( !out->__sizeflag ) return SOAP_OK;
        out->flag = soap_malloc(soap, sizeof(*(out->flag))*out->__sizeflag);
        if ( !out->flag ) return SOAP_FAULT;
@@ -336,15 +340,18 @@ int edg_wll_JobStatFlagsToSoap(struct soap *soap, const int in, struct lbt__jobF
        if ( in & EDG_WLL_STAT_CLASSADS ) out->flag[i++] = CLASSADS;
        if ( in & EDG_WLL_STAT_CHILDREN ) out->flag[i++] = CHILDREN;
        if ( in & EDG_WLL_STAT_CHILDSTAT ) out->flag[i++] = CHILDSTAT;
+       if ( in & EDG_WLL_STAT_CHILDHIST_FAST ) out->flag[i++] = CHILDHIST_FAST;
+       if ( in & EDG_WLL_STAT_CHILDHIST_THOROUGH ) out->flag[i++] = CHILDHIST_THOROUGH;
 
        return SOAP_OK;
 }
 
-void edg_wll_SoapToAttr(const enum lbt__queryAttr in, edg_wll_QueryAttr *out)
+int edg_wll_SoapToAttr(const enum lbt__queryAttr in, edg_wll_QueryAttr *out)
 {
+       assert(EDG_WLL_QUERY_ATTR_EXITCODE + 1 == EDG_WLL_QUERY_ATTR__LAST);
+
        switch ( in )
        {
-//     case UNDEF: *out = EDG_WLL_QUERY_ATTR_UNDEF; break;
        case JOBID: *out = EDG_WLL_QUERY_ATTR_JOBID; break;
        case OWNER: *out = EDG_WLL_QUERY_ATTR_OWNER; break;
        case STATUS: *out = EDG_WLL_QUERY_ATTR_STATUS; break;
@@ -362,15 +369,18 @@ void edg_wll_SoapToAttr(const enum lbt__queryAttr in, edg_wll_QueryAttr *out)
        case RESUBMITTED: *out = EDG_WLL_QUERY_ATTR_RESUBMITTED; break;
        case PARENT: *out = EDG_WLL_QUERY_ATTR_PARENT; break;
        case EXITCODE: *out = EDG_WLL_QUERY_ATTR_EXITCODE; break;
-       default: *out = in; break;
+       default: return 0;
        }
+
+       return 1;
 }
 
-void edg_wll_AttrToSoap(const edg_wll_QueryAttr in, enum lbt__queryAttr *out)
+int edg_wll_AttrToSoap(const edg_wll_QueryAttr in, enum lbt__queryAttr *out)
 {
+       assert(EDG_WLL_QUERY_ATTR_EXITCODE + 1 == EDG_WLL_QUERY_ATTR__LAST);
+
        switch ( in )
        {
-       case EDG_WLL_QUERY_ATTR_UNDEF: *out = -1; break;
        case EDG_WLL_QUERY_ATTR_JOBID: *out = JOBID; break;
        case EDG_WLL_QUERY_ATTR_OWNER: *out = OWNER; break;
        case EDG_WLL_QUERY_ATTR_STATUS: *out = STATUS; break;
@@ -388,8 +398,10 @@ void edg_wll_AttrToSoap(const edg_wll_QueryAttr in, enum lbt__queryAttr *out)
        case EDG_WLL_QUERY_ATTR_RESUBMITTED: *out = RESUBMITTED; break;
        case EDG_WLL_QUERY_ATTR_PARENT: *out = PARENT; break;
        case EDG_WLL_QUERY_ATTR_EXITCODE: *out = EXITCODE; break;
-       default: *out = in; break;
+       default: return 0;
        }
+
+       return 1;
 }
 
 void edg_wll_SoapToQueryOp(const enum lbt__queryOp in, edg_wll_QueryOp *out)
@@ -397,10 +409,10 @@ void edg_wll_SoapToQueryOp(const enum lbt__queryOp in, edg_wll_QueryOp *out)
        switch ( in )
        {
        case EQUAL: *out = EDG_WLL_QUERY_OP_EQUAL; break;
+       case UNEQUAL: *out = EDG_WLL_QUERY_OP_UNEQUAL; break;
        case LESS: *out = EDG_WLL_QUERY_OP_LESS; break;
        case GREATER: *out = EDG_WLL_QUERY_OP_GREATER; break;
        case WITHIN: *out = EDG_WLL_QUERY_OP_WITHIN; break;
-       default: *out = in; break;
        }
 }
 
@@ -409,10 +421,11 @@ void edg_wll_QueryOpToSoap(const edg_wll_QueryOp in, enum lbt__queryOp *out)
        switch ( in )
        {
        case EDG_WLL_QUERY_OP_EQUAL: *out = EQUAL; break;
+       case EDG_WLL_QUERY_OP_UNEQUAL: *out = UNEQUAL; break;
        case EDG_WLL_QUERY_OP_LESS: *out = LESS; break;
        case EDG_WLL_QUERY_OP_GREATER: *out = GREATER; break;
        case EDG_WLL_QUERY_OP_WITHIN: *out = WITHIN; break;
-       default: *out = in; break;
+       default: assert(0);
        }
 }
 
@@ -453,6 +466,7 @@ int edg_wll_QueryValToSoap(
        case EDG_WLL_QUERY_ATTR_DESTINATION:
        case EDG_WLL_QUERY_ATTR_HOST:
        case EDG_WLL_QUERY_ATTR_INSTANCE:
+       case EDG_WLL_QUERY_ATTR_CHKPT_TAG:
                VALUEQR_SET(out, c, in->c ? soap_strdup(soap, in->c) : NULL);
                if (in->c && !VALUEQR_GET(out, c) ) return SOAP_FAULT;
                break;
@@ -477,11 +491,13 @@ int edg_wll_QueryValToSoap(
        case EDG_WLL_QUERY_ATTR_SOURCE:
        case EDG_WLL_QUERY_ATTR_EVENT_TYPE:
        case EDG_WLL_QUERY_ATTR_RESUBMITTED:
-       default:
+       case EDG_WLL_QUERY_ATTR_EXITCODE:
                VALUEQR_SET(out, i, soap_malloc(soap, sizeof(*(VALUEQR_GET(out, i)))));
                if ( !VALUEQR_GET(out, i) ) return SOAP_FAULT;
                *(VALUEQR_GET(out, i)) = in->i;
                break;
+       default:
+               return SOAP_FAULT;
        }
 
        return SOAP_OK;
@@ -494,7 +510,7 @@ int edg_wll_SoapToQueryRec(
 {
        assert(collection); assert(in); assert(out);
        memset(out, 0, sizeof(*out));
-       edg_wll_SoapToAttr(collection->attr, &out->attr);
+       if (!edg_wll_SoapToAttr(collection->attr, &out->attr)) return -1;
        switch ( out->attr )
        {
        case EDG_WLL_QUERY_ATTR_TIME:
@@ -585,7 +601,7 @@ int edg_wll_QueryCondsToSoap(
        if ( !in )
                goto ret;
 
-       edg_wll_AttrToSoap(in[0].attr, &(qc->attr));
+       if (!edg_wll_AttrToSoap(in[0].attr, &(qc->attr))) return SOAP_FAULT;
 
        if ( in->attr == EDG_WLL_QUERY_ATTR_TIME ) {
                qc->statName = soap_malloc(soap, sizeof(*(qc->statName)));
@@ -684,46 +700,62 @@ ret:
 }
 
 
+#define edg_wll_CommonJobsResponseToSoap do { \
+       int     i; \
+\
+       assert(out); \
+       out->__sizejobs = 0; \
+       out->jobs = NULL; \
+       out->__sizestates = 0; \
+       out->states = NULL; \
+\
+       if ( jobs ) { \
+               for ( i = 0; jobs[i]; i++ ) ; \
+               out->jobs = soap_malloc(soap, sizeof(*(out->jobs))*i); \
+               if ( !out->jobs ) return SOAP_FAULT; \
+               out->__sizejobs = i; \
+               for ( i = 0; jobs[i]; i++ ) { \
+                       char       *s; \
+                       if ( !(s = edg_wlc_JobIdUnparse(jobs[i])) ) return SOAP_FAULT; \
+                       if ( !(out->jobs[i] = soap_strdup(soap, s)) ) return SOAP_FAULT; \
+                       free(s); \
+               } \
+       } \
+       if ( states ) { \
+               for ( i = 0; states[i].state; i++ ) ; \
+               GLITE_SECURITY_GSOAP_LIST_CREATE(soap, out, states, struct lbt__jobStatus, i); \
+               if ( !out->states ) return SOAP_FAULT; \
+\
+               for ( i = 0; states[i].state; i++ ) \
+                       if ( edg_wll_StatusToSoap(soap, states+i, GLITE_SECURITY_GSOAP_LIST_GET(out->states, i)) ) \
+                               return SOAP_FAULT; \
+       } \
+\
+} while(0)
+
+
 int edg_wll_JobsQueryResToSoap(
        struct soap           *soap,
        const edg_wlc_JobId   *jobs,
        const edg_wll_JobStat *states,
        struct _lbe__QueryJobsResponse *out)
 {
-       int                                                     i;
-
-
-       assert(out); //assert(out->states); assert(out->jobs);
-       out->jobs = NULL;
-       out->states = NULL;
-       out->__sizejobs = 0;
-       out->__sizestates = 0;
-
-       if ( jobs ) {
-               for ( i = 0; jobs[i]; i++ ) ;
-               out->jobs = soap_malloc(soap, sizeof(*(out->jobs))*i);
-               if ( !out->jobs ) return SOAP_FAULT;
-               out->__sizejobs = i;
-               for ( i = 0; jobs[i]; i++ ) {
-                       char       *s;
-                       if ( !(s = edg_wlc_JobIdUnparse(jobs[i])) ) return SOAP_FAULT;
-                       if ( !(out->jobs[i] = soap_strdup(soap, s)) ) return SOAP_FAULT;
-                       free(s);
-               }
-       }
-       if ( states ) {
-               for ( i = 0; states[i].state; i++ ) ;
-               GLITE_SECURITY_GSOAP_LIST_CREATE(soap, out, states, struct lbt__jobStatus, i);
-               if ( !out->states ) return SOAP_FAULT;
-
-               for ( i = 0; states[i].state; i++ )
-                       if ( edg_wll_StatusToSoap(soap, states+i, GLITE_SECURITY_GSOAP_LIST_GET(out->states, i)) )
-                               return SOAP_FAULT;
-       }
+       edg_wll_CommonJobsResponseToSoap;
+       return SOAP_OK;
+}
 
+
+int edg_wll_UserJobsResToSoap(
+       struct soap           *soap,
+       const edg_wlc_JobId   *jobs,
+       const edg_wll_JobStat *states,
+       struct _lbe__UserJobsResponse *out)
+{
+       edg_wll_CommonJobsResponseToSoap;
        return SOAP_OK;
 }
 
+
 static void edg_wll_SoapToSource(enum lbt__eventSource in, edg_wll_Source *out)
 {
        assert(EDG_WLL_SOURCE_LB_SERVER + 1 == EDG_WLL_SOURCE__LAST);
@@ -833,6 +865,9 @@ foreach ('_common_', sort { $event->{order}->{$a} <=> $event->{order}->{$b} } ge
                                $soap_enum_value = "lbt__${soap_en}${soap_fn}__${upper_cn}";
                                gen "\tcase $enum_value: $target = $soap_enum_value; break;\n"
                        }
+                       if (not $e eq '_common_') {
+                               gen "\tcase EDG_WLL_${upper_en}_UNDEFINED: assert(0);\n";
+                       }
                        gen "\tdefault: assert(0);\n";
                        gen "\t};\n";
                        gen "}\n";
@@ -856,8 +891,11 @@ static void edg_wll_SourceToSoap(edg_wll_Source in, enum lbt__eventSource *out)
                case EDG_WLL_SOURCE_LOG_MONITOR: *out = LogMonitor; break;
                case EDG_WLL_SOURCE_LRMS: *out = LRMS; break;
                case EDG_WLL_SOURCE_APPLICATION: *out = Application; break;
-               case EDG_WLL_SOURCE_LB_SERVER: *out = LBServer; break;
-               default: assert(0); break;
+               case EDG_WLL_SOURCE_LB_SERVER: *out = LBServer; break;
+               case EDG_WLL_SOURCE_NONE:
+               case EDG_WLL_SOURCE__LAST:
+               default:
+                       assert(0);
         }
 }
 
@@ -914,7 +952,7 @@ gen qq {
        }
 @@@}
                default:
-                       break;
+                       return 0;
        }
 
        return 1;
@@ -1133,4 +1171,3 @@ int edg_wll_SoapToEventsQueryRes(
        *out = events;
        return SOAP_OK;
 }
-
index 924cc51..e91841b 100644 (file)
@@ -63,6 +63,12 @@ extern int edg_wll_JobsQueryResToSoap(struct soap *,
                        edg_wll_JobStat *,
                        struct _lbe__QueryJobsResponse *);
 
+extern int edg_wll_UserJobsResToSoap(
+       struct soap *,
+       const edg_wlc_JobId *,
+       const edg_wll_JobStat *,
+       struct _lbe__UserJobsResponse *);
+
 extern int edg_wll_EventsQueryResToSoap(struct soap *,
                        const edg_wll_Event *,
                        struct _lbe__QueryEventsResponse *);
index 6c4fba9..fbfb5c9 100644 (file)
@@ -1,45 +1,94 @@
 Index: org.glite/project/global.dependencies.properties
 ===================================================================
 RCS file: /cvs/jra1mw/org.glite/project/global.dependencies.properties,v
-retrieving revision 1.482.2.279
-diff -u -p -u -r1.482.2.279 global.dependencies.properties
---- org.glite/project/global.dependencies.properties   4 Aug 2006 12:21:59 -0000       1.482.2.279
-+++ org.glite/project/global.dependencies.properties   1 Sep 2006 14:23:09 -0000
-@@ -1819,7 +1819,25 @@ ext.globus-sdk.description = The Globus 
- ext.globus-sdk.rpm.name    = vdt_globus_sdk
+retrieving revision 1.482.2.279.2.61
+diff -u -r1.482.2.279.2.61 global.dependencies.properties
+--- org.glite/project/global.dependencies.properties   23 Apr 2007 09:54:21 -0000      1.482.2.279.2.61
++++ org.glite/project/global.dependencies.properties   24 Apr 2007 08:20:35 -0000
+@@ -2100,6 +2100,24 @@
  ext.globus-sdk.rpm.version = ${ext.vdt.version}
  ext.globus-sdk.rpm.age     = ${ext.vdt.age}
--                                      
-+  
 +# Globus vdt data server - grid ftp server
-+ext.globus-data-server.name           = ${ext.globus.name}
-+ext.globus-data-server.vendor         = ${ext.globus.vendor}
-+ext.globus-data-server.version                = ${ext.globus.version}
-+ext.globus-data-server.platform               = ${platform}
-+ext.globus-data-server.subdir         = ${ext.globus-data-server.name}/${ext.globus-data-server.version}/${ext.globus-data-server.platform}
-+ext.globus-data-server.rep.base               = ${jra1.rep.base}
-+ext.globus-data-server.rep.file               =
-+ext.globus-data-server.rep.subdir     =
-+ext.globus-data-server.rep.url                = ${ext.globus-data-server.rep.base}/${ext.globus-data-server.subdir}/${ext.globus-data-server.rep.subdir}/${ext.globus-data-server.rep.file}
-+ext.globus-data-server.files          =
-+ext.globus-data-server.download               = http://www.cs.wisc.edu/vdt/releases/1.2.2/installing-rpms.html
-+ext.globus-data-server.homepage               = http://www.cs.wisc.edu/vdt//index.html
-+ext.globus-data-server.description    = The Globus Toolkit(R). This is the version packaged by VDT.
-+ext.globus-data-server.rpm.name       = vdt_globus_data_server
-+ext.globus-data-server.rpm.version    = ${ext.vdt.version}
-+ext.globus-data-server.rpm.age                = 1
-+                                    
- # GPT
- ext.gpt.name        = gpt
- ext.gpt.vendor      = gpt
++ext.globus-data-server.name           = ${ext.globus.name}
++ext.globus-data-server.vendor         = ${ext.globus.vendor}
++ext.globus-data-server.version                = ${ext.globus.version}
++ext.globus-data-server.platform               = ${platform}
++ext.globus-data-server.subdir         = ${ext.globus-data-server.name}/${ext.globus-data-server.version}/${ext.globus-data-server.platform}
++ext.globus-data-server.rep.base               = ${jra1.rep.base}
++ext.globus-data-server.rep.file               = 
++ext.globus-data-server.rep.subdir     =
++ext.globus-data-server.rep.url                = ${ext.globus-data-server.rep.base}/${ext.globus-data-server.subdir}/${ext.globus-data-server.rep.subdir}/${ext.globus-data-server.rep.file}
++ext.globus-data-server.files          =
++ext.globus-data-server.download               = http://www.cs.wisc.edu/vdt/releases/1.2.2/installing-rpms.html
++ext.globus-data-server.homepage               = http://www.cs.wisc.edu/vdt//index.html
++ext.globus-data-server.description    = The Globus Toolkit(R). This is the version packaged by VDT.
++ext.globus-data-server.rpm.name       = vdt_globus_data_server
++ext.globus-data-server.rpm.version    = ${ext.vdt.version}
++ext.globus-data-server.rpm.age                = 1
++                                      
+ # google-perftools
+ ext.google-perftools.name        = google-perftools
+ ext.google-perftools.vendor      = google-perftools
+@@ -3855,31 +3873,31 @@
+ # System dependencies
+ ###################################################################
+-org.glite.deployment.version                    = glite-deployment_branch_2_5_0
++org.glite.deployment.version                    = HEAD
+ org.glite.testsuites.version                    = HEAD
+-org.glite.version                               = glite_branch_3_1_0
++org.glite.version                               = HEAD
+-#subsystem version tag = do not remove
++#subsystem version tag = HEAD
+ org.glite.slcs.version                                = HEAD
+-org.glite.amga.version                          = glite-amga_R_1_0_0_2
++org.glite.amga.version                          = HEAD
+ org.glite.bdii.version                                = HEAD
+-org.glite.ce.version                            = glite-ce_R_1_7_13_0
+-org.glite.data.version                          = glite-data_R_3_1_17_1
+-org.glite.dgas.version                          = glite-dgas_R_3_1_9_1
+-org.glite.gpbox.version                         = glite-gpbox_R_1_3_0
++org.glite.ce.version                            = HEAD
++org.glite.data.version                          = HEAD
++org.glite.dgas.version                          = HEAD
++org.glite.gpbox.version                         = HEAD
+ org.glite.info.version                                = HEAD
+-org.glite.jdl.version                           = glite-jdl_R_3_1_11_1
+-org.glite.jp.version                          = glite-jp_R_1_3_5_1
+-org.glite.lb.version                            = glite-lb_R_1_4_1_1
++org.glite.jdl.version                           = HEAD
++org.glite.jp.version                          = HEAD
++org.glite.lb.version                            = HEAD
+ org.glite.overlay.version                     = HEAD
+-org.glite.rgma.version                          = glite-rgma_R_5_0_66_1
+-org.glite.security.version                      = glite-security_R_3_1_35_1
+-org.glite.service-discovery.version             = glite-service-discovery_R_2_0_14
+-org.glite.templates-latex-style.version         = glite-templates-latex-style_R_1_0_1
+-org.glite.wms-ui.version                        = glite-wms-ui_R_3_1_17_1
+-org.glite.wms-utils.version                     = glite-wms-utils_R_3_1_8
+-org.glite.wms.version                           = glite-wms_R_3_1_56_1
++org.glite.rgma.version                          = HEAD
++org.glite.security.version                      = HEAD
++org.glite.service-discovery.version             = HEAD
++org.glite.templates-latex-style.version         = HEAD
++org.glite.wms-ui.version                        = HEAD
++org.glite.wms-utils.version                     = HEAD
++org.glite.wms.version                           = HEAD
+-org.gridsite.core.version                       = gridsite-core_R_1_1_18_1
++org.gridsite.core.version                       = HEAD
+ org.gridsite.ws.version                         = HEAD
 Index: org.glite.deployment/build.xml
 ===================================================================
 RCS file: /cvs/jra1mw/org.glite.deployment/build.xml,v
-retrieving revision 1.61.2.2.2.12.2.26
-diff -u -p -u -r1.61.2.2.2.12.2.26 build.xml
---- org.glite.deployment/build.xml     24 Apr 2006 13:39:27 -0000      1.61.2.2.2.12.2.26
-+++ org.glite.deployment/build.xml     1 Sep 2006 14:23:09 -0000
-@@ -1619,6 +1619,39 @@
+retrieving revision 1.62
+diff -u -r1.62 build.xml
+--- org.glite.deployment/build.xml     22 Aug 2005 17:00:02 -0000      1.62
++++ org.glite.deployment/build.xml     24 Apr 2007 08:20:35 -0000
+@@ -814,6 +814,39 @@
                </if>
        </target>
  
@@ -79,7 +128,7 @@ diff -u -p -u -r1.61.2.2.2.12.2.26 build.xml
        <target name="io-server" unless="setenvonly" depends="envset,config">
                <if>
                        <isset property="small.memory"/>
-@@ -1730,6 +1763,8 @@
+@@ -891,6 +924,8 @@
                                        wn,
                                        wms,
                                        lb,
@@ -91,27 +140,27 @@ diff -u -p -u -r1.61.2.2.2.12.2.26 build.xml
 Index: org.glite.deployment/project/dependencies.properties
 ===================================================================
 RCS file: /cvs/jra1mw/org.glite.deployment/project/dependencies.properties,v
-retrieving revision 1.526.2.5.2.127.2.415.2.203
-diff -u -p -u -r1.526.2.5.2.127.2.415.2.203 dependencies.properties
---- org.glite.deployment/project/dependencies.properties       30 Aug 2006 07:41:36 -0000      1.526.2.5.2.127.2.415.2.203
-+++ org.glite.deployment/project/dependencies.properties       1 Sep 2006 14:23:09 -0000
-@@ -47,6 +47,8 @@
-       org.glite.deployment.hydra.version                              = glite-deployment-hydra_R_1_0_3
-       org.glite.deployment.io-client.version                          = glite-deployment-io-client_R_2_2_0
-       org.glite.deployment.io-server.version                          = glite-deployment-io-server_R_2_1_8
-+      org.glite.deployment.jpps.version                               = HEAD
-+      org.glite.deployment.jpis.version                               = HEAD
-       org.glite.deployment.lb.version                                 = glite-deployment-lb_R_2_2_4
-       org.glite.deployment.lcg-CE_torque.version                      = glite-deployment-lcg-CE_torque_R_3_0_4
-       org.glite.deployment.lcg-CE.version                             = glite-deployment-lcg-CE_R_3_0_5
+retrieving revision 1.529
+diff -u -r1.529 dependencies.properties
+--- org.glite.deployment/project/dependencies.properties       21 Jun 2006 09:29:08 -0000      1.529
++++ org.glite.deployment/project/dependencies.properties       24 Apr 2007 08:20:35 -0000
+@@ -33,6 +33,8 @@
+ org.glite.deployment.wn.version                               = HEAD
+ org.glite.deployment.wms.version                              = HEAD
+ org.glite.deployment.lb.version                               = HEAD
++org.glite.deployment.jpps.version                               = HEAD
++org.glite.deployment.jpis.version                               = HEAD
+ org.glite.deployment.io-server.version                        = HEAD
+ org.glite.deployment.io-client.version                        = HEAD
+ org.glite.deployment.ce.version                               = HEAD
 Index: org.glite.deployment/project/glite.deployment.csf.xml
 ===================================================================
 RCS file: /cvs/jra1mw/org.glite.deployment/project/glite.deployment.csf.xml,v
-retrieving revision 1.44.2.1.2.11.2.24
-diff -u -p -u -r1.44.2.1.2.11.2.24 glite.deployment.csf.xml
---- org.glite.deployment/project/glite.deployment.csf.xml      18 Apr 2006 15:42:14 -0000      1.44.2.1.2.11.2.24
-+++ org.glite.deployment/project/glite.deployment.csf.xml      1 Sep 2006 14:23:09 -0000
-@@ -667,6 +667,14 @@
+retrieving revision 1.46
+diff -u -r1.46 glite.deployment.csf.xml
+--- org.glite.deployment/project/glite.deployment.csf.xml      31 Jul 2006 09:53:53 -0000      1.46
++++ org.glite.deployment/project/glite.deployment.csf.xml      24 Apr 2007 08:20:35 -0000
+@@ -392,6 +392,14 @@
                        <equals arg1="${org.glite.deployment.lb.version}" arg2="HEAD" />
                </condition>
  
@@ -126,7 +175,7 @@ diff -u -p -u -r1.44.2.1.2.11.2.24 glite.deployment.csf.xml
                <condition property="io-server.head">
                        <equals arg1="${org.glite.deployment.io-server.version}" arg2="HEAD" />
                </condition>
-@@ -1571,6 +1579,28 @@
+@@ -835,6 +843,28 @@
                        tag="${org.glite.deployment.lb.version}" />
        </target>
  
@@ -155,7 +204,7 @@ diff -u -p -u -r1.44.2.1.2.11.2.24 glite.deployment.csf.xml
        <!-- io-server component -->
        <target name="io-server" depends="get.io-server.head, get.io-server.tag"/>
        <target name="get.io-server.head" if="io-server.head">
-@@ -1667,6 +1697,8 @@
+@@ -892,6 +922,8 @@
                                        wn,
                                        wms,
                                        lb,
@@ -167,17 +216,14 @@ diff -u -p -u -r1.44.2.1.2.11.2.24 glite.deployment.csf.xml
 Index: org.glite.deployment.lb/config/scripts/glite-lb-config.py
 ===================================================================
 RCS file: /cvs/jra1mw/org.glite.deployment.lb/config/scripts/glite-lb-config.py,v
-retrieving revision 1.65.2.4
-diff -u -p -u -r1.65.2.4 glite-lb-config.py
---- org.glite.deployment.lb/config/scripts/glite-lb-config.py  26 May 2006 12:24:22 -0000      1.65.2.4
-+++ org.glite.deployment.lb/config/scripts/glite-lb-config.py  1 Sep 2006 14:23:10 -0000
-@@ -129,7 +129,12 @@ python %s-config [OPTION...]""" % (self.
-     
-             if not os.path.exists('/tmp/mysql.sock'):
-                 os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock')
--            
-+
-+
+retrieving revision 1.66
+diff -u -r1.66 glite-lb-config.py
+--- org.glite.deployment.lb/config/scripts/glite-lb-config.py  13 Mar 2006 15:22:31 -0000      1.66
++++ org.glite.deployment.lb/config/scripts/glite-lb-config.py  24 Apr 2007 08:20:35 -0000
+@@ -121,6 +121,10 @@
+         if not os.path.exists('/tmp/mysql.sock'):
+             os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock')
+             
 +        #-------------------------------------------------------------------
 +        # start bkserver
 +        #-------------------------------------------------------------------
@@ -185,7 +231,7 @@ diff -u -p -u -r1.65.2.4 glite-lb-config.py
          pid = glib.getPID('bkserverd')
          if pid != 0:
              print 'The gLite LB Server service is already running. Restarting...'
-@@ -142,7 +147,7 @@ python %s-config [OPTION...]""" % (self.
+@@ -133,7 +137,7 @@
          pid = glib.getPID('bkserverd')
  
          if (pid != 0):
@@ -194,19 +240,19 @@ diff -u -p -u -r1.65.2.4 glite-lb-config.py
              glib.printOkMessage()
          else:
              glib.printErrorMessage("Could not start the gLite LB Server service")
-@@ -151,6 +156,36 @@ python %s-config [OPTION...]""" % (self.
+@@ -142,6 +146,36 @@
              return 1
          
          #-------------------------------------------------------------------
 +        # start jp-importer, if enabled
 +        #-------------------------------------------------------------------
 +
-+        lb_export = 0
-+        if params.has_key('lb.export.enabled'):
-+            if params['lb.export.enabled'] == "true":
-+                lb_export = 1
++        lb_import = 0
++        if params.has_key('lb.import.enabled'):
++            if params['lb.import.enabled'] == "true":
++                lb_import = 1
 +
-+        if lb_export:
++        if lb_import:
 +            pid = glib.getPID('jp-importer')
 +            if pid != 0:
 +                print 'The gLite JP Importer service is already running. Restarting...'
@@ -231,7 +277,7 @@ diff -u -p -u -r1.65.2.4 glite-lb-config.py
          # Start Servicetool
          #-------------------------------------------------------------------
  
-@@ -170,6 +205,10 @@ python %s-config [OPTION...]""" % (self.
+@@ -161,6 +195,10 @@
          if (pid != 0):
              os.system('%s/etc/init.d/glite-lb-bkserverd stop' % os.environ['GLITE_LOCATION'])
  
@@ -242,7 +288,7 @@ diff -u -p -u -r1.65.2.4 glite-lb-config.py
          pid = glib.getPID('bkserverd')
          if (pid != 0):
              print 'Could not stop the LB Server service            ',
-@@ -180,6 +219,25 @@ python %s-config [OPTION...]""" % (self.
+@@ -171,6 +209,25 @@
              glib.printOkMessage()
          
          #-------------------------------------------------------------------
@@ -259,8 +305,8 @@ diff -u -p -u -r1.65.2.4 glite-lb-config.py
 +            glib.printFailedMessage()
 +            error_level = 1
 +        else:
-+            if params.has_key('lb.export.enabled'):
-+                if params['lb.export.enabled'] == "true":
++            if params.has_key('lb.import.enabled'):
++                if params['lb.import.enabled'] == "true":
 +                    print 'The JP Importer service has been stopped                  ',
 +                    glib.printOkMessage()
 +        
@@ -268,7 +314,7 @@ diff -u -p -u -r1.65.2.4 glite-lb-config.py
          # MySQL
          #-------------------------------------------------------------------
  
-@@ -204,6 +262,10 @@ python %s-config [OPTION...]""" % (self.
+@@ -195,6 +252,10 @@
          if retval != 0:
              error_level = 1
  
@@ -279,7 +325,7 @@ diff -u -p -u -r1.65.2.4 glite-lb-config.py
          #-------------------------------------------------------------------
          # Servicetool
          #-------------------------------------------------------------------
-@@ -334,7 +396,29 @@ python %s-config [OPTION...]""" % (self.
+@@ -325,7 +386,29 @@
              print "\n==> MySQL database %s already exist\n" % params['lb.database.name']
              
          self.mysql.stop()
@@ -288,7 +334,7 @@ diff -u -p -u -r1.65.2.4 glite-lb-config.py
 +        # ------------------------------------------------------------------
 +        # export from bkserver to cron
 +        # ------------------------------------------------------------------
-+      if params['GLITE_LB_EXPORT_ENABLED'] == "true":
++      if (params['GLITE_LB_PURGE_ENABLED'] == "true") or (params['GLITE_LB_EXPORT_ENABLED'] == "true"):
 +          file = open('%s/etc/glite-lb-export-cron-wrapper.sh' % os.environ['GLITE_LOCATION'], 'w')
 +          file.write('#! /bin/sh\n')
 +          file.write('. %s\n' % glib.getInstallerExportFile())
@@ -301,7 +347,7 @@ diff -u -p -u -r1.65.2.4 glite-lb-config.py
 +          file.write('00,30 * * * * %s %s/etc/glite-lb-export-cron-wrapper.sh 1>/dev/null\n' % (params['glite.user.name'], os.environ['GLITE_LOCATION']))
 +          file.close()
 +            os.system('/bin/chmod 0644 /etc/cron.d/glite-lb-export.cron')
-+        else
++        else:
 +            os.system('/bin/rm -f /etc/cron.d/glite-lb-export.cron')
 +
 +            # Touch cron spool directory to cause reloading of the crontabs
@@ -310,12 +356,14 @@ diff -u -p -u -r1.65.2.4 glite-lb-config.py
          #-------------------------------------------------------------------
          # RGMA servicetool: configure servicetool
          #-------------------------------------------------------------------
-@@ -420,6 +504,19 @@ def set_env():
+@@ -411,6 +494,21 @@
      # Perl
      glib.addEnvPath("PERL5LIB", "%s/lib/perl:%s/lib/perl5" % (os.environ['GPT_LOCATION'],os.environ['GLITE_LOCATION']))
  
 +    # LB export
++    glib.export('GLITE_LB_PURGE_ENABLED', params['lb.purge.enabled']);
 +    glib.export('GLITE_LB_EXPORT_ENABLED', params['lb.export.enabled']);
++    glib.export('GLITE_LB_IMPORT_ENABLED', params['lb.import.enabled']);
 +    glib.export('GLITE_LB_EXPORT_JPPS', params['lb.export.jpps']);
 +    glib.export('GLITE_LB_EXPORT_JPREG_MAILDIR', params['lb.export.jpreg']);
 +    glib.export('GLITE_LB_EXPORT_JPDUMP_MAILDIR', params['lb.export.jpdump']);
@@ -334,9 +382,9 @@ Index: org.glite.deployment.lb/config/templates/glite-lb.cfg.xml
 ===================================================================
 RCS file: /cvs/jra1mw/org.glite.deployment.lb/config/templates/glite-lb.cfg.xml,v
 retrieving revision 1.21
-diff -u -p -u -r1.21 glite-lb.cfg.xml
+diff -u -r1.21 glite-lb.cfg.xml
 --- org.glite.deployment.lb/config/templates/glite-lb.cfg.xml  13 Mar 2006 15:19:21 -0000      1.21
-+++ org.glite.deployment.lb/config/templates/glite-lb.cfg.xml  1 Sep 2006 14:23:10 -0000
++++ org.glite.deployment.lb/config/templates/glite-lb.cfg.xml  24 Apr 2007 08:20:35 -0000
 @@ -17,9 +17,16 @@
                        parameter. Leave it empty of comment it out to use the same as 'glite.user.name'"
                        value="changeme"/>
@@ -357,20 +405,36 @@ diff -u -p -u -r1.21 glite-lb.cfg.xml
        
                <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
                <!-- Advanced parameters - Change them if you know what you're doing -->
-@@ -55,6 +62,12 @@
+@@ -55,6 +62,28 @@
                                [Example: 17M][Type: Integer][Unit: MB]"
                        value="17M"/>
  
++              <lb.purge.enabled
++                      description="Enables regular purge of LB database. 
++                              Data are stored in lb.export.purge directory (specify below)
++                              [Example: true][Type: boolean]"
++                      value="true"/>
++
 +              <lb.export.enabled
-+                      description="Enables exports to Job Provenance.
++                      description="Enables processing of purged data into lb.export.jpdump
++                              maildir directories (specify below) and export of job registrations 
++                              from LB to lb.export.jpreg maildir directories (specify below).
 +                              [Example: true][Type: boolean]"
-+                      value="false"/>
++                      value="true"/>
++
++              <lb.import.enabled
++                      description="Enables import of data stored in maildirs to Job Provenance.
++                              lb.export.enabled must be set to true, to take any real effect.
++                              [Example: true][Type: boolean]"
++                      value="true"/>
++
++
 +
 +
                <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
                <!-- System parameters - You should leave these alone -->
                <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->               
-@@ -67,7 +80,47 @@
+@@ -67,7 +96,44 @@
                        <value>destination</value>
  
                </lb.index.list>
@@ -386,11 +450,6 @@ diff -u -p -u -r1.21 glite-lb.cfg.xml
 +                              [Type: string]"
 +                      value="/tmp/jpdump"/>
 +
-+              <lb.export.dump
-+                      description="Temporary directory for monitoring dumps, it's cleaned automatically.
-+                              [Type: string]"
-+                      value="/tmp/dump"/>
-+
 +              <lb.export.purge
 +                      description="Temporary directory for dumps of purged jobs.
 +                              [Type: string]"
@@ -398,6 +457,7 @@ diff -u -p -u -r1.21 glite-lb.cfg.xml
 +
 +              <lb.export.purge.keep
 +                      description="Directory for dumps of jobs that were already handled (sent to JPPS).
++                              If empty, processed dumps of purged jobs are deleted.
 +                              [Type: string]"
 +                      value=""/>
 +
@@ -408,6 +468,7 @@ diff -u -p -u -r1.21 glite-lb.cfg.xml
 +
 +              <lb.export.jobs.keep
 +                      description="Keep the already handled exported events in file per job form.
++                              If empty, processed job files are deleted.
 +                              [Type: string]"
 +                      value=""/>
 +
@@ -422,10 +483,19 @@ diff -u -p -u -r1.21 glite-lb.cfg.xml
 Index: org.glite.deployment.lb/project/glite-lb.sdf.xml.template
 ===================================================================
 RCS file: /cvs/jra1mw/org.glite.deployment.lb/project/glite-lb.sdf.xml.template,v
-retrieving revision 1.38.2.2
-diff -u -p -u -r1.38.2.2 glite-lb.sdf.xml.template
---- org.glite.deployment.lb/project/glite-lb.sdf.xml.template  2 May 2006 10:36:19 -0000       1.38.2.2
-+++ org.glite.deployment.lb/project/glite-lb.sdf.xml.template  1 Sep 2006 14:23:10 -0000
+retrieving revision 1.38
+diff -u -r1.38 glite-lb.sdf.xml.template
+--- org.glite.deployment.lb/project/glite-lb.sdf.xml.template  13 Mar 2006 15:19:21 -0000      1.38
++++ org.glite.deployment.lb/project/glite-lb.sdf.xml.template  24 Apr 2007 08:20:35 -0000
+@@ -15,7 +15,7 @@
+                                       build="@org.glite.deployment.config.info.build@"
+                                       arch="noarch"/>
+                                       
+-                              <component name="glite-LB"
++                              <component name="glite-lb-config"
+                                       version="@module.version@"
+                                       age="@module.age@"
+                                       build="@module.build@"
 @@ -57,6 +57,12 @@
                                        build="@org.glite.lb.server-bones.info.build@"
                                        arch="i386"/>
@@ -452,3 +522,30 @@ diff -u -p -u -r1.38.2.2 glite-lb.sdf.xml.template
                  <component name="gridsite"
                      version="@org.gridsite.core.info.version@"
                      age="@org.gridsite.core.info.age@"
+Index: org.glite.deployment.lb/project/properties.xml
+===================================================================
+RCS file: /cvs/jra1mw/org.glite.deployment.lb/project/properties.xml,v
+retrieving revision 1.3
+diff -u -r1.3 properties.xml
+--- org.glite.deployment.lb/project/properties.xml     13 Mar 2006 15:19:21 -0000      1.3
++++ org.glite.deployment.lb/project/properties.xml     24 Apr 2007 08:20:35 -0000
+@@ -62,15 +62,15 @@
+                Define extra properties here ...
+                ====================================================== -->
+                
+-      <property name="build.package.name" value="glite-LB"/>
++      <property name="build.package.name" value="glite-lb-config"/>
+       <property name="build.package.summary" value="gLite Logging and Bookkeeping node configuration files" />
+       <property name="build.package.description" value="gLite Logging and Bookkeeping node configuration files" />
+       <property name="build.package.files" value="
+ %attr(755,root,root) %{prefix}/etc/config/scripts/glite-lb-config.py\n
+ %attr(600,root,root) %{prefix}/etc/config/templates/glite-lb.cfg.xml\n
+-%attr(644,root,root) %{prefix}/share/doc/glite-LB/release_notes/release_notes.doc\n
+-%attr(644,root,root) %{prefix}/share/doc/glite-LB/release_notes/release_notes.pdf\n
+-%attr(644,root,root) %{prefix}/share/doc/glite-LB/release_notes/release_notes.html\n"/>
++%attr(644,root,root) %{prefix}/share/doc/glite-lb/release_notes/release_notes.doc\n
++%attr(644,root,root) %{prefix}/share/doc/glite-lb/release_notes/release_notes.pdf\n
++%attr(644,root,root) %{prefix}/share/doc/glite-lb/release_notes/release_notes.html\n"/>
+       <property name="build.package.obsolete" value="glite-lb-config"/>
+ </project>
index 408f648..d2b32b2 100644 (file)
@@ -1,3 +1,3 @@
-ext.gsoap.version=2.7.0f
-ext.gsoap.rep.file=gSOAP-2.7.0f.tar.gz
+ext.gsoap.version=2.7.9d
+ext.gsoap.rep.file=gSOAP-2.7.9d.tar.gz
 
index 510bcf7..3074127 100644 (file)
@@ -17,4 +17,4 @@ org.glite.lb.server-bones.version             = HEAD
 org.glite.lb.logger.version                    = HEAD
 org.glite.lb.utils.version                     = HEAD
 
-ext.gsoap.version = 2.7.0f
+ext.gsoap.version = 2.7.9d