[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Condor 8.5 SOAP Question



The related sample-code looks as follows:

Transaction transaction = scheduler.beginTransaction(30).getTransaction();
Integer clusterId = scheduler.newCluster(transaction).getInteger();
Integer jobId = scheduler.newJob(transaction, clusterId).getInteger();
ClassAdStructAndStatus classAdStructAndStatus = scheduler.getJobAd(transaction, clusterId, jobId);
	I'm not familiar with the specifics of our SOAP implementation, 
but the problem here may be that you're trying to get the job ad before 
you've finished building it.
How is Condor supposed to know, who owns a job, if the 'Owner' ClassAd is
only defined in the ' createJobTemplate' which needs the jobId from
'newJob'?
	As I understand it, all the newJob() does -- despite the name -- 
is allocate a new procID.  At that point, the job ad is almost entirely 
empty.  (For non-SOAP connections, the job may already have an Owner 
attribute, because the connection itself authenticates as a particular 
Owner.)
	The examples for SOAP I've seen either build a job ad by hand or 
call createJobTemplate() to generate a job class ad.  You then submit the 
job ad you built and commit the transaction.  To continue your example:
Transaction transaction = scheduler.beginTransaction(30).getTransaction();
Integer clusterId = scheduler.newCluster(transaction).getInteger();
Integer jobId = scheduler.newJob(transaction, clusterId).getInteger();
ClassAdStructAttr[] jobAd = { ownerAttr, cmdAttr, argsAttr };
schedd.submit(transaction, clusterId, jobId, jobAd);
schedd.commitTransaction(transaction)

where 'ownerAttr', 'cmdAttr', and 'argsAttr' are (example) ClassAdStructAttr
objects created however you find convenient.

Is there a way to define a default job-owner for SOAP?
	If I recall correctly, you can configure HTCondor to generate an 
Owner attribute for SOAP by using SSL and the HTCondor mapfile.
	There's a fully-worked example at the following URL (although it 
uses Axis rather than JAX-WS):
https://spinningmatt.wordpress.com/2009/11/02/submitting-a-workflow-to-condor-via-soap-using-java/

If you still see problems (or if you try with HTCondor 8.4 and it works), please let us know, and we'll take a closer look to see if we accidentally broke something. Thanks!
- ToddM