From: František Dvořák Date: Thu, 24 Jul 2008 15:48:39 +0000 (+0000) Subject: JPIS updates: X-Git-Tag: merge_316_6_after~61 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=e89601c77043c510e591f2e17a0783239dd03811;p=jra1mw.git JPIS updates: - update config file format - check the test (with debug gsoap-plugin too) - new attributes to config file - gsoap 2.7.10 - memleaks --- diff --git a/org.glite.jp.index/Makefile b/org.glite.jp.index/Makefile index b812b25..38c1821 100644 --- a/org.glite.jp.index/Makefile +++ b/org.glite.jp.index/Makefile @@ -144,7 +144,7 @@ soap_ops.o bones_server.o: soap_version.h soap_version.h: ${gsoap_bin_prefix}/soapcpp2 /dev/null - perl -ne '$$. == 2 && /.*([0-9])\.([0-9])\.([0-9]).*/ && printf "#define GSOAP_VERSION %d%02d%02d\n",$$1,$$2,$$3' soapH.h >$@ + perl -ne '$$. == 2 && /.*([0-9]+)\.([0-9]+)\.([0-9]+).*/ && printf "#define GSOAP_VERSION %d%02d%02d\n",$$1,$$2,$$3' soapH.h >$@ -rm soapC.cpp soapH.h soapStub.h soapClient.cpp soapServer.cpp soapClientLib.cpp soapServerLib.cpp db_ops.h: context.h diff --git a/org.glite.jp.index/config/glite-jpis-config.xml b/org.glite.jp.index/config/glite-jpis-config.xml index fda77f7..e5ed4af 100644 --- a/org.glite.jp.index/config/glite-jpis-config.xml +++ b/org.glite.jp.index/config/glite-jpis-config.xml @@ -1,62 +1,186 @@ - - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/JP/System:regtime - http://egee.cesnet.cz/en/Schema/LB/Attributes:LBserver - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - http://egee.cesnet.cz/en/Schema/LB/Attributes:parent - http://egee.cesnet.cz/en/Schema/LB/Attributes:VO - http://egee.cesnet.cz/en/Schema/LB/Attributes:aTag - http://egee.cesnet.cz/en/Schema/LB/Attributes:rQType - http://egee.cesnet.cz/en/Schema/LB/Attributes:eDuration - http://egee.cesnet.cz/en/Schema/LB/Attributes:eNodes - http://egee.cesnet.cz/en/Schema/LB/Attributes:eProc - http://egee.cesnet.cz/en/Schema/LB/Attributes:RB - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - http://egee.cesnet.cz/en/Schema/LB/Attributes:host - http://egee.cesnet.cz/en/Schema/LB/Attributes:UIHost - http://egee.cesnet.cz/en/Schema/LB/Attributes:CPUTime - http://egee.cesnet.cz/en/Schema/LB/Attributes:NProc - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatusDate - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatusReason - http://egee.cesnet.cz/en/Schema/LB/Attributes:LRMSDoneStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:LRMSDoneStatusReason - http://egee.cesnet.cz/en/Schema/LB/Attributes:retryCount - http://egee.cesnet.cz/en/Schema/LB/Attributes:additionalReason - http://egee.cesnet.cz/en/Schema/LB/Attributes:jobType - http://egee.cesnet.cz/en/Schema/LB/Attributes:nsubjobs - http://egee.cesnet.cz/en/Schema/LB/Attributes:subjobs - http://egee.cesnet.cz/en/Schema/LB/Attributes:lastStatusHistory - http://egee.cesnet.cz/en/Schema/LB/Attributes:fullStatusHistory - http://egee.cesnet.cz/en/Schema/LB/Attributes:JDL + - - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId + + + + + http://egee.cesnet.cz/en/Schema/LB/Attributes:status + + http://egee.cesnet.cz/en/Schema/LB/Attributes:jobId + + http://egee.cesnet.cz/en/Schema/LB/Attributes:owner + + http://egee.cesnet.cz/en/Schema/LB/Attributes:jobtype + + http://egee.cesnet.cz/en/Schema/LB/Attributes:parentJob + + http://egee.cesnet.cz/en/Schema/LB/Attributes:seed + + http://egee.cesnet.cz/en/Schema/LB/Attributes:childrenNum + + http://egee.cesnet.cz/en/Schema/LB/Attributes:children + + http://egee.cesnet.cz/en/Schema/LB/Attributes:childrenHist + + http://egee.cesnet.cz/en/Schema/LB/Attributes:childrenStates + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorId + + http://egee.cesnet.cz/en/Schema/LB/Attributes:globusId + + http://egee.cesnet.cz/en/Schema/LB/Attributes:localId + + http://egee.cesnet.cz/en/Schema/LB/Attributes:jdl + + http://egee.cesnet.cz/en/Schema/LB/Attributes:matchedJdl + + http://egee.cesnet.cz/en/Schema/LB/Attributes:destination + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorJdl + + http://egee.cesnet.cz/en/Schema/LB/Attributes:rsl + + http://egee.cesnet.cz/en/Schema/LB/Attributes:reason + + http://egee.cesnet.cz/en/Schema/LB/Attributes:location + + http://egee.cesnet.cz/en/Schema/LB/Attributes:ceNode + + http://egee.cesnet.cz/en/Schema/LB/Attributes:networkServer + + http://egee.cesnet.cz/en/Schema/LB/Attributes:subjobFailed + + http://egee.cesnet.cz/en/Schema/LB/Attributes:doneCode + + http://egee.cesnet.cz/en/Schema/LB/Attributes:exitCode + + http://egee.cesnet.cz/en/Schema/LB/Attributes:resubmitted + + http://egee.cesnet.cz/en/Schema/LB/Attributes:cancelling + + http://egee.cesnet.cz/en/Schema/LB/Attributes:cancelReason + + http://egee.cesnet.cz/en/Schema/LB/Attributes:cpuTime + + http://egee.cesnet.cz/en/Schema/LB/Attributes:userTags + + http://egee.cesnet.cz/en/Schema/LB/Attributes:stateEnterTime + + http://egee.cesnet.cz/en/Schema/LB/Attributes:lastUpdateTime + + http://egee.cesnet.cz/en/Schema/LB/Attributes:stateEnterTimes + + http://egee.cesnet.cz/en/Schema/LB/Attributes:expectUpdate + + http://egee.cesnet.cz/en/Schema/LB/Attributes:expectFrom + + http://egee.cesnet.cz/en/Schema/LB/Attributes:acl + + http://egee.cesnet.cz/en/Schema/LB/Attributes:payloadRunning + + http://egee.cesnet.cz/en/Schema/LB/Attributes:possibleDestinations + + http://egee.cesnet.cz/en/Schema/LB/Attributes:possibleCeNodes + + http://egee.cesnet.cz/en/Schema/LB/Attributes:suspended + + http://egee.cesnet.cz/en/Schema/LB/Attributes:suspendReason + + http://egee.cesnet.cz/en/Schema/LB/Attributes:failureReasons + + http://egee.cesnet.cz/en/Schema/LB/Attributes:removeFromProxy + + http://egee.cesnet.cz/en/Schema/LB/Attributes:uiHost + + http://egee.cesnet.cz/en/Schema/LB/Attributes:userFqans + + http://egee.cesnet.cz/en/Schema/LB/Attributes:pbsState + + http://egee.cesnet.cz/en/Schema/LB/Attributes:pbsQueue + + http://egee.cesnet.cz/en/Schema/LB/Attributes:pbsOwner + + http://egee.cesnet.cz/en/Schema/LB/Attributes:pbsName + + http://egee.cesnet.cz/en/Schema/LB/Attributes:pbsReason + + http://egee.cesnet.cz/en/Schema/LB/Attributes:pbsScheduler + + http://egee.cesnet.cz/en/Schema/LB/Attributes:pbsDestHost + + http://egee.cesnet.cz/en/Schema/LB/Attributes:pbsPid + + http://egee.cesnet.cz/en/Schema/LB/Attributes:pbsResourceUsage + + http://egee.cesnet.cz/en/Schema/LB/Attributes:pbsExitStatus + + http://egee.cesnet.cz/en/Schema/LB/Attributes:pbsErrorDesc + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorStatus + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorUniverse + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorOwner + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorPreempting + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorShadowPid + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorShadowExitStatus + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorStarterPid + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorStarterExitStatus + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorJobPid + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorJobExitStatus + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorDestHost + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorReason + + http://egee.cesnet.cz/en/Schema/LB/Attributes:condorErrorDesc + + + + + + + http://egee.cesnet.cz/en/Schema/LB/Attributes:user http://egee.cesnet.cz/en/Schema/LB/Attributes:CE http://egee.cesnet.cz/en/Schema/LB/Attributes:VO http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - + - - - https://localhost:8901 - - - http://egee.cesnet.cz/en/Schema/JP/System:owner - EQUAL - - /DC=cz/DC=cesnet-ca/O=Masaryk University/CN=Milos Mulac - - - 1 - 1 - + + + + + https://localhost:8901 + + + http://egee.cesnet.cz/en/Schema/JP/System:regtime + GREATER + + 0 + + + 1 + 1 + diff --git a/org.glite.jp.index/config/glite-jpis-test-config.xml b/org.glite.jp.index/config/glite-jpis-test-config.xml index b81b342..c860037 100644 --- a/org.glite.jp.index/config/glite-jpis-test-config.xml +++ b/org.glite.jp.index/config/glite-jpis-test-config.xml @@ -2,25 +2,24 @@ - http://egee.cesnet.cz/en/Schema/JP/System:owner - http://egee.cesnet.cz/en/Schema/JP/System:jobId - http://egee.cesnet.cz/en/Schema/JP/System:regtime - http://egee.cesnet.cz/en/Schema/LB/Attributes:user - http://egee.cesnet.cz/en/Schema/LB/Attributes:aTag - http://egee.cesnet.cz/en/Schema/LB/Attributes:eNodes - http://egee.cesnet.cz/en/Schema/LB/Attributes:RB - http://egee.cesnet.cz/en/Schema/LB/Attributes:CE - http://egee.cesnet.cz/en/Schema/LB/Attributes:UIHost - http://egee.cesnet.cz/en/Schema/LB/Attributes:CPUTime - http://egee.cesnet.cz/en/Schema/LB/Attributes:NProc - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus - http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatusDate - http://egee.cesnet.cz/en/Schema/LB/Attributes:retryCount - http://egee.cesnet.cz/en/Schema/LB/Attributes:jobType - http://egee.cesnet.cz/en/Schema/LB/Attributes:nsubjobs - http://egee.cesnet.cz/en/Schema/LB/Attributes:lastStatusHistory - http://egee.cesnet.cz/en/Schema/LB/Attributes:fullStatusHistory - + http://egee.cesnet.cz/en/Schema/JP/System:owner + http://egee.cesnet.cz/en/Schema/JP/System:jobId + http://egee.cesnet.cz/en/Schema/JP/System:regtime + http://egee.cesnet.cz/en/Schema/LB/Attributes:user + http://egee.cesnet.cz/en/Schema/LB/Attributes:aTag + http://egee.cesnet.cz/en/Schema/LB/Attributes:eNodes + http://egee.cesnet.cz/en/Schema/LB/Attributes:RB + http://egee.cesnet.cz/en/Schema/LB/Attributes:CE + http://egee.cesnet.cz/en/Schema/LB/Attributes:UIHost + http://egee.cesnet.cz/en/Schema/LB/Attributes:CPUTime + http://egee.cesnet.cz/en/Schema/LB/Attributes:NProc + http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus + http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatusDate + http://egee.cesnet.cz/en/Schema/LB/Attributes:retryCount + http://egee.cesnet.cz/en/Schema/LB/Attributes:jobType + http://egee.cesnet.cz/en/Schema/LB/Attributes:nsubjobs + http://egee.cesnet.cz/en/Schema/LB/Attributes:lastStatusHistory + http://egee.cesnet.cz/en/Schema/LB/Attributes:fullStatusHistory http://egee.cesnet.cz/en/Schema/JP/System:owner diff --git a/org.glite.jp.index/examples/query-tests/run-test.sh b/org.glite.jp.index/examples/query-tests/run-test.sh index 9c01ad0..e15d1c4 100755 --- a/org.glite.jp.index/examples/query-tests/run-test.sh +++ b/org.glite.jp.index/examples/query-tests/run-test.sh @@ -176,7 +176,7 @@ run_test_query() { echo -n "Q" X509_USER_KEY=${X509_USER_KEY} X509_USER_CERT=${X509_USER_CERT} \ $GLITE_LOCATION/examples/glite-jpis-client -f hr -q $1 \ - -i http://localhost:$GLITE_JPIS_TEST_PORT > /tmp/result 2>&1 + -i http://localhost:$GLITE_JPIS_TEST_PORT 2>&1 | grep -v '^GSLITE_GSPLUGIN: ' > /tmp/result echo -n "R " DIFF=`diff -b -B --ignore-matching-lines="query: using JPIS" $2 /tmp/result` if [ -z "$DIFF" -a "$?" -eq "0" ] ; then diff --git a/org.glite.jp.index/src/conf.c b/org.glite.jp.index/src/conf.c index 1506faf..e52b41f 100644 --- a/org.glite.jp.index/src/conf.c +++ b/org.glite.jp.index/src/conf.c @@ -116,6 +116,7 @@ int glite_jp_get_conf(int argc, char **argv, glite_jp_is_conf **configuration) if (!conf_file) { fprintf(stderr,"JP IS configuration file must be specified! "\ "Exiting.\n"); + free(conf); return 1; } else { @@ -192,6 +193,7 @@ static int read_conf(glite_jp_is_conf *conf, char *conf_file) if (!soap_get__jpelem__ServerConfigurationResponse(&soap, &out, "ServerConfiguration", NULL)) { soap_end_recv(&soap); soap_end(&soap); + soap_print_fault(&soap, stderr); return EINVAL; } soap_end_recv(&soap); @@ -205,6 +207,10 @@ static int read_conf(glite_jp_is_conf *conf, char *conf_file) for (i=0; i < out.__sizeattrs; i++) { struct jptype__attrType *attr; attr = GLITE_SECURITY_GSOAP_LIST_GET(out.attrs, i); + if (!attr->name) { + fprintf(stderr, "missing name of %d attribute in %s\n", i + 1, conf_file); + goto err; + } conf->attrs[i] = strdup(attr->name); if (attr->multival == jptype__yesNo__YES){ conf->multival_attrs = realloc(conf->multival_attrs, (mva+2)*sizeof(*conf->multival_attrs)); @@ -240,7 +246,7 @@ static int read_conf(glite_jp_is_conf *conf, char *conf_file) conf->feeds[i]->PS_URL=strdup(feed->primaryServer); if (glite_jpis_SoapToPrimaryQueryConds(feed->__sizecondition, - feed->condition, &conf->feeds[i]->query)) return EINVAL; + feed->condition, &conf->feeds[i]->query)) goto err; conf->feeds[i]->history = feed->history; conf->feeds[i]->continuous = feed->continuous; @@ -253,6 +259,13 @@ static int read_conf(glite_jp_is_conf *conf, char *conf_file) soap_done(&soap); return 0; + +err: + glite_jp_free_conf(conf); + soap_destroy(&soap); + soap_end(&soap); + soap_done(&soap); + return EINVAL; } #if 0 diff --git a/org.glite.jp.ws-interface/src/ws_fault.c b/org.glite.jp.ws-interface/src/ws_fault.c index 4cb07d9..af43511 100644 --- a/org.glite.jp.ws-interface/src/ws_fault.c +++ b/org.glite.jp.ws-interface/src/ws_fault.c @@ -73,7 +73,7 @@ static int clientGetFault(struct soap *soap, int err, const char **reason, struc } // client is based on gSoap 2.7.9b assert(detail->__type == GFNUM); -#if GSOAP_VERSIO >= 20709 +#if GSOAP_VERSION >= 20709 *f = (struct jptype__genericFault *)detail->fault; #elif GSOAP_VERSION >= 20700 *f = ((struct _genericFault *)detail->fault)->jpelem__genericFault; diff --git a/org.glite.lb.state-machine/Makefile b/org.glite.lb.state-machine/Makefile index c37df71..cac5f1c 100644 --- a/org.glite.lb.state-machine/Makefile +++ b/org.glite.lb.state-machine/Makefile @@ -113,3 +113,5 @@ job_attrs.h: lb-job-attrs.xsd job_attrs.xsl job_attrs2.h: lb-job-attrs2.xsd job_attrs2.xsl ${XSLTPROC} ../src/job_attrs2.xsl $< >$@ +jpis_config.xml: lb-job-attrs2.xsd jpis_config.xsl + ${XSLTPROC} ../src/jpis_config.xsl lb-job-attrs2.xsd >$@ diff --git a/org.glite.lb.state-machine/src/jpis_config.xsl b/org.glite.lb.state-machine/src/jpis_config.xsl new file mode 100644 index 0000000..b9adaa3 --- /dev/null +++ b/org.glite.lb.state-machine/src/jpis_config.xsl @@ -0,0 +1,67 @@ + + + + + + +<?xml version="1.0" encoding="UTF-8"?> + +<!-- generated using org.glite.lb.state-machine module --> + +<jpelem:ServerConfiguration + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:jptype="http://glite.org/wsdl/types/jp" + xmlns:jpsrv="http://glite.org/wsdl/services/jp" + xmlns:jpelem="http://glite.org/wsdl/elements/jp"> + +<!-- List of attributes IS want to receive from PS's --> + <!-- Internal attributes --> + <!-- + <attrs><name>http://egee.cesnet.cz/en/Schema/JP/System:jobId</name></attrs> + <attrs><name>http://egee.cesnet.cz/en/Schema/JP/System:owner</name></attrs> + --> + + +<!-- List of attributes IS will index --> + <!-- default filter --> + <!--<indexedAttrs>http://egee.cesnet.cz/en/Schema/JP/System:owner</indexedAttrs>--> + <!-- internal attribute (index replacement) --> + <!--<indexedAttrs>http://egee.cesnet.cz/en/Schema/JP/System:jobId</indexedAttrs>--> + <indexedAttrs>http://egee.cesnet.cz/en/Schema/LB/Attributes:user</indexedAttrs> + <indexedAttrs>http://egee.cesnet.cz/en/Schema/LB/Attributes:CE</indexedAttrs> + <indexedAttrs>http://egee.cesnet.cz/en/Schema/LB/Attributes:VO</indexedAttrs> + <indexedAttrs>http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus</indexedAttrs> + +<!-- List of type plugins --> + <plugins></plugins> + +<!-- List of feeds IS wants to receive from PS's--> + <!-- no filter, historic batch and incremental changes --> + <feeds> + <!-- replace this by Job Provenance Primare Storage endpoint --> + <primaryServer>https://localhost:8901</primaryServer> + <!-- List of conditions triggering attrs sending --> + <condition> + <attr>http://egee.cesnet.cz/en/Schema/JP/System:regtime</attr> + <op>GREATER</op> + <value> + <string>0</string> + </value> + </condition> + <history>1</history> + <continuous>1</continuous> + </feeds> +</jpelem:ServerConfiguration> + + + <!-- --> + <attrs><name>http://egee.cesnet.cz/en/Schema/LB/Attributes:</name></attrs> + + +