printf("%spbs_dest_host : %s\n", ind, stat.pbs_dest_host);
printf("%spbs_pid : %d\n", ind, stat.pbs_pid);
printf("%spbs_resource_usage : %s%s\n", ind,
- (stat.pbs_resource_usage) ? "\n" : "", stat.pbs_resource_usage);
+ (stat.pbs_resource_usage) ? "\n" : "", edg_wll_TagListToString(stat.pbs_resource_usage));
printf("%spbs_exit_status : %d\n", ind, stat.pbs_exit_status);
printf("%spbs_error_desc : %s%s\n", ind,
(stat.pbs_error_desc) ? "\n" : "", stat.pbs_error_desc);
NOTIFID_T, /**< NotifId value. */
FLOAT_T, /**< Float value. */
DOUBLE_T, /**< Double value. */
+ TAGLIST_T, /**< List of user tags (name = value pairs). */
};
Type type; /**< Type of the event as defined by Type. */
FAILURE_REASON
WMS_DN
PAYLOAD_OWNER
+ OLDSTATE
+ OLDSUBSTATE
+ NEWSTATE
+ NEWSUBSTATE
+ RESOURCES
/;
PBS_PID
PBS_QUEUE
PBS_REASON
+ PBS_RESOURCE_REQUESTED
+ PBS_SUBSTATE
PBS_RESOURCE_USAGE
PBS_SCHEDULER
PBS_STATE
else glite_jobid_free(jobid);
}
+static void read_taglist(const edg_wll_Args* o, char* arg, char* par)
+{
+ edg_wll_TagValue *list = NULL;
+
+ if(edg_wll_TagListParse(par, &list) != 0) {
+ fprintf(stderr, "ERROR %s can't parse %s: %s\n", arg, par, strerror(errno));
+ exit(1);
+ }
+ if(o->value) *(edg_wll_TagValue **)o->value = list;
+ else /* FIXME: free it properly */ free(list);
+}
+
static void show_help(const edg_wll_Args* o, int prefix)
{
unsigned max = 0;
case EDG_WLL_ARGS_JOBID:
read_jobid(o, arg, par);
break;
+ case EDG_WLL_ARGS_TAGLIST:
+ read_taglist(o, arg, par);
+ break;
default:
printf("FIXME: unhandle option type %d\n", o->type);
break;
EDG_WLL_ARGS_SUBOPTIONS,
EDG_WLL_ARGS_SELECTSTRING,
EDG_WLL_ARGS_TIMEVAL,
+ EDG_WLL_ARGS_TAGLIST,
} edg_wll_ArgsCode;
typedef struct {
"edg_wll_NotifId", "EDG_WLL_ARGS_NOTIFID",
"edg_wll_Source", "EDG_WLL_ARGS_SOURCE",
"uint16_t", "EDG_WLL_ARGS_UINT16",
- "struct timeval", "EDG_WLL_ARGS_TIMEVAL"
+ "struct timeval", "EDG_WLL_ARGS_TIMEVAL",
+ "edg_wll_TagValue *", "EDG_WLL_ARGS_TAGLIST",
);
my %vars = ();
for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
edg_wll_connectionTryLock(ctx, index);
edg_wll_poolUnlock();
-#if 0
/* acquire gss credentials */
ret = edg_wll_gss_acquire_cred_gsi(
ctx->p_proxy_filename ? ctx->p_proxy_filename : ctx->p_cert_filename,
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,
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, &gss_stat);
+
/* give up if unable to acquire prescribed credentials, otherwise go on anonymously */
if (ret && ctx->p_proxy_filename) {
answer = edg_wll_SetErrorGss(ctx, "edg_wll_gss_acquire_cred_gsi(): failed to load GSI credentials", &gss_stat);
} else {
edg_wll_SetParamString(ctx, EDG_WLL_PARAM_LBPROXY_USER, cred->name);
}
-
if (cred != NULL)
edg_wll_gss_release_cred(&cred, NULL);
}
#endif
#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_PBS_NULL "CLIENT=000000:SERVER=0000000000:SCHED=000000:SMOM=000000:MOM=000000"
#define EDG_WLL_SEQ_CONDOR_NULL EDG_WLL_SEQ_PBS_NULL
#define EDG_WLL_SEQ_SIZE (sizeof(EDG_WLL_SEQ_NULL))
#define EDG_WLL_SEQ_PBS_SIZE (sizeof(EDG_WLL_SEQ_PBS_NULL))
#define EDG_WLL_SEQ_CONDOR_SIZE EDG_WLL_SEQ_PBS_SIZE
#define EDG_WLL_SEQ_FORMAT_PRINTF "UI=%06d:NS=%010d:WM=%06d:BH=%010d:JSS=%06d:LM=%06d:LRMS=%06d:APP=%06d:LBS=%06d"
#define EDG_WLL_SEQ_FORMAT_SCANF "UI=%d:NS=%d:WM=%d:BH=%d:JSS=%d:LM=%d:LRMS=%d:APP=%d:LBS=%d"
-#define EDG_WLL_SEQ_FORMAT_NUMBER 9
+#define EDG_WLL_SEQ_FORMAT_NUMBER 9
+#define EDG_WLL_SEQ_PBS_FORMAT_PRINTF "CLIENT=%06d:SERVER=%010d:SCHED=%06d:SMOM=%06d:MOM=%06d"
+#define EDG_WLL_SEQ_PBS_FORMAT_SCANF "CLIENT=%d:SERVER=%d:SCHED=%d:SMOM=%d:MOM=%d"
+#define EDG_WLL_SEQ_PBS_FORMAT_NUMBER 5
typedef struct _edg_wll_SeqCode {
unsigned int type; /* seq code type */
- unsigned int c[EDG_WLL_SOURCE__LAST]; /* glite seq. code */
+ unsigned int c[EDG_WLL_SOURCE__LAST]; /* glite and PBS seq. code */
char pbs[EDG_WLL_SEQ_PBS_SIZE]; /* PBS seq. code */
- /* 0-24 TIMESTAMP=YYYYMMDDHHMMSS: */
- /* 25-39 POS=%010u: */
- /* 40-51 EV.CODE=%03d: */
- /* 53-56 SRC=%c */
char condor[EDG_WLL_SEQ_CONDOR_SIZE];
} edg_wll_SeqCode;
EDG_WLL_SOURCE_LB_SERVER,
EDG_WLL_SOURCE_CREAM_INTERFACE,
EDG_WLL_SOURCE_CREAM_EXECUTOR,
+ EDG_WLL_SOURCE_PBS_CLIENT,
+ EDG_WLL_SOURCE_PBS_SERVER,
+ EDG_WLL_SOURCE_PBS_SMOM,
+ EDG_WLL_SOURCE_PBS_MOM,
+ EDG_WLL_SOURCE_PBS_SCHEDULER,
EDG_WLL_SOURCE__LAST /* marker, for internal use only */
} edg_wll_Source;
#include <inttypes.h>
#include "glite/jobid/cjobid.h"
+#include "glite/lb/lb_types.h"
+
#ifdef BUILDING_LB_COMMON
#include "context.h"
/**
+ * Free allocated edg_wll_TagValue * list
+ * \param list IN: list to free
+ */
+extern void edg_wll_FreeTagList(
+ edg_wll_TagValue *list
+);
+
+
+/**
* \typedef edg_wll_KeyNameCode
* Predefined ULM key types
*/
edg_wll_Event * event
);
+
#ifdef __cplusplus
}
#endif
#include <sys/time.h>
#include "glite/jobid/cjobid.h"
+#include "glite/lb/lb_types.h"
#ifdef __cplusplus
extern "C" {
extern const int EDG_WLL_JOB_TERMINAL_STATE[EDG_WLL_NUMBER_OF_STATCODES];
-/*!
- *
- * Pair tag = value.
- */
-typedef struct _edg_wll_TagValue {
- char * tag; /**< User-specified information tag */
- char * value; /**< Value assigned to user-specified information tag */
-} edg_wll_TagValue;
-
/*!
*
void edg_wll_add_logsrc_to_XMLBody(char **body, const edg_wll_Source toAdd, const char *tag, const edg_wll_Source null);
void edg_wll_add_intlist_to_XMLBody(char **body, const int *toAdd, const char *tag, char *(*indexToTag)(), const char *indent, const int from, const int to);
void edg_wll_add_strlist_to_XMLBody(char **body, char * const *toAdd, const char *tag, const char *subTag, const char *indent, const char *null);
-void edg_wll_add_taglist_to_XMLBody(char **body, const edg_wll_TagValue *toAdd, const char *tag, const char *subTag, const char *indent, const char *subTag2, const char *null);
+void edg_wll_add_taglist_to_XMLBody(char **body, const edg_wll_TagValue *toAdd, const char *tag, const edg_wll_TagValue *null);
+void edg_wll_add_usertag_to_XMLBody(char **body, const edg_wll_TagValue *toAdd, const char *tag, const char *subTag, const char *indent, const char *subTag2, const char *null);
void edg_wll_add_time_t_list_to_XMLBody(char **body, const time_t *toAdd, const char *tag, char *(*indexToTag)(), const char *indent, const int from, const int to);
void edg_wll_add_cclassad_to_XMLBody(char **body, void *toAdd, const char *tag, const char *null);
char *edg_wll_from_string_to_string(edg_wll_XML_ctx *XMLCtx);
time_t edg_wll_from_string_to_time_t(edg_wll_XML_ctx *XMLCtx);
edg_wll_Source edg_wll_from_string_to_logsrc(edg_wll_XML_ctx *XMLCtx);
void *edg_wll_from_string_to_cclassad(edg_wll_XML_ctx *XMLCtx);
+edg_wll_TagValue *edg_wll_from_string_to_taglist(edg_wll_XML_ctx *XMLCtx);
char *edg_wll_stat_flags_to_string(int flags);
int edg_wll_string_to_stat_flags(char *cflags);
"LBServer",
"CREAMInterface",
"CREAMExecutor",
+ "PBSClient",
+ "PBSServer",
+ "PBSMomSuperior",
+ "PBSMom",
+ "PBSScheduler"
};
edg_wll_Source edg_wll_StringToSource(const char *name)
c[EDG_WLL_SOURCE_LB_SERVER]);
break;
case EDG_WLL_SEQ_PBS:
- ret = strdup(ctx->p_seqcode.pbs);
+ c = &ctx->p_seqcode.c[0];
+ asprintf(&ret, EDG_WLL_SEQ_PBS_FORMAT_PRINTF,
+ c[EDG_WLL_SOURCE_PBS_CLIENT],
+ c[EDG_WLL_SOURCE_PBS_SERVER],
+ c[EDG_WLL_SOURCE_PBS_SCHEDULER],
+ c[EDG_WLL_SOURCE_PBS_SMOM],
+ c[EDG_WLL_SOURCE_PBS_MOM]);
+ /* ret = strdup(ctx->p_seqcode.pbs); */
break;
case EDG_WLL_SEQ_CONDOR:
ret = strdup(ctx->p_seqcode.condor);
}
break;
case EDG_WLL_SEQ_PBS:
+ /* original version
if (!seqcode_str)
memset(&ctx->p_seqcode.pbs, 0, sizeof ctx->p_seqcode.pbs);
else
strncpy(ctx->p_seqcode.pbs, seqcode_str, sizeof(ctx->p_seqcode.pbs));
+ */
+ if (!seqcode_str) {
+ memset(&ctx->p_seqcode.c, 0, sizeof(ctx->p_seqcode.c));
+ return 0;
+ }
+ c = ctx->p_seqcode.c;
+ res = sscanf(seqcode_str, EDG_WLL_SEQ_PBS_FORMAT_SCANF,
+ &c[EDG_WLL_SOURCE_PBS_CLIENT],
+ &c[EDG_WLL_SOURCE_PBS_SERVER],
+ &c[EDG_WLL_SOURCE_PBS_SCHEDULER],
+ &c[EDG_WLL_SOURCE_PBS_SMOM],
+ &c[EDG_WLL_SOURCE_PBS_MOM]);
+ if(res != EDG_WLL_SEQ_PBS_FORMAT_NUMBER) {
+ return edg_wll_SetError(ctx, EINVAL,
+ "edg_wll_SetSequenceCode(): syntax error in sequence code");
+ }
break;
case EDG_WLL_SEQ_CONDOR:
if (!seqcode_str)
switch (ctx->p_seqcode.type) {
case EDG_WLL_SEQ_DUPLICATE:
/* fall through */
+ case EDG_WLL_SEQ_PBS:
case EDG_WLL_SEQ_NORMAL:
if (ctx->p_source <= EDG_WLL_SOURCE_NONE ||
ctx->p_source >= EDG_WLL_SOURCE__LAST)
ctx->p_seqcode.c[ctx->p_source]++;
break;
- case EDG_WLL_SEQ_PBS:
case EDG_WLL_SEQ_CREAM:
/* no action */
break;
"SysClStat",
};
+/* Free the tags and values from list */
+void edg_wll_FreeTagList(edg_wll_TagValue *list) {
+ edg_wll_TagValue *tag;
+
+ if(NULL == list) return;
+
+ for(tag = list; tag->tag; tag++) {
+ free(tag->tag);
+ if(tag->value) free(tag->value);
+ }
+}
+
+/* Deep copy the tag list */
+edg_wll_TagValue *edg_wll_CopyTagList(edg_wll_TagValue *src) {
+ edg_wll_TagValue *dst, *tag, *dtag;
+ int count;
+
+ if(NULL == src) return NULL;
+
+ for(tag = src, count = 0; tag->tag; tag++, count++);
+
+ dst = (edg_wll_TagValue*)calloc(count + 1, sizeof(edg_wll_TagValue));
+ for(tag = src, dtag = dst; tag->tag; tag++, dtag++) {
+ dtag->tag = strdup(tag->tag);
+ dtag->value = strdup(tag->value);
+ }
+
+ return dst;
+}
+
+
/**
* \fn edg_wll_EventCode edg_wll_StringToEvent(const char *name)
* \param name a string event name (e.g. "JobTransfer")
if ($ft eq 'notifid') {
gen $indent."\tif (event->$tl.$fn) edg_wll_NotifIdFree(event->$tl.$fn);\n"
}
+ if ($ft eq 'taglist') {
+ gen $intent."\tif (event->$tl.$fn) { edg_wll_FreeTagList(event->$tl.$fn); free(event->$tl.$fn); }\n"
+ }
}
gen $indent.$indent."break;\n"
}
/* -- Internal function prototype -- */
char *my_edg_wll_ULMGetValueAt( p_edg_wll_ULMFields, int );
+/* Function for parsing name=value tag lists */
+int edg_wll_TagListParse(const char *src, edg_wll_TagValue **list) {
+ int n = 0;
+ char *p;
+ edg_wll_TagValue *tag;
+
+ if(NULL == src)
+ return -1;
+
+ /* count tag=value pairs */
+ for(p = (char*)src; *p; p++) {
+ if(',' == *p) n++; /* counts empty tokens as well... */
+ }
+ /* one more for last empty struct */
+ n += 2;
+
+ *list = (edg_wll_TagValue*)malloc(n*sizeof(edg_wll_TagValue));
+ if(NULL == *list)
+ return -1;
+
+ for(p = strtok(src, ","), tag = *list; p; p = strtok(NULL, ","), tag++) {
+ char *s = strchr(p, '=');
+
+ if(NULL == s || '\0' == *(s+1))
+ continue;
+
+ *s = 0;
+ tag->tag = strdup(p);
+ *s = '=';
+ tag->value = strdup(s+1);
+ }
+ tag->tag = NULL;
+ tag->value = NULL;
+
+ return 0;
+}
+
+
+/* Function for stringifying name=value tag lists */
+char * edg_wll_TagListToString(edg_wll_TagValue *list) {
+ int len = 0;
+ edg_wll_TagValue *tag;
+ char *out, *p;
+
+ if(NULL == list) return NULL;
+
+ for(tag = list; tag->tag; tag++) {
+ len += strlen(tag->tag);
+ len += strlen(tag->value);
+ len += 2;
+ }
+
+ out = malloc(len*sizeof(char) + 1);
+ if(NULL == out) return NULL;
+
+ *out = '\0';
+ p = out;
+ for(tag = list; tag->tag; tag++) {
+ if(p != out) {
+ strcat(p++, ",");
+ }
+ strcat(p, tag->tag);
+ p += strlen(tag->tag);
+ strcat(p++, "=");
+ strcat(p, tag->value);
+ p += strlen(tag->value);
+ }
+
+ return out;
+}
+
+
/**
- * edg_wll_ParseEvent - parse ULM message to internal structures
+ * Edg_wll_ParseEvent - parse ULM message to internal structures
* Calls: calloc, free, sprintf, strdup
* edg_wll_ULMNewParseTable, edg_wll_ULMFreeParseTable, edg_wll_ULMProcessParseTable,
* edg_wll_ULMGetNameAt, my_edg_wll_ULMGetValueAt, edg_wll_ULMDateToTimeval (edg_wll_ULMDateToDouble),
gen "\t\t".toString $f "event->$tl.$fn", "$fn\_str"; gen "\n";
}
elsif ($ULMasString{$f->{type}}) {
- gen "\t\tchar \*$fn\_str = ".$f->getType()."ToString(event->$tl.$fn);\n";
+ #gen "\t\tchar \*$fn\_str = ".$f->getType()."ToString(event->$tl.$fn);\n";
+ gen "\t\t". $f->toString("event->$tl.$fn","char \*$fn\_str",)."\n";
$free .= "free($fn\_str); ";
}
}
gen qq{$sep};
@@@}
+extern void edg_wll_FreeTagList(edg_wll_TagValue *);
void edg_wll_FreeStatus(edg_wll_JobStat *stat)
{
}
if ($ft eq 'taglist') {
gen "\tif (stat->$_ != NULL ) {\n";
- gen "\t\tfor (i=0; stat->$_\[i].tag; i++) {\n";
- gen "\t\t\tfree(stat->$_\[i].tag);\n";
- gen "\t\t\tfree(stat->$_\[i].value);\n";
- gen "\t\t}\n";
+ #gen "\t\tfor (i=0; stat->$_\[i].tag; i++) {\n";
+ #gen "\t\t\tfree(stat->$_\[i].tag);\n";
+ #gen "\t\t\tfree(stat->$_\[i].value);\n";
+ #gen "\t\t}\n";
+ gen "\t\tedg_wll_FreeTagList(stat->$_);\n";
gen "\t\tfree(stat->$_);\n";
gen "\t}\n";
}
gen "\tdest->$_ = src->$_;\n";
}
elsif ($ft eq 'taglist') {
- gen qq{
-! if (src->$_ != NULL) \{
-! for (i=0; src->$_\[i].tag; i++);
-! dest->$_ = malloc(sizeof(*src->$_)*(i+1));
-! for (i=0; src->$_\[i].tag; i++) \{
-! dest->$_\[i].tag = strdup(src->$_\[i].tag);
-! dest->$_\[i].value = strdup(src->$_\[i].value);
-! \}
-! dest->$_\[i].tag = NULL;
-! \}
- };
+ gen "\tdest->$_ = edg_wll_CopyTagList(src->$_);\n";
}
elsif ($ft eq 'cclassad') {
gen "\tif ( src->$_ != NULL )\n";
#include "jobstat.h"
+extern char *edg_wll_TagListToString(edg_wll_TagValue *);
static const struct timeval null_timeval = {0,0};
}
-void edg_wll_add_taglist_to_XMLBody(char **body, const edg_wll_TagValue *toAdd, const char *tag, const char *subTag, const char *subTag2, const char *indent, const char *null)
+void edg_wll_add_taglist_to_XMLBody(char **body, const edg_wll_TagValue *toAdd, const char *tag, const edg_wll_TagValue *null)
+{
+ char *s_taglist;
+
+ s_taglist = edg_wll_TagListToString(toAdd);
+ edg_wll_add_string_to_XMLBody(body, s_taglist, tag, NULL);
+ free(s_taglist);
+}
+
+
+void edg_wll_add_usertag_to_XMLBody(char **body, const edg_wll_TagValue *toAdd, const char *tag, const char *subTag, const char *subTag2, const char *indent, const char *null)
{
char *pomA, *pomB, *newBody;
char **list = NULL;
return (NULL);
}
+edg_wll_TagValue *edg_wll_from_string_to_taglist(edg_wll_XML_ctx *XMLCtx)
+{
+ char *s, *out = NULL;
+
+ s = glite_lbu_UnescapeXML((const char*) XMLCtx->char_buf);
+ if(s) {
+ edg_wll_TagListParse(s, &out);
+ }
+
+ return out;
+}
/************************************************************************/
/* various conversion functions */
/* get credentials */
if (CAcert_dir)
setenv("X509_CERT_DIR", CAcert_dir, 1);
+ if(edg_wll_gss_initialize()) {
+ glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_FATAL, "Failed to initialize GSS.");
+ exit(EXIT_FAILURE);
+ }
ret = edg_wll_gss_watch_creds(cert_file,&cert_mtime);
if (ret < 0)
glite_common_log(LOG_CATEGORY_SECURITY,LOG_PRIORITY_WARN,"edg_wll_gss_watch_creds failed, unable to access credentials\n");
if (ret == EDG_WLL_GSS_ERROR_GSS)
edg_wll_gss_get_error(&gss_stat, "edg_wll_gss_acquire_cred_gsi()", &gss_err);
- glite_common_log(LOG_CATEGORY_SECURITY, LOG_PRIORITY_FATAL, "Failed to load GSI credential: %s, exiting.",
+ glite_common_log(LOG_CATEGORY_SECURITY, LOG_PRIORITY_FATAL, "Failed to load GSI credential: %s",
(gss_err) ? gss_err : "edg_wll_gss_acquire_cred_gsi() failed");
if (gss_err)
free(gss_err);
- exit(EXIT_FAILURE);
+ if(gss_stat.minor_status != 0) {
+ exit(EXIT_FAILURE);
+ } else {
+ glite_common_log(LOG_CATEGORY_SECURITY, LOG_PRIORITY_WARN, "Continuing unauthenticated (yet).");
+ }
+ }
+ if(cred_handle && cred_handle->creds) {
+ glite_common_log(LOG_CATEGORY_SECURITY, LOG_PRIORITY_INFO, "Using certificate %s", cred_handle->creds->name);
}
- glite_common_log(LOG_CATEGORY_SECURITY, LOG_PRIORITY_INFO, "Using certificate %s", cred_handle->creds->name);
/* parse config, initialize plugins */
glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_INFO, "Initializing plugins:\n");
-include Makefile.inc
+globalprefix=glite
+lbprefix=lb
PM=StructField.pm MultiStruct.pm
T=events.T status.T types.T
SCRIPTS=at3 check_version.pl
+HDRS=lb_types.h
default: compile
done
install -m 755 ${top_srcdir}/at3.in ${DESTDIR}${PREFIX}${prefix}/sbin/glite-lb-at3
install -m 755 ${top_srcdir}/check_version.pl ${DESTDIR}${PREFIX}${prefix}/sbin/glite-lb-check_version.pl
+ (cd ${top_srcdir}/interface && install -m 644 ${HDRS} ${DESTDIR}${PREFIX}${prefix}/include/${globalprefix}/${lbprefix})
clean:
@flesh PBS
+@type PBSInternalStateChange Change of internal PBS job state
+ int oldstate
+ _null_ -1
+ int oldsubstate
+ _null_ -1
+ int newstate
+ _null_ -1
+ int newsubstate
+ _null_ -1
+
+
+@type PBSTransfer Start, success, or failure of job transfer to another component.
+ logsrc destination Destination where the job is being transfered to.
+ string dest_instance Service (instance) that takes over control of the job.
+ _optional_
+ int result Result code of the transfer attempt (START, OK, REFUSED or FAIL).
+ _code_ START The sending component has started or is about to start the transfer.
+ _code_ OK The job was sent successfully.
+ _code_ REFUSED The job was refused by the other component.
+ _code_ FAIL The transfer failed for other reason than explicit refusal (eg. network timeout).
+ string reason Detailed description of the transfer, especially reason of failure.
+ _optional_
+ string dest_jobid Job id as assigned by the receiving software component.
+ _optional_
+
+@type PBSAccepted Accepting job (successful counterpart to Transfer).
+ logsrc from The software component the job was received from.
+ string from_instance Instance of the component the job was received from.
+ _optional_
+ string local_jobid New job id as assigned by the receiving component.
+ _optional_
+
+@type PBSRefused Refusing job (unsuccessful counterpart to Transfer).
+ logsrc from The software component that tried to send the job.
+ string from_instance Instance of the component that tried to send the job.
+ _optional_
+ string reason Description of the reason why the job was refused.
+ _optional_
+
@type PBSQueued Job enqued
string queue Queue name
- string owner Job owner
string name Job name
+ string owner Job owner
+
+@type PBSDequeued Job dequeued
@type PBSMatch Scheduler created exec host
string dest_host Aka exec host
@type PBSPending Scheduler is not able to find exec host, or some error occured
string reason Reasons of job pendation or errors
+@type PBSWaiting Job is waiting for some condition
+
@type PBSRun Job attempted to be run by the logging component
string scheduler Scheduler ID
_optional_
@type PBSRerun Job rerun requested
+@type PBSAbort Job aborted
+
@type PBSDone Job terminated
int exit_status Exit status
_optional_ Bypass need of 'null value'
-@type PBSDequeued Job dequeued
@type PBSResourceUsage 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.)
+ taglist resources List of resources
@type PBSError Any error occured
string error_desc Error reason
--- /dev/null
+#ifndef GLITE_LB_TYPES_H
+#define GLITE_LB_TYPES_H
+
+/**
+ * \file lb_types.h
+ * \brief L&B API common types and related definitions
+ */
+
+
+#ident "$Header$"
+/*
+Copyright (c) Members of the EGEE Collaboration. 2004-2010.
+See http://www.eu-egee.org/partners for details on the copyright holders.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*!
+ *
+ * Pair tag = value.
+ */
+typedef struct _edg_wll_TagValue {
+ char * tag; /**< User-specified information tag */
+ char * value; /**< Value assigned to user-specified information tag */
+} edg_wll_TagValue;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
_pad_ 55
string pbs_state Job state which would probably return PBS qstat (Q/R/C/....)
+int pbs_substate Job substate
string pbs_queue Name of queue in which is job queued
string pbs_owner Owner of job
string pbs_name Name of job
string pbs_scheduler Name of pbs scheduler
string pbs_dest_host Hostname of node where job is running
int pbs_pid PID of running job
-string pbs_resource_usage Glued resource usage
+taglist pbs_resource_requested Resources requested
+taglist pbs_resource_usage Resource usage
int pbs_exit_status Job exit status
string pbs_error_desc Glued error descriptions from error events
logsrc=>'qq{$dst = edg_wll_SourceToString($src);}',
cclassad=>'qq{$dst = NULL;}',
# strlist, intlist, stslist are used only in consumer API, they don't need toString method
+ taglist=>'qq{$dst = edg_wll_TagListToString($src);}',
}
);
%ULMasString = (
- logsrc=>1
+ logsrc=>1,
+ taglist=>1
);
%fromString = (
# level=>'qq{$dst = edg_wll_StringToLevel($src);}',
logsrc=>'qq{$dst = edg_wll_StringToSource($src);}',
# strlist, intlist, stslist are used only in consumer API, they don't need fromString method
+ taglist=>'qq{edg_wll_TagListParse($src, &$dst);}',
}
);
logsrc=>'"($a) == ($b)"',
timeval=>'"($a).tv_sec == ($b).tv_sec && ($a).tv_usec == ($b).tv_usec"',
cclassad=>'"($a == $b)"',
+ taglist=>'"($a == $b)"',
}
);
notifid=>'"%s"',
logsrc=>'"%s"',
timeval=>'"%s"',
+ taglist=>'"%s"',
}
);
my $f = selectField $event $_;
my $fn = $f->{name};
my $ftn = $f->getType;
+ my $type = $f->{type};
+ my $list = 'no';
+ if ($main::baseTypes{$type}) {
+ $ftn = eval $main::types{wsdl}->{$main::baseTypes{$type}};
+ $list = 'yes'
+ }
$fn = $1.ucfirst $2 while $fn =~ /([[:alpha:]]*)_([[:alpha:]_]*)/;
$ftn = $tn . '_' . $fn if ($f->{codes});
my $comment = getComment $f;
my $opt = $f->{optional} ? 'yes' : 'no';
- gen qq{\t\t\t\t<elem name="$fn" type="$ftn" optional="$opt">$comment</elem>
+ gen qq{\t\t\t\t<elem name="$fn" type="$ftn" list="$list" optional="$opt">$comment</elem>
};
}
gen "</struct>\n\n";