after merge
authorAleš Křenek <ljocha@ics.muni.cz>
Thu, 24 May 2007 18:58:55 +0000 (18:58 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Thu, 24 May 2007 18:58:55 +0000 (18:58 +0000)
69 files changed:
org.glite.lb.client-interface/Makefile
org.glite.lb.client-interface/interface/Event.h.T
org.glite.lb.client-interface/interface/JobStatus.h.T
org.glite.lb.client-interface/interface/context.h
org.glite.lb.client-interface/interface/events.h.T
org.glite.lb.client-interface/project/configure.properties.xml
org.glite.lb.client-interface/project/version.properties
org.glite.lb.client/Makefile
org.glite.lb.client/examples/lbmon.c [deleted file]
org.glite.lb.client/examples/parse_eventsfile.c [new file with mode: 0644]
org.glite.lb.client/examples/stresslog.c
org.glite.lb.client/project/version.properties
org.glite.lb.client/src/Event.cpp.T
org.glite.lb.client/src/JobStatus.cpp.T
org.glite.lb.client/src/args.c.T
org.glite.lb.client/src/args.h
org.glite.lb.client/src/logevent.c.T
org.glite.lb.client/src/prod_proto.c
org.glite.lb.client/src/producer.c
org.glite.lb.common/Makefile
org.glite.lb.common/interface/context-int.h
org.glite.lb.common/interface/xml_conversions.h
org.glite.lb.common/project/version.properties
org.glite.lb.common/src/context.c
org.glite.lb.common/src/events.c.T
org.glite.lb.common/src/events_parse.c.T
org.glite.lb.common/src/trio.c
org.glite.lb.common/src/xml_conversions.c
org.glite.lb.common/src/xml_parse.c.T
org.glite.lb.common/test/parse.cpp.T
org.glite.lb.logger/Makefile
org.glite.lb.logger/project/version.properties
org.glite.lb.logger/src/event_store.c
org.glite.lb.logger/src/il_master.c
org.glite.lb.logger/src/logd_proto.c
org.glite.lb.logger/src/server_msg.c
org.glite.lb.proxy/Makefile
org.glite.lb.proxy/project/version.properties
org.glite.lb.server-bones/project/version.properties
org.glite.lb.server-bones/src/srvbones.c
org.glite.lb.server/Makefile
org.glite.lb.server/config/startup
org.glite.lb.server/project/version.properties
org.glite.lb.server/src/bkindex.c
org.glite.lb.server/src/bkserverd.c
org.glite.lb.server/src/get_events.c.T
org.glite.lb.server/src/il_lbproxy.c
org.glite.lb.server/src/jobstat.c
org.glite.lb.server/src/jobstat.h
org.glite.lb.server/src/jobstat_supp.c
org.glite.lb.server/src/lb_xml_parse.c.T
org.glite.lb.server/src/lb_xml_parse_V21.c.T
org.glite.lb.server/src/lbs_db.c
org.glite.lb.server/src/process_event.c
org.glite.lb.server/src/process_event_condor.c [new file with mode: 0644]
org.glite.lb.server/src/process_event_pbs.c
org.glite.lb.server/src/store.c.T
org.glite.lb.server/src/ws_typeref.c.T
org.glite.lb.server/test/test_xml.cpp.T
org.glite.lb.utils/project/version.properties
org.glite.lb.ws-interface/Makefile
org.glite.lb.ws-interface/project/version.properties
org.glite.lb/build.xml
org.glite.lb/project/build.properties
org.glite.lb/project/dependencies.properties
org.glite.lb/project/events.T
org.glite.lb/project/status.T
org.glite.lb/project/types.T
org.glite.lb/project/version.properties

index 892adf6..1328dbe 100644 (file)
@@ -45,11 +45,10 @@ interface_version.h: ${top_srcdir}/project/version.properties
 
 ifdef LB_STANDALONE
 stage: generate
-       $(MAKE) install PREFIX=${stagedir} DOSTAGE=yes
 else
 stage: generate doc
-       $(MAKE) install PREFIX=${top_srcdir}/${stagedir} DOSTAGE=yes
 endif
+       $(MAKE) install PREFIX=${stagedir} DOSTAGE=yes
 
 dist: distsrc distbin
 
@@ -71,7 +70,11 @@ doc: generate
        doxygen C.dox
        doxygen CPP.dox
 
+ifdef LB_STANDALONE
+install: generate
+else
 install: generate doc
+endif
        -mkdir -p ${PREFIX}/${STAGETO}
        -mkdir -p ${PREFIX}/share/doc/${package}-${version}
        install -m 644 ${GEN_H} ${PREFIX}/${STAGETO}
index 714a7c0..4e293ca 100644 (file)
@@ -131,7 +131,9 @@ public:
                        LOGSRC_T,        /**< Source of the event
                                            (integer). */
                        JOBID_T,         /**< JobId value. */
-                       NOTIFID_T        /**< NotifId value. */
+                       NOTIFID_T,        /**< NotifId value. */
+                       FLOAT_T,         /**< Float value.  */
+                       DOUBLE_T,        /**< Double value.  */
        };
 
        Type    type; /**< Type of the event as defined by Type. */
@@ -189,6 +191,26 @@ public:
         */
        int     getValInt(Attr name) const;
 
+       /** Retrieve float attribute.
+        * 
+        * Retrieves value for attributes of float type.
+        * \param[in] name Name of the attribute to retrieve.
+        * \returns Integer value of the attribute.
+        * \throw Exception Invalid event type or attribute not
+        * defined for this event.
+        */
+       float   getValFloat(Attr name) const;
+
+       /** Retrieve double attribute.
+        * 
+        * Retrieves value for attributes of double type.
+        * \param[in] name Name of the attribute to retrieve.
+        * \returns Integer value of the attribute.
+        * \throw Exception Invalid event type or attribute not
+        * defined for this event.
+        */
+       double  getValDouble(Attr name) const;
+
        /** Retrieve string attribute.
         *
         * Retrieves value for attributes of string type.
@@ -222,10 +244,10 @@ public:
         * Retrieves string representation of the attribute name.
         * \param[in] name Symbolic name of the attribute.
         * \returns String name of the attribute.
-        * \throw Exception Invalid event type or attribute not
-        * defined for this event.
+        * \throw Exception Invalid attribute name.
+        * 
         */
-       const std::string & getAttrName(Attr name) const;
+       static const std::string & getAttrName(Attr name);
 
        /** List of attributes and types valid for this instance.
         *
@@ -235,6 +257,16 @@ public:
         */
        const std::vector<std::pair<Attr,AttrType> >  & getAttrs(void) const;
 
+       /** Event name.
+        *
+        * Retrieves string representation of the event type.
+        * \param[in] type Symbolic name of the event type.
+        * \returns String name of the event.
+        * \throw Exception Invalid event type.
+        *
+        */
+       static const std::string getEventName(Type type);
+
 private:
        static void     destroyFlesh(void *);
        CountRef<Event> *flesh;
index f183a33..94a1866 100644 (file)
@@ -210,7 +210,7 @@ public:
         * \returns Name of attribute.
         * \throws LoggingException Invalid attribute name.
         */
-       const std::string& getAttrName(Attr name) const;
+       static const std::string& getAttrName(Attr name);
   
        /** List of attributes and their types valid for this
         * instance.
@@ -220,6 +220,16 @@ public:
         * \returns List of attributes.
         */
        const std::vector<std::pair<Attr,AttrType> >& getAttrs(void) const;
+
+       /** Get name of state.
+        *
+        * Retrieve string representation of symbolic job state.
+        * \param[in] state Symbolic state name.
+        * \returns String state name.
+        * \throw Exception Invalid state.
+        *
+        */
+       static const std::string &getStateName(Code state);
   
        /** Default constructor.
         *
index 839f836..c3c347b 100644 (file)
@@ -234,11 +234,25 @@ edg_wll_QueryResults edg_wll_StringToQResult(const char *name);
 #define EDG_WLL_SEQ_NORMAL      1
 #define EDG_WLL_SEQ_DUPLICATE   11
 #define EDG_WLL_SEQ_PBS                2
+#define EDG_WLL_SEQ_CONDOR     3
 
 /**
  * initial sequence code for BigHelper
  */
-#define EDG_WLL_SEQ_BIGHELPER_INITIAL "UI=2:NS=0:WM=0:BH=1:JSS=0:LM=0:LRMS=0:APP=0"
+#define EDG_WLL_SEQ_BIGHELPER_INITIAL  "UI=000002:NS=0000000000:WM=000000:BH=0000000001:JSS=000000:LM=000000:LRMS=000000:APP=000000:LBS=000000"
+
+/**
+ * the wms purger uses this sequence code while logging the cleared event
+ * agreed with Salvatore Monforte
+ */
+#define EDG_WLL_SEQ_CLEAR      "UI=000009:NS=0000096669:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000:LBS=000000"
+
+/**
+ * used for logging abort event by wms components
+ * agreed with Francesco Giacomini
+ */
+#define EDG_WLL_SEQ_ABORT      "UI=000000:NS=0000096660:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000:LBS=000000"
+
 
 /** Retrieve current sequence code from the context */
 char * edg_wll_GetSequenceCode(
index 1ba8356..f9f5693 100644 (file)
@@ -309,6 +309,7 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
                $event->getTypes) {
        my $tl = lcfirst $t;
        if ($tl =~ m/^pBS/) { $tl = ucfirst $tl; }
+       if ($tl =~ m/^condor/) { $tl = ucfirst $tl; }
        gen $indent."edg_wll_${t}Event\t${tl};\n";
 }
 @@@}
index 3bfacd0..e6996e6 100644 (file)
 
        Revision history:
        $Log$
+       Revision 1.6.2.1  2007/04/29 15:54:38  jpospi
+       cleanup: fix wrong staging, skip make doc in LB_STANDALONE
+
+       Revision 1.6  2007/02/03 19:27:15  jpospi
+       first step to remove the ant dependency
+
        Revision 1.5  2005/08/03 09:30:10  akrenek
        Merged the release 1.0 branch
 
@@ -78,7 +84,7 @@
                        <echo file="${module.build.dir}/Makefile.inc">
 top_srcdir=..
 builddir=build
-stagedir=${stage.dir}
+stagedir=${stage.abs.dir}
 distdir=${dist.dir}
 package=${module.package.name}
 globalprefix=${global.prefix}
@@ -86,19 +92,5 @@ lbprefix=${subsystem.prefix}
 PREFIX=${install.dir}
 version=${module.version}
                        </echo>
-                       <copy file="${component.dir}/doc/C.dox" 
-                               tofile="${module.build.dir}/C.dox" 
-                               preservelastmodified="true"
-                               overwrite="true" />
-                       <copy file="${component.dir}/doc/CPP.dox" 
-                               tofile="${module.build.dir}/CPP.dox" 
-                               preservelastmodified="true"
-                               overwrite="true" />
-                       <echo file="${module.build.dir}/C.dox" append="true" >
-PROJECT_NUMBER        = ${module.version}
-                       </echo>
-                       <echo file="${module.build.dir}/CPP.dox" append="true" >
-PROJECT_NUMBER         = ${module.version}
-                       </echo>
            </target>
        </project>
index a34c737..29918df 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Sep 02 14:16:31 CEST 2005
-# glite-lb-client-interface_branch_3_0_0_RC15 tag is taken!
-module.version=2.3.0
+# $Id$
+# $Name$
+module.version=2.3.2
 module.age=1
index a49d050..9f4b867 100644 (file)
@@ -134,8 +134,7 @@ PLUSLIB:=libglite_lb_clientpp_${nothrflavour}.la
 THRPLUSLIB:=libglite_lb_clientpp_${thrflavour}.la
 
 TOOLS:=dump load purge lb_dump_exporter ${LB_PERF_TOOLS}
-EXAMPLES:=log_usertag_proxy job_log job_reg feed_shark notify query_ext query_seq_code stats abort_job change_acl stresslog
-EXAMPLES:=log_usertag_proxy job_log job_reg feed_shark notify query_ext query_seq_code stats abort_job change_acl stresslog lbmon flood_proxy dagids stress_context
+EXAMPLES:=log_usertag_proxy job_log job_reg feed_shark notify query_ext query_seq_code stats abort_job change_acl stresslog flood_proxy dagids stress_context parse_eventsfile
 
 EXAMPLES_CL=user_jobs job_status 
 EXAMPLES_CL_THR=user_jobs_threaded
@@ -152,6 +151,8 @@ offset=0
 version_info:=-version-info ${shell \
        perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' }
 
+default: all
+
 ${LIB}: ${LIBOBJS}
        ${LINK} ${version_info} -o $@ ${LIBLOBJS} -rpath ${PREFIX}/lib \
                        ${COMMON_LIB} \
@@ -311,6 +312,10 @@ endif
        ${INSTALL} -m 644 ${MAN_GZ} ${PREFIX}/share/man/man1
 
 clean:
+       rm -rf *.o *.lo .libs lib* *.c *.cpp producer_test
+       rm -rf ${LIB} ${THRLIB} ${TOOLS} logevent ${PLUSLIB} ${THRPLUSLIB} ${MAN_GZ}
+       rm -rf ${EXAMPLES} ${EXAMPLES_CL} ${EXAMPLES_CL_THR} ${sh_PROGS}
+
 
 check_version:
        ${CHECK_VERSION} ${stagedir}/include/glite/lb/interface_version.h
diff --git a/org.glite.lb.client/examples/lbmon.c b/org.glite.lb.client/examples/lbmon.c
deleted file mode 100644 (file)
index 2d466b9..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-#ident "$Header$"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <getopt.h>
-#include <time.h>
-
-#include "glite/lb/consumer.h"
-
-static void usage(char *);
-static int query_all(edg_wll_Context, int, struct timeval, edg_wll_JobStat **, edg_wlc_JobId **);
-static void dgerr(edg_wll_Context,char *);
-
-static char    *myname = NULL;
-static int     debug = 0, verbose = 0, lbproxy =0;
-static const char rcsid[] = "@(#)$Id$";
-
-static struct option const long_options[] = {
-        { "help", no_argument, 0, 'h' },
-        { "version", no_argument, 0, 'V' },
-        { "verbose", no_argument, 0, 'v' },
-        { "debug", no_argument, 0, 'd' },
-        { "lbproxy", required_argument, 0, 'x' },
-        { NULL, 0, NULL, 0}
-};
-
-int main(int argc,char *argv[]) {
-       edg_wll_Context         ctx;
-       edg_wll_JobStat         *statesOut = NULL;
-       edg_wlc_JobId           *jobsOut = NULL;
-       struct timeval time_now;
-
-       int i, result, opt, nJobs;
-       i = result = opt = 0;
-       gettimeofday(&time_now,0);
-
-       myname = argv[0];
-       fprintf(stdout,"\n");
-       /* get arguments */
-       while ((opt = getopt_long(argc,argv,
-               "h"  /* help */
-               "V"  /* version */
-               "v"  /* verbose */
-               "d"  /* debug */
-               "x", /* lbproxy */
-               long_options, (int *) 0)) != EOF) {
-
-               switch (opt) {
-                       case 'V': fprintf(stdout,"%s:\t%s\n",argv[0],rcsid); exit(0);
-                       case 'v': verbose = 1; break;
-                       case 'd': debug = 1; break;
-                       case 'x': lbproxy = 1; break;
-                       case 'h':
-                       default:
-                               usage(argv[0]); exit(0);
-               }
-       }
-       if ( edg_wll_InitContext(&ctx) ) {
-               fprintf(stderr,"%s: cannot initialize edg_wll_Context\n ",myname);
-               exit(1);
-       }
-
-       if ( (result = query_all(ctx, EDG_WLL_JOB_CLEARED, time_now, &statesOut, &jobsOut)) ) {
-               dgerr(ctx, "edg_wll_QueryJobs");
-       } else {
-               fprintf(stdout,"Number of jobs... ");
-       }
-
-       nJobs = 0;
-       if ( jobsOut ) {
-               for (i=0; jobsOut[i]; i++) edg_wlc_JobIdFree(jobsOut[i]); {
-                       nJobs++;
-                       free(jobsOut);
-               }
-       }
-       if ( statesOut ) {
-               for (i=0; statesOut[i].state; i++) edg_wll_FreeStatus(&statesOut[i]);
-                       free(statesOut);
-                }
-       edg_wll_FreeContext(ctx);
-
-
-       return result;
-}
-
-static void
-usage(char *name) {
-       fprintf(stderr,"Usage: %s [-x]\n", name);
-}
-
-static int
-query_all(edg_wll_Context ctx, int query_status, struct timeval query_time, edg_wll_JobStat **statesOut, edg_wlc_JobId **jobsOut) {
-       edg_wll_QueryRec        jc[3];
-       int                     ret;
-
-       memset(jc, 0, sizeof jc);
-
-       /* jobs in the state 'query_status' within last hour */
-       jc[0].attr = EDG_WLL_QUERY_ATTR_STATUS;
-       jc[0].op = EDG_WLL_QUERY_OP_EQUAL;
-       jc[0].value.i = query_status;
-       jc[1].attr = EDG_WLL_QUERY_ATTR_TIME;
-       jc[1].attr_id.state = query_status;
-       jc[1].op = EDG_WLL_QUERY_OP_WITHIN;
-       jc[1].value.t.tv_sec = query_time.tv_sec - 3600;
-       jc[1].value.t.tv_usec = query_time.tv_usec;
-       jc[1].value2.t.tv_sec = query_time.tv_sec;
-       jc[1].value2.t.tv_usec = query_time.tv_usec;
-       jc[2].attr = EDG_WLL_QUERY_ATTR_UNDEF;
-
-       if ( (ret = edg_wll_QueryJobs(ctx, jc, 0, jobsOut, statesOut)) ) {
-               if ( ret == E2BIG ) {
-                       int r;
-                       if ( edg_wll_GetParam(ctx, EDG_WLL_PARAM_QUERY_RESULTS, &r) ) return ret;
-                       if ( r != EDG_WLL_QUERYRES_LIMITED ) return ret;
-
-                       fprintf(stderr," edg_wll_QueryJobs() Warning: only limited result returned!\n");
-                       return 0;
-               } else return ret;
-       }
-
-       return ret;
-}
-
-static void
-dgerr(edg_wll_Context ctx,char *where) {
-       char    *etxt,*edsc;
-
-       edg_wll_Error(ctx,&etxt,&edsc);
-       fprintf(stderr,"%s: %s: %s",myname,where,etxt);
-       if (edsc) fprintf(stderr," (%s)",edsc);
-       putc('\n',stderr);
-       if(etxt) free(etxt); 
-       if(edsc) free(edsc);
-}
diff --git a/org.glite.lb.client/examples/parse_eventsfile.c b/org.glite.lb.client/examples/parse_eventsfile.c
new file mode 100644 (file)
index 0000000..16e8019
--- /dev/null
@@ -0,0 +1,116 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#include "glite/lb/producer.h"
+#include "glite/lb/events.h"
+#include "glite/lb/events_parse.h"
+
+#define        MAXMSGSIZE      10240
+
+extern char *optarg;
+extern int opterr,optind;
+
+static const char *me;
+
+static void usage()
+{
+       fprintf(stderr,"usage: %s [-n] -f file_name\n", me);
+}
+
+int main(int argc, char *argv[])
+{
+       char    *filename = NULL;
+       char    buf[MAXMSGSIZE];
+       int     done = 0,i=0,notif=0;
+       edg_wll_Context ctx;
+       edg_wll_Event   *event = NULL;
+       FILE    *f;
+       edg_wll_ErrorCode (*parse)(edg_wll_Context context,edg_wll_LogLine logline,edg_wll_Event **event);
+       edg_wll_LogLine (*unparse)(edg_wll_Context context,edg_wll_Event *event);
+       const char *parse_str,*unparse_str;
+
+       edg_wll_InitContext(&ctx);
+       opterr = 0;
+
+       me = strdup(argv[0]);
+
+       do {
+               switch (getopt(argc,argv,"nf:")) {
+                       case 'n': notif = 1; break;
+                       case 'f': filename = (char *) strdup(optarg); break;
+                       case '?': usage(); exit(EINVAL);
+                       case -1: done = 1; break;
+               }
+       } while (!done);
+
+       /* choose the right (un)parser */
+       if (notif) {
+               parse = edg_wll_ParseNotifEvent;
+               parse_str = "edg_wll_ParseNotifEvent";
+               unparse = edg_wll_UnparseNotifEvent;
+               unparse_str = "edg_wll_UnparseNotifEvent";
+       } else {
+               parse = edg_wll_ParseEvent;
+               parse_str = "edg_wll_ParseEvent";
+               unparse = edg_wll_UnparseEvent;
+               unparse_str = "edg_wll_UnparseEvent";
+       }
+
+       if (!filename) {
+               fprintf(stderr,"%s: -f required\n",me);
+               usage();
+               exit(1);
+       }
+
+       if ( (f = fopen(filename,"r")) == NULL) {
+               perror(filename);
+               exit(1);
+       } else {
+               fprintf(stderr,"Parsing file '%s' for correctness:\n",filename);
+       }
+       
+       /* parse events */
+       i = 1;
+       while (!feof(f)) {
+               if (!fgets(buf,sizeof(buf),f)) break;
+               if (strcmp(buf,"\n")) {
+                       // fprintf(stdout,"%d: %s\n",i,buf);
+
+                       if (parse(ctx,buf,&event) != 0) {
+                               /* Parse ERROR: */
+                               char    *et=NULL,*ed=NULL;
+
+                               edg_wll_Error(ctx,&et,&ed);
+                               fprintf(stderr,"line %d: %s() error: %s (%s)\n",i,parse_str,et,ed);
+                               if (et) free(et);
+                               if (ed) free(ed);
+                       } else {
+                               /* Parse OK : */
+                               char    *es=NULL;
+                               edg_wll_LogLine logline = NULL;
+
+                               es=edg_wll_EventToString(event->type);
+                               logline = unparse(ctx,event);
+                               fprintf(stderr,"line %d: %s() o.k. (event %s), ",i,parse_str,es);
+                               if (logline) {
+                                       fprintf(stderr,"%s() o.k.\n",unparse_str);
+                                       free(logline);
+                               } else {
+                                       fprintf(stderr,"%s() error\n",unparse_str);
+                               }
+                               if (es) free(es);
+                       }
+                       if (event) edg_wll_FreeEvent(event);
+               }
+               i++;
+       }
+       fclose(f);
+
+       edg_wll_FreeContext(ctx);
+
+       return 0;
+}
index 8f47414..39773a6 100644 (file)
@@ -21,7 +21,7 @@ static const char *me;
 
 static void usage()
 {
-       fprintf(stderr,"usage: %s [-m bkserver] [-x] [-n jobs] [-f file_name]\n", me);
+       fprintf(stderr,"usage: %s -m bkserver [-x] [-N numjobs] [-n subjobs (each)] -f file_name \n", me);
 }
 
 int main(int argc, char *argv[])
@@ -35,18 +35,17 @@ int main(int argc, char *argv[])
        FILE    *f;
 
        edg_wll_InitContext(&ctx);
+
        opterr = 0;
 
        me = strdup(argv[0]);
 
        do {
-               switch (getopt(argc,argv,"m:xn:f:")) {
+               switch (getopt(argc,argv,"m:xN:n:f:")) {
                        case 'm': server = strdup(optarg); break;
                        case 'x': lbproxy = 1; break;
-                       case 'n': 
-                               njobs = atoi(optarg); 
-                               fprintf(stderr,"WARNING: -n option not implemented yet\n");
-                               break;
+                       case 'N': njobs = atoi(optarg); break;
+                       case 'n': num_subjobs = atoi(optarg); break;
                        case 'f': filename = (char *) strdup(optarg); break;
                        case '?': usage(); exit(EINVAL);
                        case -1: done = 1; break;
@@ -59,7 +58,7 @@ int main(int argc, char *argv[])
                exit(1);
        }
 
-       if (njobs <= 0) {
+       if ((njobs <= 0) || (num_subjobs)) {
                fprintf(stderr,"%s: wrong number of jobs\n",me);
                usage();
                exit(1);
@@ -76,13 +75,15 @@ int main(int argc, char *argv[])
                exit(1);
        }
        
+/* MAIN LOOP */
+for (i = 1; i<njobs; i++) {
        /* create jobid */
        if (!job) {
                char *p = strchr(server,':');
                if (p) *p=0;
                edg_wlc_JobIdCreate(server,p?atoi(p+1):0,&jobid);
                job = edg_wlc_JobIdUnparse(jobid);
-               // fprintf(stdout,"new jobid: %s\n",job);
+               fprintf(stdout,"new jobid: %s\n",job);
        }
        else if ((errno = edg_wlc_JobIdParse(job,&jobid))) {
                perror(job);
@@ -92,9 +93,10 @@ int main(int argc, char *argv[])
        /* register */
        edg_wll_SetParam(ctx,EDG_WLL_PARAM_SOURCE,EDG_WLL_SOURCE_USER_INTERFACE);
        // edg_wll_SetParam(ctx,EDG_WLL_PARAM_SOURCE,edg_wll_StringToSource(src));
+
        if (lbproxy) {
                if (edg_wll_RegisterJobProxy(ctx,jobid,
-                       num_subjobs?EDG_WLL_REGJOB_DAG:EDG_WLL_REGJOB_SIMPLE,
+                       num_subjobs?EDG_WLL_REGJOB_COLLECTION:EDG_WLL_REGJOB_SIMPLE,
                        "JDL: blabla", "NNNSSSS",
                        num_subjobs,NULL,&subjobs))
                {
@@ -105,7 +107,7 @@ int main(int argc, char *argv[])
                }
        } else {
                if (edg_wll_RegisterJobSync(ctx,jobid,
-                       num_subjobs?EDG_WLL_REGJOB_DAG:EDG_WLL_REGJOB_SIMPLE,
+                       num_subjobs?EDG_WLL_REGJOB_COLLECTION:EDG_WLL_REGJOB_SIMPLE,
                        "JDL: blabla", "NNNSSSS",
                        num_subjobs,NULL,&subjobs))
                {
@@ -117,7 +119,6 @@ int main(int argc, char *argv[])
        }
 
        /* log events */
-       i = 1;
        while (!feof(f)) {
                edg_wll_LogLine logline;
 
@@ -142,16 +143,15 @@ int main(int argc, char *argv[])
                        }
                        if (logline) free(logline);
                }
-               i++;
        }
-       fclose(f);
+       rewind(f);
+       if (job) free(job); job = NULL;
 
        /* seq. code */
        seq = edg_wll_GetSequenceCode(ctx);
-       fprintf(stdout,"\n%s=\"%s\"\n",num_subjobs?"EDG_WL_DAG_JOBID":"EDG_JOBID",job);
+       fprintf(stdout,"\n%s=\"%s\"\n",num_subjobs?"EDG_WL_COLLECTION_JOBID":"EDG_JOBID",job);
        fprintf(stdout,"EDG_WL_SEQUENCE=\"%s\"\n",seq);
        free(seq);
-       free(job);
 
        if (num_subjobs) for (i=0; subjobs[i]; i++) {
                char    *job_s = edg_wlc_JobIdUnparse(subjobs[i]);
@@ -159,6 +159,9 @@ int main(int argc, char *argv[])
                free(job_s);
        }
 
+} /* MAIN LOOP */
+
+       fclose(f);
        edg_wll_FreeContext(ctx);
 
        return 0;
index b86627e..af629d9 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Sep 02 14:17:41 CEST 2005
-# glite-lb-client_branch_3_0_0_RC15 tag is taken!
-module.version=2.3.0
+# $Id$
+# $Name$
+module.version=2.3.3
 module.age=1
index 6e3ac3e..7b4ef43 100644 (file)
@@ -40,6 +40,7 @@ sub typeswitch {
                if($ctype{$f->{type}}) {
                  my $cstr = $ftype eq '_common_' ? 'any' : lcfirst $ftype;
                  if ($cstr =~ m/^pBS/) { $cstr = ucfirst $cstr; }
+                 if ($cstr =~ m/^condor/) { $cstr = ucfirst $cstr; }
                  my $cname = getName $f 'C';
                  gen "$indent\tcase Event::".uc($f->{name}).": return(cev->$cstr.$cname);\n";
                } elsif (($f->{type} eq "int") && 
@@ -48,6 +49,7 @@ sub typeswitch {
                  # conversion from int to string (well, enum to string)
                  my $cstr = $ftype eq '_common_' ? 'any' : lcfirst $ftype;
                  if ($cstr =~ m/^pBS/) { $cstr = ucfirst $cstr; }
+                 if ($cstr =~ m/^condor/) { $cstr = ucfirst $cstr; }
                  my $cname = getName $f 'C';
                  my $fn = $ftype eq '_common_' ? "" : ucfirst $ftype;
                  my $c =  $fn . ucfirst $f->{name}; 
@@ -130,6 +132,62 @@ badattr:
        return -1; /* gcc, shut up! */
 }
 
+float Event::getValFloat(Attr attr)    const
+{
+       edg_wll_Event const     *cev = (edg_wll_Event *) flesh->ptr;
+
+@@@{
+       $indent = "\t";
+       typeswitch '_common_',undef,'float';
+@@@}
+
+       switch (cev->type) {
+@@@{
+       $indent = "\t\t";
+       for my $t (getTypes $event) {
+               gen "\t\tcase ".uc($t).":\n";
+               typeswitch $t,'goto badattr;','float';
+       }
+@@@}
+               default:
+                 STACK_ADD;
+                 throw(Exception(EXCEPTION_MANDATORY, EINVAL,
+                                 "attribute is not of float type"));
+        }
+badattr:
+        STACK_ADD;
+        throw(Exception(EXCEPTION_MANDATORY, ENOENT, "invalid attribute"));
+       return -1; /* gcc, shut up! */
+}
+
+double Event::getValDouble(Attr attr)  const
+{
+       edg_wll_Event const     *cev = (edg_wll_Event *) flesh->ptr;
+
+@@@{
+       $indent = "\t";
+       typeswitch '_common_',undef,'double';
+@@@}
+
+       switch (cev->type) {
+@@@{
+       $indent = "\t\t";
+       for my $t (getTypes $event) {
+               gen "\t\tcase ".uc($t).":\n";
+               typeswitch $t,'goto badattr;','double';
+       }
+@@@}
+               default:
+                 STACK_ADD;
+                 throw(Exception(EXCEPTION_MANDATORY, EINVAL,
+                                 "attribute is not of double type"));
+        }
+badattr:
+        STACK_ADD;
+        throw(Exception(EXCEPTION_MANDATORY, ENOENT, "invalid attribute"));
+       return -1; /* gcc, shut up! */
+}
+
 static char const *get_string_val(const edg_wll_Event *cev, Event::Attr attr)
 {
 @@@{
@@ -269,9 +327,8 @@ std::string const attr_names[Event::ATTR_MAX] = {
 @@@}
 };
 
-
 const std::string & 
-Event::getAttrName(Attr attr) const
+Event::getAttrName(Attr attr)
 {
   if (attr<0 || attr>=ATTR_MAX) {
     STACK_ADD;
@@ -329,6 +386,17 @@ std::vector<std::pair<Event::Attr,Event::AttrType> > const & Event::getAttrs(voi
 }
 
 
+const std::string Event::getEventName(Type type)
+{
+       if(type < 0 || type >= TYPE_MAX) {
+               STACK_ADD;
+               throw(Exception(EXCEPTION_MANDATORY, EINVAL, "invalid event type"));
+       }
+
+       return std::string(edg_wll_EventToString(edg_wll_EventCode(type)));
+}
+
+
 void 
 Event::destroyFlesh(void *in) 
 {
index df9609b..fe09bce 100644 (file)
@@ -414,7 +414,7 @@ static std::string const attr_names[JobStatus::ATTR_MAX] = {
 };
 
 const std::string & 
-JobStatus::getAttrName(JobStatus::Attr attr) const
+JobStatus::getAttrName(JobStatus::Attr attr)
 {
   if (attr<0 || attr>=ATTR_MAX) {
     STACK_ADD;
@@ -468,6 +468,19 @@ JobStatus::getAttrs(void) const
   return attrs;
 }
 
+const std::string &
+JobStatus::getStateName(Code state)
+{
+  if (state<0 || state>=CODE_MAX) {
+    STACK_ADD;
+    throw(Exception(EXCEPTION_MANDATORY, 
+                   EINVAL,
+                   "status code invalid"));
+  }
+  return names[state];
+}
+
+
 void 
 JobStatus::destroyFlesh(void *p)
 {
index 20defdf..f7ed2ed 100644 (file)
@@ -86,15 +86,37 @@ static int read_bool(const edg_wll_Args* o, char* arg, char* par)
     return rs;
 }
 
+static void read_float(const edg_wll_Args* o, char* arg, char* par)
+{
+    float d;
+    if (!par)
+    {
+       printf("Option: %s  - missing float value\n", arg);
+       exit(1);
+    }
+    d = strtof(par,NULL);
+    if (o->min != o->max)
+    {
+       if (d < o->min && d > o->max)
+       {
+           printf("Option: %s  - value: %f  out of range <%d, %d>",
+                  arg, d, o->min, o->max);
+           exit(1);
+       }
+    }
+    if (o->value)
+       *(float*)o->value = d;
+}
+
 static void read_double(const edg_wll_Args* o, char* arg, char* par)
 {
     double d;
     if (!par)
     {
-       printf("Option: %s  - missing double/float value\n", arg);
+       printf("Option: %s  - missing double value\n", arg);
        exit(1);
     }
-    d = atof(par);
+    d = strtod(par,NULL);
     if (o->min != o->max)
     {
        if (d < o->min && d > o->max)
@@ -365,6 +387,9 @@ static void parse_suboptions(const Option* o, const char* oname, char* pars, con
                case Args::Option::BOOL:
                    read_bool(&o[j], arr[i], par, r);
                    break;
+               case Args::Option::FLOAT:
+                   read_float(&o[j], arr[i], par, r);
+                   break;
                case Args::Option::DOUBLE:
                    read_double(&o[j], arr[i], par, r);
                    break;
@@ -446,6 +471,9 @@ static int findOpt(opt_ctx_t* ctx, int olong)
        if (!read_bool(o, arg, par))
            ctx->idx--; // no argument given
        break;
+    case EDG_WLL_ARGS_FLOAT:
+       read_float(o, arg, par);
+       break;
     case EDG_WLL_ARGS_DOUBLE:
        read_double(o, arg, par);
        break;
index 6daaf4e..879dc60 100644 (file)
@@ -5,6 +5,7 @@ typedef enum {
     EDG_WLL_ARGS_BOOL,
     EDG_WLL_ARGS_INT,
     EDG_WLL_ARGS_UINT16,
+    EDG_WLL_ARGS_FLOAT,
     EDG_WLL_ARGS_DOUBLE,
     EDG_WLL_ARGS_STRING,
     EDG_WLL_ARGS_HELP,
index b939e05..f9d0da1 100644 (file)
@@ -97,6 +97,7 @@ int main(int argc, char *argv[])
     my %typetab = (
        "char *", "EDG_WLL_ARGS_STRING",
        "int", "EDG_WLL_ARGS_INT",
+       "double", "EDG_WLL_ARGS_DOUBLE",
        "edg_wlc_JobId", "EDG_WLL_ARGS_JOBID",
        "edg_wll_NotifId", "EDG_WLL_ARGS_NOTIFID",
        "edg_wll_Source", "EDG_WLL_ARGS_SOURCE",
index 402f3e6..51a3152 100644 (file)
@@ -234,6 +234,7 @@ int edg_wll_log_connect(edg_wll_Context ctx, int *conn)
                        ctx->connections->connPool[index].peerPort,index);
 #endif  
 
+#if 0
        /* acquire gss credentials */
        ret = edg_wll_gss_acquire_cred_gsi(
              ctx->p_proxy_filename ? ctx->p_proxy_filename : ctx->p_cert_filename,
@@ -251,6 +252,7 @@ int edg_wll_log_connect(edg_wll_Context ctx, int *conn)
                fprintf(stderr,"edg_wll_log_connect: going on anonymously!\n");
        }
 #endif
+#endif
 #ifdef EDG_WLL_LOG_STUB
        fprintf(stderr,"edg_wll_log_connect: opening connection to local-logger %s:%d\n",
                        ctx->connections->connPool[index].peerName,
@@ -259,6 +261,23 @@ int edg_wll_log_connect(edg_wll_Context ctx, int *conn)
        /* gss_connect */
        if (ctx->connections->connPool[index].gss.context == GSS_C_NO_CONTEXT) {
 
+       /* acquire gss credentials */
+       ret = edg_wll_gss_acquire_cred_gsi(
+             ctx->p_proxy_filename ? ctx->p_proxy_filename : ctx->p_cert_filename,
+             ctx->p_proxy_filename ? ctx->p_proxy_filename : ctx->p_key_filename,
+             &ctx->connections->connPool[index].gsiCred, &my_subject_name, &gss_stat);
+       /* give up if unable to acquire prescribed credentials, otherwise go on anonymously */
+       if (ret && ctx->p_proxy_filename) {
+               edg_wll_SetErrorGss(ctx, "edg_wll_gss_acquire_cred_gsi(): failed to load GSI credentials", &gss_stat);
+               goto edg_wll_log_connect_err;
+       }
+#ifdef EDG_WLL_LOG_STUB
+       if (my_subject_name != NULL) {
+               fprintf(stderr,"edg_wll_log_connect: using certificate: %s\n",my_subject_name);
+       } else {
+               fprintf(stderr,"edg_wll_log_connect: going on anonymously!\n");
+       }
+#endif
                if ((answer = edg_wll_gss_connect(
                                ctx->connections->connPool[index].gsiCred,
                                ctx->connections->connPool[index].peerName,
@@ -283,8 +302,13 @@ edg_wll_log_connect_end:
        edg_wll_poolUnlock();
 
 #ifdef EDG_WLL_LOG_STUB
-       fprintf(stderr,"edg_wll_log_connect: done (remaining timeout %d.%06d sec)\n",
+       if (answer) {
+               fprintf(stderr,"edg_wll_log_connect: error (remaining timeout %d.%06d sec)\n",
                (int) ctx->p_tmp_timeout.tv_sec, (int) ctx->p_tmp_timeout.tv_usec);
+       } else {
+               fprintf(stderr,"edg_wll_log_connect: done o.k. (remaining timeout %d.%06d sec)\n",
+               (int) ctx->p_tmp_timeout.tv_sec, (int) ctx->p_tmp_timeout.tv_usec);
+       }
 #endif
        *conn = index;
        return answer;
index a0b4b62..5be5dc5 100644 (file)
@@ -139,7 +139,7 @@ int edg_wll_DoLogEventProxy(
        memset(&conn,0,sizeof(conn));
 
        /* connect to lbproxy */
-       if ((ret = edg_wll_log_proxy_connect(ctx,&conn)) < 0) {
+       if ((ret = edg_wll_log_proxy_connect(ctx,&conn))) {
                edg_wll_UpdateError(ctx,EDG_WLL_IL_PROTO,"edg_wll_DoLogEventProxy(): edg_wll_log_proxy_write error");
                goto edg_wll_DoLogEventProxy_end;
        }
@@ -183,7 +183,7 @@ int edg_wll_DoLogEventDirect(
        memset(&conn,0,sizeof(conn));
 
        /* connect to bkserver */
-       if ((ret = edg_wll_log_direct_connect(ctx,&conn)) < 0) {
+       if ((ret = edg_wll_log_direct_connect(ctx,&conn))) {
                edg_wll_UpdateError(ctx,EDG_WLL_IL_PROTO,"edg_wll_DoLogEventDirect(): edg_wll_log_direct_connect error");
                goto edg_wll_DoLogEventDirect_end;
        }
@@ -942,12 +942,12 @@ int edg_wll_RegisterJobProxy(
                (int) ctx->p_tmp_timeout.tv_sec, (int) ctx->p_tmp_timeout.tv_usec);
 #endif
        /* connect to bkserver */
-       if ((ret = edg_wll_log_direct_connect(ctx,&con_bkserver)) < 0) {
+       if ((ret = edg_wll_log_direct_connect(ctx,&con_bkserver))) {
                edg_wll_UpdateError(ctx,EAGAIN,"edg_wll_RegisterJobProxy(): edg_wll_log_direct_connect error");
                goto edg_wll_registerjobproxy_end; 
        }
        /* connect to lbproxy */
-       if ((ret = edg_wll_log_proxy_connect(ctx,&con_lbproxy)) < 0) {
+       if ((ret = edg_wll_log_proxy_connect(ctx,&con_lbproxy))) {
                edg_wll_UpdateError(ctx,EAGAIN,"edg_wll_RegisterJobProxy(): edg_wll_log_proxy_connect error");
                goto edg_wll_registerjobproxy_end; 
        }
index 4f050e9..5e9a913 100644 (file)
@@ -120,7 +120,7 @@ REPORTS:=${top_srcdir}/reports
 ifdef LB_PERF
 STAGE_PERFTEST=mkdir -p ${PREFIX}/examples/perftest; \
                install -m 644 ${top_srcdir}/examples/*.log ${PREFIX}/examples/perftest; \
-               install -m 755 ${top_srcdir}/src/perftest_common.sh ${PREFIX}/sbin
+               mkdir -p ${PREFIX}/sbin; install -m 755 ${top_srcdir}/src/perftest_common.sh ${PREFIX}/sbin
 else
 STAGE_PERFTEST=true
 endif
@@ -236,7 +236,7 @@ install:
        fi
 
 clean:
-       rm -rf *.o *.lo .libs lib*
+       rm -rf *.o *.lo .libs lib* *.c test_parse il_test
 
 
 %.o: %.c
index 70f16ad..a777725 100644 (file)
@@ -15,8 +15,10 @@ extern "C" {
        
 #define EDG_WLL_SEQ_NULL "UI=000000:NS=0000000000:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000:LBS=000000"
 #define EDG_WLL_SEQ_PBS_NULL "TIMESTAMP=00000000000000:POS=0000000000:EV.CODE=000:SRC=?" 
+#define EDG_WLL_SEQ_CONDOR_NULL EDG_WLL_SEQ_PBS_NULL
 #define EDG_WLL_SEQ_SIZE        103    /* strlen(EDG_WLL_SEQ_NULL)+1 */
 #define EDG_WLL_SEQ_PBS_SIZE   57      /* strlen(EDG_WLL_SEQ_PBS_NULL)+1 */
+#define EDG_WLL_SEQ_CONDOR_SIZE EDG_WLL_SEQ_PBS_SIZE
 
 typedef struct _edg_wll_SeqCode {
        unsigned int    type;                           /* seq code type    */
@@ -26,7 +28,7 @@ typedef struct _edg_wll_SeqCode {
                                /* 25-39 POS=%010u: */
                                /* 40-51 EV.CODE=%03d: */
                                /* 53-56 SRC=%c */
-                               
+       char            condor[EDG_WLL_SEQ_CONDOR_SIZE];                        
 } edg_wll_SeqCode;
 
 /* non-gsi one-element analogy of connPool for L&B Proxy server */
index a5361b3..91036fe 100644 (file)
@@ -100,6 +100,7 @@ void edg_wll_add_string_to_XMLBody(char **body, const char *toAdd, const char *t
 void edg_wll_add_tagged_string_to_XMLBody(char **body, const char *toAdd, const char *tag, const char *name, const char *tag2, const char *null);
 void edg_wll_add_int_to_XMLBody(char **body, const int toAdd, const char *tag, const int null);
 void edg_wll_add_float_to_XMLBody(char **body, const float toAdd, const char *tag, const float null);
+void edg_wll_add_double_to_XMLBody(char **body, const double toAdd, const char *tag, const double null);
 void edg_wll_add_timeval_to_XMLBody(char **body, struct timeval toAdd, const char *tag, const struct timeval null);
 void edg_wll_add_jobid_to_XMLBody(char **body, edg_wlc_JobId toAdd, const char *tag, const void *null);
 void edg_wll_add_notifid_to_XMLBody(char **body, edg_wll_NotifId toAdd, const char *tag, const void *null);
@@ -119,6 +120,7 @@ edg_wll_NotifId edg_wll_from_string_to_notifid(edg_wll_XML_ctx *XMLCtx);
 edg_wll_JobStatCode edg_wll_from_string_to_edg_wll_JobStatCode(edg_wll_XML_ctx *XMLCtx);
 int edg_wll_from_string_to_int(edg_wll_XML_ctx *XMLCtx);
 float edg_wll_from_string_to_float(edg_wll_XML_ctx *XMLCtx);
+double edg_wll_from_string_to_double(edg_wll_XML_ctx *XMLCtx);
 long edg_wll_from_string_to_long(edg_wll_XML_ctx *XMLCtx);
 uint16_t edg_wll_from_string_to_uint16_t(edg_wll_XML_ctx *XMLCtx);
 struct timeval edg_wll_from_string_to_timeval(edg_wll_XML_ctx *XMLCtx);
index 84959b6..7042e91 100644 (file)
@@ -1,3 +1,4 @@
-#Fri Sep 02 14:17:07 CEST 2005
-module.version=5.0.0
+# $Id$
+# $Name$
+module.version=5.0.3
 module.age=1
index 3f5e0a5..8be7d2c 100644 (file)
@@ -34,6 +34,9 @@ int edg_wll_InitContext(edg_wll_Context *ctx)
        /* XXX */
        for (i=0; i<EDG_WLL_PARAM__LAST; i++) edg_wll_SetParam(out,i,NULL);
 
+       out->p_tmp_timeout.tv_sec = out->p_log_timeout.tv_sec;
+       out->p_tmp_timeout.tv_usec = out->p_log_timeout.tv_usec;
+
         out->connections = edg_wll_initConnections();
 //     out->connections->connPool = (edg_wll_ConnPool *) calloc(out->connections->poolSize, sizeof(edg_wll_ConnPool));
        out->connPoolNotif = (edg_wll_ConnPool *) calloc(1, sizeof(edg_wll_ConnPool));
@@ -331,9 +334,12 @@ char *edg_wll_GetSequenceCode(const edg_wll_Context ctx)
                case EDG_WLL_SEQ_PBS:
                        ret = strdup(ctx->p_seqcode.pbs);
                        break;
-               default:
-                       assert(0);      /* seq. number type  was not correctly set */
+               case EDG_WLL_SEQ_CONDOR:
+                       ret = strdup(ctx->p_seqcode.condor);
                        break;
+               default:
+                       edg_wll_SetError(ctx,EINVAL,"edg_wll_GetSequenceCode(): sequence code type");
+                       return NULL;
        }
        
        return ret;
@@ -392,6 +398,12 @@ int edg_wll_SetSequenceCode(edg_wll_Context ctx,
                        else
                                strncpy(ctx->p_seqcode.pbs, seqcode_str, sizeof(ctx->p_seqcode.pbs));
                        break;
+               case EDG_WLL_SEQ_CONDOR:
+                       if (!seqcode_str) 
+                               memset(&ctx->p_seqcode.condor, 0, sizeof ctx->p_seqcode.condor);
+                       else
+                               strncpy(ctx->p_seqcode.condor, seqcode_str, sizeof(ctx->p_seqcode.condor));
+                       break;
                default:
                        return edg_wll_SetError(ctx, EINVAL,
                                "edg_wll_SetSequenceCode(): unrecognized value of seq_type parameter");
index d46529c..7d62fd9 100644 (file)
@@ -279,6 +279,7 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
        my $tu = uc $t;
        my $tl = lcfirst $t;
        if ($tl =~ m/^pBS/) { $tl = ucfirst $tl; }
+       if ($tl =~ m/^condor/) { $tl = ucfirst $tl; }
        gen $indent."case EDG_WLL_EVENT_$tu : \n";
        selectType $event $t;
        for ($event->getFieldsOrdered) {
@@ -332,6 +333,7 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
        my $tu = uc $t;
        my $tl = lcfirst $t;
        if ($tl =~ m/^pBS/) { $tl = ucfirst $tl; }
+       if ($tl =~ m/^condor/) { $tl = ucfirst $tl; }
        gen $indent."case EDG_WLL_EVENT_$tu :\n";
        selectType $event $t;
        for ($event->getFieldsOrdered) {
index 6b83e24..f656175 100644 (file)
@@ -132,6 +132,7 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
        my $tu = uc $t;
        my $tl = lcfirst $t;
        if ($tl =~ m/^pBS/) { $tl = ucfirst $tl; }
+       if ($tl =~ m/^condor/) { $tl = ucfirst $tl; }
        my $misuse = "if (eventcode != EDG_WLL_EVENT_$tu ) MISUSE";
        selectType $event $t;
        for ($event->getFieldsOrdered) {
@@ -259,6 +260,7 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
        my $tu = uc $t;
        my $tl = lcfirst $t;
        if ($tl =~ m/^pBS/) { $tl = ucfirst $tl; }
+       if ($tl =~ m/^condor/) { $tl = ucfirst $tl; }
        my $free = "";
        gen $indent."case EDG_WLL_EVENT_$tu :\n";
        gen "\t\{";
@@ -392,6 +394,7 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
        my $tu = uc $t;
        my $tl = lcfirst $t;
        if ($tl =~ m/^pBS/) { $tl = ucfirst $tl; }
+       if ($tl =~ m/^condor/) { $tl = ucfirst $tl; }
        gen $indent."case EDG_WLL_EVENT_$tu :\n";
        selectType $event $t;
        for ($event->getFieldsOrdered) {
@@ -452,6 +455,7 @@ edg_wll_ErrorCode edg_wll_CompareEvents(
                my $tu = uc $t;
                my $tl = lcfirst $t;
                if ($tl =~ m/^pBS/) { $tl = ucfirst $tl; }
+               if ($tl =~ m/^condor/) { $tl = ucfirst $tl; }
 
                selectType $event $t;
                gen "\t\tcase EDG_WLL_EVENT\_$tu :\n";
@@ -601,7 +605,7 @@ for (i=0; i<table->num; i++) {
        edg_wll_ULMDateToTimeval(value,&this->any.arrived);
       break;
    case ULM_HOST :
-       if (!(((this->any.host) == NULL && (NULL) == NULL) || ((this->any.host)&&(NULL)&& !strcmp(this->any.host,NULL)))) DUPLICITY 
+       if (!(((this->any.host) == NULL) || ((this->any.host)&& !strcmp(this->any.host,"")))) DUPLICITY
        this->any.host = strdup(value);
       break;
    case ULM_LVL :
@@ -613,7 +617,7 @@ for (i=0; i<table->num; i++) {
        this->any.source = edg_wll_StringToSource(value);
       break;
    case EDG_WLL_COMMON_SRC_INSTANCE :
-       if (!(((this->any.src_instance) == NULL && (NULL) == NULL) || ((this->any.src_instance)&&(NULL)&& !strcmp(this->any.src_instance,NULL)))) DUPLICITY 
+       if (!(((this->any.src_instance) == NULL) || ((this->any.src_instance)&& !strcmp(this->any.src_instance,"")))) DUPLICITY
        this->any.src_instance = strdup(value);
       break;
 @@@{
@@ -622,6 +626,7 @@ for (i=0; i<table->num; i++) {
        my $tu = uc $t;
        my $tl = lcfirst $t;
        if ($tl =~ m/^pBS/) { $tl = ucfirst $tl; }
+       if ($tl =~ m/^condor/) { $tl = ucfirst $tl; }
        my $misuse = "if (eventcode != EDG_WLL_EVENT_$tu ) MISUSE";
        selectType $event $t;
        for ($event->getFieldsOrdered) {
@@ -721,6 +726,7 @@ $indent = "   ";
        my $tu = uc $t;
        my $tl = lcfirst $t;
        if ($tl =~ m/^pBS/) { $tl = ucfirst $tl; }
+       if ($tl =~ m/^condor/) { $tl = ucfirst $tl; }
        my $free = "";
 ##     gen $indent."case EDG_WLL_EVENT_$tu :\n";
        gen "\t\{";
index d46736e..700a7e2 100644 (file)
@@ -672,7 +672,7 @@ typedef struct _userdef_T {
  * Internal variables
  */
 
-static const char null[] = "(nil)";
+static const char null[] = "";
 
 #if defined(USE_LOCALE)
 static struct lconv *internalLocaleValues = NULL;
index 1701722..6bf7e6b 100644 (file)
@@ -162,6 +162,17 @@ void edg_wll_add_float_to_XMLBody(char **body, const float toAdd, const char *ta
        }
 }
 
+void edg_wll_add_double_to_XMLBody(char **body, const double toAdd, const char *tag, const double null)
+{
+       if (toAdd != null) {
+                char *newBody;
+
+                trio_asprintf(&newBody,"%s\t\t\t<%s>%|Xf</%s>\r\n", *body, tag, toAdd, tag);
+
+                free(*body);
+                *body = newBody;
+       }
+}
 
 
 /* edg_wll_add_timeval_to_XMLBody(&body, eventsOut[i].any.tv, "timestamp", -1) */
@@ -613,6 +624,20 @@ float edg_wll_from_string_to_float(edg_wll_XML_ctx *XMLCtx)
         return(out);
 }
 
+double edg_wll_from_string_to_double(edg_wll_XML_ctx *XMLCtx)
+{
+        double out = -1;
+       char *s;
+
+       s = edg_wll_UnescapeXML((const char *) XMLCtx->char_buf);
+       if (s) {
+          out = strtod(s, (char **) NULL);
+          free(s);
+       }
+        edg_wll_freeBuf(XMLCtx);
+
+        return(out);
+}
 
 
 long edg_wll_from_string_to_long(edg_wll_XML_ctx *XMLCtx)
index 3b7cecc..418af9e 100644 (file)
@@ -815,6 +815,7 @@ static void endQueryEvents(void *data, const char *el UNUSED_VAR)
                         my $ft = $f->{type};
                        $fo[0] = $fo[0] eq '_common_' ? 'any' : lcfirst $fo[0];
                        if ($fo[0] =~ m/^pBS/) { $fo[0] = ucfirst $fo[0]; }
+                       if ($fo[0] =~ m/^condor/) { $fo[0] = ucfirst $fo[0]; }
                         gen "$bi   XMLCtx->eventsOutGlobal[XMLCtx->position].$fo[0].$t =\n";
                         gen "$bi \tedg_wll_from_string_to_$ft(XMLCtx);\n";
                 }
@@ -828,6 +829,7 @@ static void endQueryEvents(void *data, const char *el UNUSED_VAR)
                                my $u = uc $_;
                                $_ = lcfirst $_;
                                if ($_ =~ m/^pBS/) { $_ = ucfirst $_; }
+                               if ($_ =~ m/^condor/) { $_ = ucfirst $_; }
                                gen "$bi     case EDG_WLL_EVENT_$u :\n";
                                gen "$bi \t  XMLCtx->eventsOutGlobal[XMLCtx->position].$_.$t =\n";
                                gen "$bi \t    edg_wll_from_string_to_$ft(XMLCtx);\n";
index 5045494..4cd50ac 100644 (file)
@@ -16,6 +16,7 @@ class EventParseTest: public  CppUnit::TestFixture
         for my $e ($event->getTypesOrdered) {
                 my $u = lcfirst $e;
                if ($u =~ m/^pBS/) { $u = ucfirst $u; }
+               if ($u =~ m/^condor/) { $u = ucfirst $u; }
                 my $c = getTypeComment $event $e;
                 gen "\tCPPUNIT_TEST($u);\n";
         }
@@ -30,6 +31,7 @@ public:
         for my $e ($event->getTypesOrdered) {
                 my $u = lcfirst $e;
                if ($u =~ m/^pBS/) { $u = ucfirst $u; }
+               if ($u =~ m/^condor/) { $u = ucfirst $u; }
                 my $c = getTypeComment $event $e;
                 gen "\tvoid $u();\n";
         }
@@ -87,6 +89,7 @@ void EventParseTest::regJob()
         for my $e ($event->getTypesOrdered) {
                 my $l = lcfirst $e;
                if ($l =~ m/^pBS/) { $l = ucfirst $l; }
+               if ($l =~ m/^condor/) { $l = ucfirst $l; }
                 my $u = uc $e;
                 my $c = getTypeComment $event $e;
                 gen "
index 59ebe41..d94ccb1 100644 (file)
@@ -220,3 +220,6 @@ ll_test.o: %.o: %.cpp
 
 il_test.o IlTestBase.o server_msgTest.o event_queueTest.o input_queue_socketTest.o event_storeTest.o: %.o: %.cpp
        ${CXX} ${CFLAGS} ${GLOBUSTHRINC} ${TEST_INC} -c $< -o $@
+
+clean:
+       rm -rf .libs/ *.o *.no ${LOGD} ${INTERLOGD} ${NOTIF_INTERLOGD} 
index 117451e..be86f37 100644 (file)
@@ -1,3 +1,3 @@
 #Fri Sep 02 14:18:17 CEST 2005
-module.version=1.4.0
+module.version=1.4.2
 module.age=1
index 6b7b3ce..37dd4f9 100644 (file)
@@ -347,7 +347,7 @@ event_store_quarantine(struct event_store *es)
 int
 event_store_recover(struct event_store *es)
 {
-  struct event_queue *eq_l = NULL, *eq_b, *eq_b_new;
+  struct event_queue *eq_l = NULL, *eq_b;
   struct server_msg *msg;
   char *event_s;
   int fd, ret;
@@ -360,7 +360,7 @@ event_store_recover(struct event_store *es)
   assert(es != NULL);
   
 #if defined(IL_NOTIFICATIONS)
-  eq_b = queue_list_get(es->dest);
+  /* destination queue has to be found for each message separately */
 #else
   /* find bookkepping server queue */
   eq_b = queue_list_get(es->job_id_s);
@@ -532,12 +532,7 @@ event_store_recover(struct event_store *es)
       }
 
 #ifdef IL_NOTIFICATIONS
-    eq_b_new = queue_list_get(msg->dest);
-    if (eq_b_new != eq_b) {
-           free(es->dest);
-           es->dest = strdup(msg->dest);
-           eq_b = eq_b_new;
-    }
+    eq_b = queue_list_get(msg->dest);
 #endif
 
     /* now enqueue to the BS, if neccessary */
@@ -962,10 +957,6 @@ event_store_from_file(char *filename)
                goto out;
        }
 
-#if defined(IL_NOTIFICATIONS)
-       es->dest = dest_name;
-#endif
-
        if((es->last_committed_ls == 0) &&
           (es->last_committed_bs == 0) &&
           (es->offset == 0)) {
index cb2da15..ea4f97e 100644 (file)
@@ -30,8 +30,10 @@ enqueue_msg(struct event_queue *eq, struct server_msg *msg)
                if(notifid_map_set_dest(msg->job_id_s, eq) < 0) 
                        return(-1);
                /* move all events with this notif_id from eq_known to eq */
-               if(eq_known != NULL) 
+               if(eq_known != NULL) {
                        event_queue_move_events(eq_known, eq, msg->job_id_s);
+                       /* XXX - we should kill the old queue too */
+               }
        }
 #endif
 
@@ -340,11 +342,11 @@ handle_msg(il_octet_string_t *event, long offset)
                /* Probably no, because the attempt to recover means we have missed some events,
                   and delivery of this one will not move offset ahead. So try our best and deliver it
                   even if it may cause duplicates on server. */
-               /* COMMENTED OUT:
-                  server_msg_free(msg);
-                  event_store_release(es);
-                  return(0);
-               */
+               /* COMMENTED OUT: uncommented again */
+               server_msg_free(msg);
+               event_store_release(es);
+               return(0);
+               /* */
        } else if(ret == 0) {
                /* we have seen this event already */
                server_msg_free(msg);
index 0f89bea..6bbc328 100644 (file)
@@ -465,7 +465,7 @@ int edg_wll_log_proto_server(edg_wll_GssConnection *con, struct timeval *timeout
                strncpy(outfilename+count_total,".",1); count_total+=1; count=strlen(jobId);
                strncpy(outfilename+count_total,jobId,count); count_total+=count;
                outfilename[count_total]='\0';
-               edg_wll_ll_log(LOG_DEBUG,"o.k.\n");
+//             edg_wll_ll_log(LOG_DEBUG,"o.k.\n");
 
                /* fopen and properly handle the filelock */
 #ifdef LOGD_NOFILE
index a35554f..3b1002d 100644 (file)
@@ -140,7 +140,7 @@ server_msg_init(struct server_msg *msg, il_octet_string_t *event)
        edg_wll_InitContext(&context);
 
        /* parse the notification event */
-       if((ret=edg_wll_ParseNotifEvent(context, event, &notif_event))) {
+       if((ret=edg_wll_ParseNotifEvent(context, event->data, &notif_event))) {
                set_error(IL_LBAPI, ret, "server_msg_init: error parsing notification event");
                return(-1);
        }
index ecfbbc3..2537fbe 100644 (file)
@@ -63,11 +63,17 @@ GLOBUS_LIBS:= -L${globus_prefix}/lib \
        -lglobus_common_${nothrflavour} \
        -lglobus_gssapi_gsi_${nothrflavour} \
 
+archlib:=lib
+host_cpu:=${shell uname -m}
+ifeq (${host_cpu},x86_64)
+    archlib:=lib64
+endif
+
 ifneq (${mysql_prefix},/usr)
        ifeq ($(shell echo ${mysql_version} | cut -d. -f1,2),4.1)
-               mysqlib := -L${mysql_prefix}/lib/mysql
+               mysqlib := -L${mysql_prefix}/${archlib}/mysql
        else
-               mysqlib := -L${mysql_prefix}/lib
+               mysqlib := -L${mysql_prefix}/${archlib}
        endif
 endif
 
@@ -106,17 +112,17 @@ LB_PROXY_LIBS:= \
 
 
 
-glite_lb_proxy: lbproxy.o fake_write2rgma.o ${STATIC_LIB_BK}
+glite-lb-proxy: lbproxy.o fake_write2rgma.o ${STATIC_LIB_BK}
        @echo DEBUG: mysql_version=${mysql_version} mysql_prefix=${mysql_prefix}
        @echo DEBUG: shell: x$(shell echo ${mysql_version} | cut -d. -f1,2)x
        ${LINK} -o $@ lbproxy.o fake_write2rgma.o ${LB_PROXY_LIBS}
 
-glite_lb_proxy_perf: lbproxy.o fake_write2rgma.o ${STATIC_LIB_BK}
+glite-lb-proxy-perf: lbproxy.o fake_write2rgma.o ${STATIC_LIB_BK}
        ${LINK} -o $@ lbproxy.o fake_write2rgma.o ${LB_PROXY_LIBS}
 
 default all: compile
 
-compile: glite_lb_proxy
+compile: glite-lb-proxy
 
 check: compile
        -echo No test so far
@@ -146,7 +152,7 @@ install:
        -mkdir -p ${PREFIX}/share/doc/${package}-${version}
        ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
        ${INSTALL} -m 644 ${top_srcdir}/doc/README ${top_srcdir}/doc/README.deploy ${PREFIX}/share/doc/${package}-${version}
-       ${INSTALL} -m 755 glite_lb_proxy ${PREFIX}/bin/glite-lb-proxy
+       ${INSTALL} -m 755 glite-lb-proxy ${PREFIX}/bin/glite-lb-proxy
        ${INSTALL} -m 644 ${top_srcdir}/config/glite-lb-dbsetup-proxy.sql ${PREFIX}/etc
        ${INSTALL} -m 755 ${top_srcdir}/config/startup ${PREFIX}/etc/init.d/glite-lb-proxy
 
@@ -157,6 +163,7 @@ install:
 
 
 clean:
+       rm -rf *.o .libs glite-lb-proxy
 
 %.c: %.c.T
        rm -f $@
index 63501a5..02f9404 100644 (file)
@@ -1,3 +1,3 @@
 #Fri Sep 02 14:18:53 CEST 2005
-module.version=1.4.0
-module.age=1
+module.version=1.4.1
+module.age=3
index a7447c6..8495a05 100644 (file)
@@ -1,3 +1,3 @@
 #Fri Sep 02 14:17:59 CEST 2005
-module.version=2.2.4
+module.version=2.2.5
 module.age=1
index 1d42a3f..bced95c 100644 (file)
@@ -396,6 +396,7 @@ static int slave(slave_data_init_hnd data_init_hnd, int sock)
                        {
                                kick_client = KICK_HANDLER;
                        } else {
+                               req_cnt++;
                                first_request = 0;
                                to = set_request_to;
                                if ((rv = services[srv].on_request_hnd(conn,to.tv_sec>=0 ? &to : NULL,clnt_data)) == ENOTCONN) {
index 4ba51ff..e9e0f56 100644 (file)
@@ -26,7 +26,7 @@ version=${module.version}
 default all: compile
 
 # disable lb plugin in order to build also with 3.1 JP
-#BUILD_PLUGIN=yes
+BUILD_PLUGIN=yes
 
 GLITE_LB_SERVER_WITH_WS=yes
 
@@ -129,11 +129,17 @@ GLOBUS_LIBS:= -L${globus_prefix}/lib \
 
 gsoap_bin_prefix:=${shell if [ -x  ${gsoap_prefix}/bin/soapcpp2 ]; then echo ${gsoap_prefix}/bin; else echo ${gsoap_prefix}; fi }
 
+archlib:=lib
+host_cpu:=${shell uname -m}
+ifeq (${host_cpu},x86_64) 
+    archlib:=lib64
+endif
+
 ifneq (${mysql_prefix},/usr)
        ifeq ($(shell echo ${mysql_version} | cut -d. -f1,2),4.1)
-               mysqlib := -L${mysql_prefix}/lib/mysql
+               mysqlib := -L${mysql_prefix}/${archlib}/mysql
        else
-               mysqlib := -L${mysql_prefix}/lib
+               mysqlib := -L${mysql_prefix}/${archlib}
        endif
 endif
 
@@ -171,10 +177,10 @@ COMMON_LIBS:= -L${stagedir}/lib  -lglite_lb_common_${nothrflavour} -lglite_secur
 PLUGIN_LIBS:= -L${stagedir}/lib -lglite_lb_common_${nothrflavour}\
        ${classadslib} -lstdc++ ${expatlib} -lexpat\
 
-PLUGIN_LOBJS:= lb_plugin.lo jobstat_supp.lo process_event.lo lbs_db_supp.lo process_event_pbs.lo
+PLUGIN_LOBJS:= lb_plugin.lo jobstat_supp.lo process_event.lo lbs_db_supp.lo process_event_pbs.lo process_event_condor.lo
 
 BKSERVER_BASE_OBJS:= \
-       bkserverd.o il_lbproxy.o get_events.o index.o jobstat.o jobstat_supp.o process_event.o process_event_pbs.o \
+       bkserverd.o il_lbproxy.o get_events.o index.o jobstat.o jobstat_supp.o process_event.o process_event_pbs.o process_event_condor.o \
        seqcode.o write2rgma.o lbs_db.o lbs_db_supp.o lb_html.o lb_http.o lb_proto.o lb_xml_parse.o \
        lb_xml_parse_V21.o \
        lock.o openserver.o query.o userjobs.o db_store.o request.o store.o \
@@ -206,7 +212,7 @@ else
 endif
 
 INDEX_OBJS:= index.o index_parse.o jobstat_supp.o lbs_db.o lbs_db_supp.o openserver.o \
-       jobstat.o process_event.o process_event_pbs.o query.o lock.o get_events.o write2rgma.o index_lex.o \
+       jobstat.o process_event.o process_event_pbs.o process_event_condor.o query.o lock.o get_events.o write2rgma.o index_lex.o \
        lb_authz.o store.o bkindex.o stats.o\
        request.o db_store.o srv_purge.o notif_match.o il_lbproxy.o dump.o lb_xml_parse.o il_notification.o lb_proto.o server_state.o lb_xml_parse_V21.o lb_html.o notification.o seqcode.o userjobs.o load.o
 
@@ -227,17 +233,17 @@ WS_CLIENT_LIBS:= ${GSOAP_LIB} -lglite_lb_common_${nothrflavour} \
 HDRS=index.h lb_authz.h lbs_db.h store.h
 
 LIB_OBJS_BK:= \
-       il_lbproxy.o get_events.o index.o jobstat.o jobstat_supp.o process_event.o process_event_pbs.o \
+       il_lbproxy.o get_events.o index.o jobstat.o jobstat_supp.o process_event.o process_event_pbs.o process_event_condor.o \
        seqcode.o lbs_db.o lbs_db_supp.o lb_html.o lb_http.o lb_proto.o lb_xml_parse.o \
        lb_xml_parse_V21.o \
        lock.o openserver.o query.o userjobs.o db_store.o request.o store.o \
        stored_master.o srv_purge.o server_state.o dump.o lb_authz.o load.o \
        notification.o il_notification.o notif_match.o stats.o
 
-glite_lb_bkserverd: ${NSMAP} ${BKSERVER_OBJS}
+glite-lb-bkserverd: ${NSMAP} ${BKSERVER_OBJS}
        ${LINKXX} -o $@ ${BKSERVER_OBJS} ${BKSERVER_LIBS}
 
-glite_lb_bkindex: ${INDEX_OBJS}
+glite-lb-bkindex: ${INDEX_OBJS}
        ${LINKXX} -o $@ ${INDEX_OBJS} ${INDEX_LIBS}
 
 glite_lb_plugin.la: ${PLUGIN_LOBJS}
@@ -255,7 +261,7 @@ else
 endif
 endif
 
-compile: glite_lb_bkserverd glite_lb_bkindex ${STATIC_LIB_BK} ${PLUGIN_LIB} store.c index.c jp_job_attrs.h
+compile: glite-lb-bkserverd glite-lb-bkindex ${STATIC_LIB_BK} ${PLUGIN_LIB} store.c index.c jp_job_attrs.h
 
 
 check: compile test.xml test.query
@@ -358,7 +364,7 @@ install:
        -mkdir -p ${PREFIX}/include/${globalprefix}/${lbprefix}
        ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
        for p in bkserverd bkindex; do \
-               ${INSTALL} -m 755 "glite_lb_$$p" "${PREFIX}/bin/glite-lb-$$p"; \
+               ${INSTALL} -m 755 "glite-lb-$$p" "${PREFIX}/bin/glite-lb-$$p"; \
        done
 
        for f in dbsetup.sql dbsetup-migrate2transactions.sql index.conf.template; do \
@@ -369,21 +375,18 @@ install:
        ${INSTALL} -m 644 ${top_srcdir}/interface/job-attrs.xsd ${PREFIX}/interface
        ${INSTALL} -m 644 ${top_srcdir}/interface/job-record.xsd ${PREFIX}/interface
 
-       if [ x${DOSTAGE} != xyes ]; then \
-               ${INSTALL} -m 755 ${stagedir}/bin/glite-lb-notif-interlogd ${PREFIX}/bin; \
-       fi
-       if [ x${DOSTAGE} = xyes ]; then \
-               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; \
+       if [ ${stagedir} != ${PREFIX} ]; then ${INSTALL} -m 755 ${stagedir}/bin/glite-lb-notif-interlogd ${PREFIX}/bin; fi
+       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
+       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} ; \
-               if [ x${LB_STANDALONE} = x -a x${PLUGIN_LIB} != x ]; then \
-                       ${INSTALL} -m 755 ${PLUGIN_LIB} ${PREFIX}/lib; \
-               fi; \
-               ${INSTALL} -m 644 ${top_srcdir}/interface/srv_perf.h ${PREFIX}/include/${globalprefix}/${lbprefix}; \
        fi
+       ${INSTALL} -m 644 ${top_srcdir}/interface/srv_perf.h ${PREFIX}/include/${globalprefix}/${lbprefix}
 
 clean:
+       rm -rf *.c *.h *.ch *.xh *.xml *.nsmap *.o *.lo .libs glite-lb-* ${STATIC_LIB_BK} test*
 
 %.c: %.c.T
        rm -f $@
index 597ddaf..8aae539 100755 (executable)
@@ -48,7 +48,10 @@ start()
                [ -d "$GLITE_LB_EXPORT_JPREG_MAILDIR" ] || mkdir -p "$GLITE_LB_EXPORT_JPREG_MAILDIR" && chown $GLITE_USER:$GLITE_GROUP -R "$GLITE_LB_EXPORT_JPREG_MAILDIR"
                maildir="--jpreg-dir $GLITE_LB_EXPORT_JPREG_MAILDIR"
        fi
-       super="--super-users-file $GLITE_LOCATION/etc/LB-super-users"
+
+       if test -r "$GLITE_LOCATION/etc/LB-super-users"; then
+               super="--super-users-file $GLITE_LOCATION/etc/LB-super-users"
+       fi
 
        [ -z "$creds" ] && echo $0: WARNING: No credentials specified. Using default lookup which is dangerous. >&2
 
index f2465c1..5347295 100644 (file)
@@ -1,3 +1,4 @@
-#Fri Sep 02 14:18:35 CEST 2005
-module.version=1.5.1
+# $Id$
+# $Name$
+module.version=1.5.5
 module.age=1
index 7f7dcba..16e7da3 100644 (file)
 #include "lbs_db.h"
 #include "jobstat.h"
 
+#ifdef LB_PERF
+#include "glite/lb/lb_perftest.h"
+#include "glite/lb/srv_perf.h"
+
+enum lb_srv_perf_sink sink_mode;
+#endif
+
+
 static struct option opts[] = {
        { "mysql",1,NULL,'m' },
        { "remove",0,NULL,'R' },
index c50d946..dd52f5f 100644 (file)
@@ -303,6 +303,7 @@ struct clnt_data_t {
 int main(int argc, char *argv[])
 {
        int                                     fd, i;
+       int                     dtablesize;
        struct sockaddr_in      a;
        char                       *mysubj = NULL;
        int                                     opt;
@@ -322,6 +323,9 @@ int main(int argc, char *argv[])
        int                     silent = 0;
 
 
+       /* keep this at start of main() ! */
+       dtablesize = getdtablesize();
+       for (fd=3; fd < dtablesize ; fd++) close(fd);
 
        name = strrchr(argv[0],'/');
        if (name) name++; else name = argv[0];
@@ -437,8 +441,6 @@ int main(int argc, char *argv[])
 
        semkey = ftok(pidfile,0);
 
-       if (!debug) for (fd=3; fd<OPEN_MAX; fd++) close(fd);
-
        if (check_mkdir(dumpStorage)) exit(1);
        if (check_mkdir(purgeStorage)) exit(1);
        if ( jpreg ) {
@@ -1086,7 +1088,7 @@ int bk_accept_store(int conn, struct timeval *timeout, void *cdata)
                        /*
                         *      unknown error - do rather return (<0) (slave will be killed)
                         */
-                       return -1;
+                       return -EIO;
                } 
                free(errt); free(errd);
        }
@@ -1153,7 +1155,7 @@ int bk_accept_serve(int conn, struct timeval *timeout, void *cdata)
                        /*
                         *      unknown error - do rather return (<0) (slave will be killed)
                         */
-                       return -1;
+                       return -EIO;
                } 
                free(errt); free(errd);
        }
@@ -1445,9 +1447,8 @@ static int read_roots(const char *file)
                return 0;
        }
 
-       while (!feof(roots)) {
+       while (fgets(buf,sizeof buf,roots) != NULL) {
                char    *nl;
-               fgets(buf,sizeof buf,roots);
                nl = strchr(buf,'\n');
                if (nl) *nl = 0;
 
index c58c523..306921b 100644 (file)
@@ -122,6 +122,7 @@ static void edg_wll_set_event_field(
                        my $uctype = uc $_;
                        my $flctype = lcfirst $_;
                        if ($flctype =~ m/^pBS/) { $flctype = ucfirst $flctype; }
+                       if ($flctype =~ m/^condor/) { $flctype = ucfirst $flctype; }
                        my $frs = $f->{codes} ?
                                "event->$flctype.$name = edg_wll_StringTo$_${fucname}(value);" :
                                fromString $f 'value',"event->$flctype.$name";
index fd85f92..654ef2a 100644 (file)
@@ -1,5 +1,6 @@
 #ident "$Header$"
 
+#include <syslog.h>
 #include "glite/lb/context-int.h"
 #include "glite/lb/log_proto.h"
 
@@ -52,7 +53,13 @@ edg_wll_EventSendProxy(
 
        if ( edg_wll_log_event_send(ctx, lbproxy_ilog_socket_path, filepos,
                                                event, strlen(event), 1, &ctx->p_tmp_timeout) ) {
-               edg_wll_UpdateError(ctx, 0, "edg_wll_log_event_send()");
+               char *errt, *errd;
+               errt = errd = NULL;
+       
+               edg_wll_UpdateError(ctx, EDG_WLL_IL_PROTO, "edg_wll_log_event_send()");
+               edg_wll_Error(ctx, &errt, &errd);
+               syslog(LOG_ERR,"%s (%s)", errt, errd);
+               free(errt); free(errd);
                _err(-1);
        }
 
@@ -61,7 +68,12 @@ out:
        if ( event_file ) free(event_file);
 
        if ( !err ) return 0;
-       edg_wll_UpdateError(ctx, 0, "edg_wll_EventSendProxy()");
-       if ( err < 0 ) return 0;
-       return edg_wll_Error(ctx, NULL, NULL);
+       if ( err < 0 ) {
+               /* do not propagate IL errors */
+               edg_wll_ResetError(ctx);
+               return 0;
+       } else {
+               edg_wll_UpdateError(ctx, 0, "edg_wll_EventSendProxy()");
+               return edg_wll_Error(ctx, NULL, NULL);
+       }
 }
index 2e74c9b..23b3dd3 100644 (file)
@@ -85,6 +85,7 @@ int edg_wll_JobStatus(
 #if DAG_ENABLE 
        char            *stmt = NULL;
 #endif
+       char            *errdesc = NULL;
        //The following declarations have originally been positioned in the funcion's code
        //That was rather messy and lead to redeclaratios :-(
        char *stat_str, *s_out;
@@ -139,6 +140,7 @@ int edg_wll_JobStatus(
        } else {
                lockErr = edg_wll_LockJob(ctx,job);
                intErr = edg_wll_intJobStatus(ctx, job, flags,&jobstat, js_enable_store && !lockErr);
+               if (intErr) edg_wll_Error(ctx, NULL, &errdesc);
                if (!lockErr) {
                        edg_wll_UnlockJob(ctx,job);
                }
@@ -152,7 +154,9 @@ int edg_wll_JobStatus(
                free(string_jobid);
                free(md5_jobid);
                if (acl) edg_wll_FreeAcl(acl);
-               return edg_wll_Error(ctx, NULL, NULL);
+               edg_wll_SetError(ctx, intErr, errdesc);
+               free(errdesc);
+               return edg_wll_UpdateError(ctx, EDG_WLL_ERROR_SERVER_RESPONSE, "Could not compute job status from events");
        }
 
        if (acl) {
index 8514751..64e32b1 100644 (file)
@@ -67,6 +67,20 @@ typedef enum _edg_wll_PBSEventSource {
        EDG_WLL_PBS_EVENT_SOURCE__LAST
 } edg_wll_PBSEventSource;
 
+typedef enum _edg_wll_CondorEventSource {
+       EDG_WLL_CONDOR_EVENT_SOURCE_UNDEF = 0,
+       EDG_WLL_CONDOR_EVENT_SOURCE_COLLECTOR,
+       EDG_WLL_CONDOR_EVENT_SOURCE_MASTER,
+       EDG_WLL_CONDOR_EVENT_SOURCE_MATCH,
+       EDG_WLL_CONDOR_EVENT_SOURCE_NEGOTIATOR,
+       EDG_WLL_CONDOR_EVENT_SOURCE_SCHED,
+       EDG_WLL_CONDOR_EVENT_SOURCE_SHADOW,
+       EDG_WLL_CONDOR_EVENT_SOURCE_STARTER,
+       EDG_WLL_CONDOR_EVENT_SOURCE_START,
+       EDG_WLL_CONDOR_EVENT_SOURCE_JOBQUEUE,
+       EDG_WLL_CONDOR_EVENT_SOURCE__LAST
+} edg_wll_CondorEventSource;
+
 void destroy_intJobStat(intJobStat *);
 void destroy_intJobStat_extension(intJobStat *p);
 
@@ -95,11 +109,14 @@ int component_seqcode(const char *a, edg_wll_Source index);
 char * set_component_seqcode(char *s,edg_wll_Source index,int val);
 int processEvent(intJobStat *, edg_wll_Event *, int, int, char **);
 int processEvent_PBS(intJobStat *, edg_wll_Event *, int, int, char **);
+int processEvent_Condor(intJobStat *, edg_wll_Event *, int, int, char **);
 
 int add_stringlist(char ***, const char *);
 int edg_wll_compare_seq(const char *, const char *);
 int edg_wll_compare_pbs_seq(const char *,const char *);
+#define edg_wll_compare_condor_seq edg_wll_compare_pbs_seq
 edg_wll_PBSEventSource get_pbs_event_source(const char *pbs_seq_num);
+edg_wll_CondorEventSource get_condor_event_source(const char *pbs_seq_num);
 
 void init_intJobStat(intJobStat *p);
 
index f8d4615..c6d5bf8 100644 (file)
@@ -892,6 +892,21 @@ edg_wll_PBSEventSource get_pbs_event_source(const char *pbs_seq_num) {
        }
 }
 
+edg_wll_CondorEventSource get_condor_event_source(const char *condor_seq_num) {
+       switch (condor_seq_num[EDG_WLL_SEQ_CONDOR_SIZE-1]) {
+               case 'L': return(EDG_WLL_CONDOR_EVENT_SOURCE_COLLECTOR);
+               case 'M': return(EDG_WLL_CONDOR_EVENT_SOURCE_MASTER);
+               case 'm': return(EDG_WLL_CONDOR_EVENT_SOURCE_MATCH);
+               case 'N': return(EDG_WLL_CONDOR_EVENT_SOURCE_NEGOTIATOR);
+               case 'C': return(EDG_WLL_CONDOR_EVENT_SOURCE_SCHED);
+               case 'H': return(EDG_WLL_CONDOR_EVENT_SOURCE_SHADOW);
+               case 's': return(EDG_WLL_CONDOR_EVENT_SOURCE_STARTER);
+               case 'S': return(EDG_WLL_CONDOR_EVENT_SOURCE_START);
+               case 'j': return(EDG_WLL_CONDOR_EVENT_SOURCE_JOBQUEUE);
+               default: return(EDG_WLL_CONDOR_EVENT_SOURCE_UNDEF);
+       }
+}
+
 int edg_wll_compare_seq(const char *a, const char *b)
 {
        unsigned int    c[EDG_WLL_SOURCE__LAST];
index a165486..764b188 100644 (file)
@@ -1493,6 +1493,7 @@ int edg_wll_QueryEventsToXML(edg_wll_Context ctx, edg_wll_Event *eventsOut, char
                                my $n = $f->{null};
                                $t = lcfirst $t;
                                if ($t =~ m/^pBS/) { $t = ucfirst $t; }
+                               if ($t =~ m/^condor/) { $t = ucfirst $t; }
                                 gen "\t\tedg_wll_add_$ft\_to_XMLBody(&pomB, eventsOut[i].$t.$_, \"$_\", $n);\n";
                         }
                        gen "\t\tbreak;\n";
index b1ddbb0..259453a 100644 (file)
@@ -873,6 +873,7 @@ int edg_wll_QueryEventsToXMLV21(edg_wll_Context ctx UNUSED_VAR, edg_wll_Event *e
                                my $n = $f->{null};
                                $t = lcfirst $t;
                                if ($t =~ m/^pBS/) { $t = ucfirst $t; }
+                               if ($t =~ m/^condor/) { $t = ucfirst $t; }
                                 gen "\t\tedg_wll_add_$ft\_to_XMLBody(&pomB, eventsOut[i].$t.$_, \"$_\", $n);\n";
                         }
                        gen "\t\tbreak;\n";
index a10bd56..495a227 100644 (file)
@@ -91,7 +91,10 @@ static int transaction_test(edg_wll_Context ctx, MYSQL *m2) {
 
        m1 = (MYSQL *)ctx->mysql;
        edg_wll_ExecStmt(ctx, cmd_drop, NULL);
-       if (edg_wll_ExecStmt(ctx, cmd_create, NULL) != 0) goto err1;
+       if (edg_wll_ExecStmt(ctx, cmd_create, NULL) != 0) {
+               edg_wll_ResetError(ctx);
+               goto err1;
+       }
        if (edg_wll_Transaction(ctx) != 0) goto err2;
        if (edg_wll_ExecStmt(ctx, cmd_insert, NULL) != 1) goto err2;
 
index de0b038..1bce002 100644 (file)
@@ -40,6 +40,9 @@ int processEvent(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, char
                        case EDG_WLL_REGJOB_PBS:
                                js->pub.jobtype = EDG_WLL_STAT_PBS;
                                break;
+                       case EDG_WLL_REGJOB_CONDOR:
+                               js->pub.jobtype = EDG_WLL_STAT_CONDOR;
+                               break;
                        default:
                                asprintf(errstring,"unknown job type %d in registration",e->regJob.jobtype);
                                return RET_FAIL;
@@ -52,6 +55,8 @@ int processEvent(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, char
                        return processEvent_glite(js,e,ev_seq,strict,errstring);
                case EDG_WLL_STAT_PBS: 
                        return processEvent_PBS(js,e,ev_seq,strict,errstring);
+               case EDG_WLL_STAT_CONDOR: 
+                       return processEvent_Condor(js,e,ev_seq,strict,errstring);
                case -1: return RET_UNREG;
                default: 
                        asprintf(errstring,"undefined job type %d",js->pub.jobtype);
@@ -476,7 +481,7 @@ static int processEvent_glite(intJobStat *js, edg_wll_Event *e, int ev_seq, int
                                                e->enQueued.host,
                                                e->enQueued.src_instance);
                                        if (e->enQueued.source == EDG_WLL_SOURCE_LOG_MONITOR)
-                                               js->pub.resubmitted += 1;
+                                               js->pub.resubmitted = 1;
                                } else {
                                        js->pub.location = location_string(
                                                edg_wll_SourceToString(e->enQueued.source),
diff --git a/org.glite.lb.server/src/process_event_condor.c b/org.glite.lb.server/src/process_event_condor.c
new file mode 100644 (file)
index 0000000..e884205
--- /dev/null
@@ -0,0 +1,208 @@
+#ident "$Header$"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <assert.h>
+#include <syslog.h>
+
+#include "glite/lb/producer.h"
+#include "glite/lb/context-int.h"
+
+#include "jobstat.h"
+#include "lock.h"
+
+/* TBD: share in whole logging or workload */
+#ifdef __GNUC__
+#define UNUSED_VAR __attribute__((unused))
+#else
+#define UNUSED_VAR
+#endif
+
+// XXX: maybe not needed any more
+// if not, remove also last_condor_event_timestamp from intJobStat
+static int compare_timestamps(struct timeval a, struct timeval b)
+{
+       if ( (a.tv_sec > b.tv_sec) || 
+               ((a.tv_sec == b.tv_sec) && (a.tv_usec > b.tv_usec)) ) return 1;
+       if ( (a.tv_sec < b.tv_sec) ||
+                ((a.tv_sec == b.tv_sec) && (a.tv_usec < b.tv_usec)) ) return -1;
+       return 0;
+}
+
+
+// XXX move this defines into some common place to be reusable
+#define USABLE(res) ((res) == RET_OK)
+#define USABLE_DATA(res) (1)
+#define rep(a,b) { free(a); a = (b == NULL) ? NULL : strdup(b); }
+#define rep_cond(a,b) { if (b) { free(a); a = strdup(b); } }
+
+int processEvent_Condor(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, char **errstring)
+{
+       edg_wll_JobStatCode     old_state = js->pub.state;
+       int                     res = RET_OK;
+
+
+       if ((js->last_seqcode != NULL) &&
+                       (edg_wll_compare_condor_seq(js->last_seqcode, e->any.seqcode) > 0) ) {
+               res = RET_LATE; 
+       }
+
+       switch (e->any.type) {
+               case EDG_WLL_EVENT_REGJOB:
+                       if (USABLE(res)) {
+                               js->pub.state = EDG_WLL_JOB_SUBMITTED;
+                               rep(js->pub.condor_status, "Idle");
+                       }
+                       if (USABLE_DATA(res)) {
+                               rep(js->pub.jdl, e->regJob.jdl);
+                       }
+                       break;
+               case EDG_WLL_EVENT_CONDORMATCH:
+                       if (USABLE(res)) {
+                               js->pub.state = EDG_WLL_JOB_READY;
+                               rep(js->pub.condor_status, "Idle");
+                       }
+                       if (USABLE_DATA(res)) {
+                               rep_cond(js->pub.condor_dest_host,e->CondorMatch.dest_host);
+                       }
+                       break;
+               case EDG_WLL_EVENT_CONDORREJECT:
+                       if (USABLE(res)) {
+                               js->pub.state = EDG_WLL_JOB_ABORTED;
+                               rep(js->pub.condor_status, "Unexpanded");
+                       }
+                       if (USABLE_DATA(res)) {
+                               switch(e->CondorReject.status_code) {
+                                       case EDG_WLL_CONDORREJECT_NOMATCH:
+                                               rep(js->pub.condor_reason,"No match found.");
+                                               break;
+                                       case EDG_WLL_CONDORREJECT_OTHER:
+                                       default:
+                                               break;
+                               }
+                       }
+                       break;
+               case EDG_WLL_EVENT_CONDORSHADOWSTARTED:
+                       if (USABLE(res)) {
+                               js->pub.state = EDG_WLL_JOB_READY;
+                               rep(js->pub.condor_status, "Idle");
+                       }
+                       if (USABLE_DATA(res)) {
+                               switch (get_condor_event_source(e->any.seqcode)) {
+                                       case EDG_WLL_CONDOR_EVENT_SOURCE_SCHED:
+                                               js->pub.condor_shadow_pid = e->CondorShadowStarted.shadow_pid;
+                                               break;
+                                       default:
+                                               break;
+                               }
+                       }
+                       break;
+               case EDG_WLL_EVENT_CONDORSHADOWEXITED:
+                       if (USABLE(res)) {
+                               js->pub.state = EDG_WLL_JOB_DONE;
+                               rep(js->pub.condor_status, "Completed");
+                       }
+                       if (USABLE_DATA(res)) {
+                               switch (get_condor_event_source(e->any.seqcode)) {
+                                       case EDG_WLL_CONDOR_EVENT_SOURCE_SHADOW:
+                                               js->pub.condor_shadow_exit_status = e->CondorShadowExited.shadow_exit_status;
+                                               break;
+                                       default:
+                                               break;
+                               }
+                       }
+                       break;
+               case EDG_WLL_EVENT_CONDORSTARTERSTARTED:
+                       if (USABLE(res)) {
+                               switch (get_condor_event_source(e->any.seqcode)) {
+                                       case EDG_WLL_CONDOR_EVENT_SOURCE_START:
+                                               js->pub.state = EDG_WLL_JOB_SCHEDULED;
+                                               rep(js->pub.condor_status, "Idle");
+                                               break;
+                                       case EDG_WLL_CONDOR_EVENT_SOURCE_STARTER:
+                                               js->pub.state = EDG_WLL_JOB_RUNNING;
+                                               rep(js->pub.condor_status, "Running");
+                                               break;
+                                       default:
+                                               break;
+                               }
+                       }
+                       if (USABLE_DATA(res)) {
+                               switch (get_condor_event_source(e->any.seqcode)) {
+                                       case EDG_WLL_CONDOR_EVENT_SOURCE_STARTER:
+                                               rep(js->pub.condor_universe, e->CondorStarterStarted.universe);
+                                               js->pub.condor_starter_pid = e->CondorStarterStarted.starter_pid;
+                                               break;
+                                       default:
+                                               break;
+                               }
+                       }
+                       break;
+               case EDG_WLL_EVENT_CONDORSTARTEREXITED:
+                       if (USABLE(res)) {
+                               js->pub.state = EDG_WLL_JOB_DONE;
+                               rep(js->pub.condor_status, "Completed");
+                       }
+                       if (USABLE_DATA(res)) {
+                               switch (get_condor_event_source(e->any.seqcode)) {
+                                       case EDG_WLL_CONDOR_EVENT_SOURCE_START:
+                                               js->pub.condor_starter_pid = e->CondorStarterExited.starter_pid;
+                                               js->pub.condor_starter_exit_status = e->CondorStarterExited.starter_exit_status;
+                                               break;
+                                       case EDG_WLL_CONDOR_EVENT_SOURCE_STARTER:
+                                               js->pub.condor_starter_pid = e->CondorStarterExited.starter_pid;
+                                               js->pub.condor_job_pid = e->CondorStarterExited.job_pid;
+                                               js->pub.condor_job_exit_status = e->CondorStarterExited.job_exit_status;
+                                               break;
+                                       default:
+                                               break;
+                               }
+                       }
+                       break;
+               case EDG_WLL_EVENT_CONDORRESOURCEUSAGE:
+                       if (USABLE(res)) {
+                       }
+                       if (USABLE_DATA(res)) {
+                       }
+                       break;
+               case EDG_WLL_EVENT_CONDORERROR:
+                       if (USABLE(res)) {
+                       }
+                       if (USABLE_DATA(res)) {
+                       }
+                       break;
+
+               default:
+                       break;
+       }
+
+/* XXX : just debug output - remove */
+
+       printf("processEvent_Condor(): %s (%s), state: %s --> %s\n ", 
+               edg_wll_EventToString(e->any.type), 
+               (res == RET_LATE) ? "RET_LATE" : "RET_OK", 
+               edg_wll_StatToString(old_state), 
+               edg_wll_StatToString(js->pub.state) );
+       printf("\t%s\n",e->any.seqcode);
+       printf("\t(last=%s)\n",js->last_seqcode);
+
+/*----------------------------------*/
+
+       if (USABLE(res)) {
+               rep(js->last_seqcode, e->any.seqcode);
+
+               js->pub.lastUpdateTime = e->any.timestamp;
+               if (old_state != js->pub.state) {
+                       js->pub.stateEnterTime = js->pub.lastUpdateTime;
+                       js->pub.stateEnterTimes[1 + js->pub.state]
+                               = (int)js->pub.lastUpdateTime.tv_sec;
+               }
+       }
+       if (! js->pub.location) js->pub.location = strdup("this is CONDOR");
+
+
+       return RET_OK;
+}
+
index 903ca43..64c69d7 100644 (file)
@@ -102,7 +102,7 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c
                                                rep(js->pub.pbs_state, "R");
                                                break;
                                        default:
-                                               assert(0); // running event from strande source
+                                               assert(0); // running event from strange source
                                                break;
                                }
                        }
@@ -165,7 +165,7 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c
                        if (USABLE_DATA(res)) {
                                char *new_resource_usage;
        
-                               asprintf(&new_resource_usage,"%s%s\t%s = %d [%s]",
+                               asprintf(&new_resource_usage,"%s%s\t%s = %f [%s]",
                                        (js->pub.pbs_resource_usage) ? js->pub.pbs_resource_usage : "",
                                        (js->pub.pbs_resource_usage) ? "\n": "",
                                        e->PBSResourceUsage.name,
index a8339c1..28f32c6 100644 (file)
@@ -395,6 +395,7 @@ static int store_flesh(edg_wll_Context ctx,edg_wll_Event *e,char *jobid,int no)
                my $uctype = uc $type;
                my $flctype = lcfirst $type;
                if ($flctype =~ m/^pBS/) { $flctype = ucfirst $flctype; }
+               if ($flctype =~ m/^condor/) { $flctype = ucfirst $flctype; }
                gen qq{
 !              case EDG_WLL_EVENT_$uctype:
 };
index 35a4a05..b9fb90c 100644 (file)
@@ -33,6 +33,7 @@ sub eventFieldAssign {
        $tn = $f->{type};
        $native_en = lcfirst $e;
        if ($native_en =~ m/^pBS/) { $native_en = ucfirst $native_en; }
+       if ($native_en =~ m/^condor/) { $native_en = ucfirst $native_en; }
        $native_fn = $f->{name};
        $soap_en = $e;
        while ($soap_en =~ /([[:alpha:]]*)_([[:alpha:]_]*)/) {
@@ -58,8 +59,7 @@ sub eventFieldAssign {
                } else {
                        gen $indent."$dest = $source;\n";
                }
-       }
-       elsif ($tn eq 'port' || $tn eq 'bool') {
+       } elsif ($tn eq 'port' || $tn eq 'bool' || $tn eq 'float' || $tn eq 'double') {
                if ($f->{optional}) {
                        gen $indent."$dest = soap_malloc(soap, sizeof(*$dest));\n";
                        gen $indent."*$dest = $source;\n";
@@ -105,7 +105,7 @@ sub eventFieldFree {
        };
        $dest = "VALUEEV_GET($dst, $soap_en)->$soap_fn";
 
-       if ($tn eq 'int' || $tn eq 'port' || $tn eq 'bool' || $tn eq 'logsrc') {
+       if ($tn eq 'int' || $tn eq 'port' || $tn eq 'bool' || $tn eq 'float' || $tn eq 'double' || $tn eq 'logsrc') {
                if ($f->{optional}) {
                        gen $indent."if ($dest) soap_dealloc(soap, $dest);\n";
                }
@@ -1093,6 +1093,7 @@ static int edg_wll_SoapToEvent(
                                } else {
                                        $act = lcfirst $name;
                                        if ($act =~ m/^pBS/) { $act = ucfirst $act; }
+                                       if ($act =~ m/^condor/) { $act = ucfirst $act; }
                                }
                                my $usuc = $fn;
                                $usuc = $1.uc($2).$3 while ($usuc =~ /([^_]*)_([a-z])(.*)/);
@@ -1120,15 +1121,18 @@ static int edg_wll_SoapToEvent(
                                        }
                                        elsif ($f->{optional}) {
                                                gen "\t\t\tout->$act.$fn = *$src;\n";
+                                       } else {
+                                               gen "\t\t\tout->$act.$fn = $src;\n";
                                        }
-                                       else {
+                               } elsif ($tn eq 'port' || $tn eq 'bool' || $tn eq 'float' || $ft eq 'double') {
+                                       if ($f->{optional}) {
+                                               gen "\t\t\tout->$act.$fn = *$src;\n";
+                                       } else {
                                                gen "\t\t\tout->$act.$fn = $src;\n";
                                        }
-                               }
-                               elsif ($ft eq 'logsrc') {
+                               } elsif ($ft eq 'logsrc') {
                                        gen "\t\t\tedg_wll_SoapToSource($src, &(out->$act.$fn));\n";
-                               }
-                               else {
+                               } else {
                                        gen "\t\t\tout->$act.$fn = $src;\n";
                                }
                        }       
index 775d12a..3cfe623 100644 (file)
@@ -47,6 +47,7 @@ static char * compare_events(const edg_wll_Event *e1, const edg_wll_Event *e2)
                my $tu = uc $t;
                my $tl = lcfirst $t;
                if ($tl =~ m/^pBS/) { $tl = ucfirst $tl; }
+               if ($tl =~ m/^condor/) { $tl = ucfirst $tl; }
 
                selectType $event $t;
                gen "\t\tcase EDG_WLL_EVENT\_$tu :\n";
index 50f02be..9801c0c 100644 (file)
@@ -65,7 +65,7 @@ install:
 #      fi
 
 clean:
-       rm -f *.h
+       rm -f *.h *.html *.xml *.wsdl
        
 
 %.xml: %.xml.T
index 2a3480f..89b439a 100755 (executable)
@@ -1,4 +1,4 @@
 #Fri Sep 02 14:16:49 CEST 2005
 # glite-lb-ws-interface_branch_3_0_0_RC15 tak is taken!
 module.version=2.3.0
-module.age=1
+module.age=2
index 0053fe5..c8ef9df 100755 (executable)
 
        Revision history:
        $Log$
+       Revision 1.43.2.1  2007/03/29 20:05:00  akrenek
+       disable utils temporarily
+
+       Revision 1.43  2007/03/21 13:10:38  akrenek
+       utils -> jp.primary (sync with 3.1)
+
        Revision 1.42  2006/03/24 08:26:11  akrenek
        missing utils->client dependency (should fix nightly build)
 
        </target>
 
        <!-- Main proxy -->
+<!--XXX: until JP from head is included                                             utils, -->
        <target name="buildmodules" depends="envset,
-                                            utils, 
                                             client-interface,
                                             ws-interface,
                                             client,
index d2b32b2..a57c085 100644 (file)
@@ -1,3 +1,2 @@
-ext.gsoap.version=2.7.9d
-ext.gsoap.rep.file=gSOAP-2.7.9d.tar.gz
-
+ext.gsoap.version=2.7.6b
+ext.gsoap.rep.file=gSOAP-2.7.6b.tar.gz
index 3074127..7e279a4 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.9d
+ext.gsoap.version = 2.7.6b
index f81a989..d9602d0 100644 (file)
 
 @type ResourceUsage    Resource (CPU, memory etc.) consumption.
        string  resource        Resource's name.
-       int     quantity        Resources's quantity (how much).
+       double  quantity        Resources's quantity (how much).
        string  unit            Units (sec, kB, etc.).
 
 @type ReallyRunning    User payload started.
        _code_  REQUESTED       Requested value
        _code_  USED            Consumed quantity
        string  name            Name of resource
-       int     quantity        The quantity
+       double  quantity        The quantity
        _optional_              Bypass need of 'null value'
        string  unit            Units (sec, kB, etc.)
 
 @type PBSError         Any error occured
        string  error_desc      Error reason
 
-@type CondorSubmit             Job SUBMITed to Condor
-       string  universe        Condor Universe
-       string  submit_host     Submitting machine
-       string  condor_id       Condor ID
-
-@type CondorMatch              Job MATCHed
-       string  condor_id       Condor ID
+@type CondorMatch      Job MATCHed
        string  owner           Owner
-       string  matched_host    Matched host
+       string  dest_host       Matched host
        string  preempting      Preempting
        _optional_
 
-@type CondorRun                Condor EXECUTEed
-       string  condor_id       Condor ID
-       string  universe        Condor Universe
-       string  scheduler       Scheduler ID
-       _optional_
-       string  dest_host       Where to run the job
-       _optional_
-       int     pid             Actual process ID
+@type CondorReject     Job REJECTed
+       string  owner           Owner
+       int     status_code     Reason code for the rejection of the job
+       _code_  NOMATCH         No match found
+       _code_  OTHER           Other reason
+
+@type CondorShadowStarted      Condor Shadow Started
+       string  shadow_host     Shadow host
+       port    shadow_port     Shadow port
+       int     shadow_pid      PID of shadow process
+       string  shadow_status   Shadow status
        _optional_
 
-@type CondorChkpt
-       string  info            Some useful info
-
-@type CondorEvict
-       int     shadow_exit_status      Condor shadow exit status
-       string  reason          reason
-
-@type CondorTerminate
-       int     shadow_exit_status      Condor shadow exit status
-       string  reason          reason
-
-@type CondorAbort
-       int     shadow_exit_status      Condor shadow exit status
-       string  reason          reason
-
-@type CondorSuspend
-       int     shadow_exit_status      Condor shadow exit status
-       string  reason          reason
-
-@type CondorUnsuspend
-       int     shadow_exit_status      Condor shadow exit status
-       string  reason          reason
-
-@type CondorHold
-       int     shadow_exit_status      Condor shadow exit status
-       string  reason          reason
-
-@type CondorRelease
-       int     shadow_exit_status      Condor shadow exit status
-       string  reason          reason
+@type CondorShadowExited       Condor Shadow Exited
+       int     shadow_pid      PID of shadow process
+       int     shadow_exit_status      Exit status of shadow process
 
-@type CondorNodeExecute
-       string  info            Some useful info
+@type CondorStarterStarted     Condor Starter Started
+       int     starter_pid     PID of starter process
+       _optional_
+       string  universe        Condor Universe
+       _optional_
 
-@type CondorNodeTerminate
-       string  info            Some useful info
+@type CondorStarterExited      Condor Starter Exited
+       int     starter_pid     PID of starter process
+       _optional_
+       int     starter_exit_status     Exit status of starter process
+       _optional_
+       int     job_pid         PID of running job
+       _optional_
+       int     job_exit_status Job exit status
+       _optional_
 
-@type CondorPostSctiptTerminate
-       string  info            Some useful info
+@type CondorResourceUsage       Resources requested/consumed
+       int     usage           Type of record
+       _code_  REQUESTED       Requested value
+       _code_  USED            Consumed quantity
+       string  name            Name of resource
+       double  quantity        The quantity
+       _optional_              Bypass need of 'null value'
+       string  unit            Units (sec, kB, etc.)
 
-@type CondorGlobusSubmit
-       int     status_code
-       _code_  OK              The job was submitted successfully
-       _code_  FAIL            Job submission failed
-       string  info            Some useful info
+@type CondorError              Any Error occured
+       string  error_desc      Error reason
 
-@type CondorGlobusResource
-       int     status_code     Status code
-       _code_  UP              Resource UP
-       _code_  DOWN            Resource DOWM
-       string  info            Some useful info
index cae5f17..2fcb7bd 100644 (file)
@@ -91,11 +91,15 @@ string      pbs_error_desc  Glued error descriptions from error events
 string condor_status   Condor job status 
 string condor_universe Condor job Universe (in job ClassAds)
 string condor_owner    Job owner
-string condor_pid      PID of running job
-int    condor_notification     Condor notification 
-int    condor_job_exit_status  Job exit status
-int    condor_starter_exit_status      Condor starter exit status
+int    condor_shadow_pid       PID of Shadow
 int    condor_shadow_exit_status       Condor shadow exit status (see h/exit.h)
+int    condor_starter_pid      PID of Starter
+int    condor_starter_exit_status      Condor starter exit status
+int    condor_job_pid  PID of running job
+int    condor_job_exit_status  Job exit status
+string condor_dest_host Hostname of node where job is running
+string condor_reason   Glued reasons/errors leading to pending events
+string condor_error_desc       Glued error descriptions from error events
 
 
 @type Submitted                Entered by the user to the User Interface or registered by Job Partitioner.
index 015b4e1..888b45c 100644 (file)
@@ -12,7 +12,9 @@
                logsrc=>'"edg_wll_Source"',
                port=>'"uint16_t"',
 #              level=>'"enum edg_wll_Level"',
-               int=>'"int"'
+               int=>'"int"',
+               float=>'"float"',
+               double=>'"double"',
        },
        'C++'=>{
                string=>'"std::string"',
@@ -25,7 +27,9 @@
                stslist=>'"std::vector<JobStatus>"',
                logsrc=>'"int"',
                port=>'"int"',
-               int=>'"int"'
+               int=>'"int"',
+               float=>'"float"',
+               double=>'"double"',
        },
        'wsdl'=>{
                bool=>'"xsd:boolean"',
                logsrc=>'"eventSource"',
                notifid=>'"xsd:string"',
                port=>'"xsd:int"',
+               float=>'"xsd:float"',
+               double=>'"xsd:double"',
        }
 );
 
 %baseTypes = (
        intlist=>'int',
+       floatlist=>'float',
+       doublelist=>'double',
        strlist=>'string',
        stslist=>'jobstat',
        taglist=>'usertag'
@@ -51,6 +59,8 @@
 %toString = (
        C=>{
                int=>'qq{asprintf(&$dst,"%d",$src);}',
+               float=>'qq{asprintf(&$dst,"%f",$src);}',
+               double=>'qq{asprintf(&$dst,"%f",$src);}',
                port=>'qq{asprintf(&$dst,"%d",(int) $src);}',
                bool=>'qq{asprintf(&$dst,"%d",$src);}',
                string=>'qq{$dst = $src?strdup($src):NULL;}',
@@ -70,6 +80,8 @@
 %fromString = (
        C=>{
                int=>'qq{$dst = atoi($src);}',
+               float=>'qq{$dst = strtof($src,NULL);}',
+               double=>'qq{$dst = strtod($src,NULL);}',
                port=>'qq{$dst = (uint16_t) atoi($src);}',
                bool=>'qq{$dst = atoi($src);}',
                string=>'qq{$dst = strdup($src);}',
@@ -84,6 +96,8 @@
 
 %DefaultNullValue = (
        int=>0,
+       float=>0.0,
+       double=>0.0,
        port=>0,
 #      level=>'EDG_WLL_LEVEL_UNDEFINED',
        bool=>0,
 %compare = (
        C=>{
                int=>'"($a == $b)"',
+               float=>'"($a == $b)"',
+               double=>'"($a == $b)"',
                port=>'"($a == $b)"',
 #              level=>'"($a == $b)"',
                bool=>'"(($a || !$b) && ($b || !$a))"',
-               string=>'"(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp($a,$b))"',
-               jobid=>'"(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp(edg_wlc_JobIdUnparse($a),edg_wlc_JobIdUnparse($b)))"',
+#              string=>'"(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp($a,$b))"',
+               string=>'if ($b =~ m/^NULL/) { qq{(($a) == NULL) || (($a)&& !strcmp($a,""))}; } 
+                       else { qq{(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp($a,$b))}; } ',
+#              jobid=>'"(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp(edg_wlc_JobIdUnparse($a),edg_wlc_JobIdUnparse($b)))"',
+               jobid=>'if ($b =~ m/^NULL/) { qq{(($a) == NULL) || (($a)&& !strcmp(edg_wlc_JobIdUnparse($a),""))}; }
+                       else { qq{(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp(edg_wlc_JobIdUnparse($a),edg_wlc_JobIdUnparse($b)))}; }',
                notifid=>'"($a) == ($b)"',
                logsrc=>'"($a) == ($b)"',
                timeval=>'"($a).tv_sec == ($b).tv_sec && ($a).tv_usec == ($b).tv_usec"',
 %toFormatString = (
        C=>{
                int=>'"%d"',
+               float=>'"%f"',
+               double=>'"%f"',
                port=>'"%d"',
                bool=>'"%d"',
 #              level=>'"%s"',
index 8dac816..1822b41 100644 (file)
@@ -1,3 +1,4 @@
-#Fri Sep 02 14:19:10 CEST 2005
-module.version=1.3.3
-module.age=0
+# $Id$
+# $Name$
+module.version=1.4.5
+module.age=2