Commit Graph

24 Commits

Author SHA1 Message Date
barton26 d22ed53f6a Remove semicolons in python code 2021-10-01 00:23:26 -04:00
David Anderson dd332d61ed remote job submission: specify all fields on batch creation.
Newer versions of MySQL error out if you don't.
2020-09-24 22:06:53 -07:00
David Anderson 97f62d2e01 remote job submission: add set_timeout() to Python API 2019-11-19 16:00:21 +01:00
David Anderson 33b1c68bc2 remote job submission: add API for getting job counts
If a remote job submission system wants to maintain a constant
level of unsent jobs, it needs a way to get this value.
This commit adds a Python API for this.
It also returns other counts such as in-progress results,
and WUs needing validation/assimilation/file delete.

I could add PHP and C++ interfaces too if needed.
2019-01-16 20:57:31 -08:00
David Anderson a796c66bde Remote job submission: fix bugs when using per-job templates
The RPC handler wasn't looking in per-job templates for rsc_fpops_est.

This commit alters the API for job submission.  Please see
https://boinc.berkeley.edu/trac/wiki/RemoteJobs for the current API
details
2017-10-17 08:13:29 -05:00
David Anderson c0de76d4be Remote job submission: support app_version_num argument
Change the submit_batch RPC, and the various bindings of it (PHP, Python, C++)
to support an app_version_num arg,
specifying which app version number should be used to process the jobs in the batch.
2017-08-17 23:55:15 -07:00
David Anderson b38bf1d983 stage_file and remote file management: fix bug with .md5 file mod time
In some cases of file staging (both remote and via stage_file)
we'd do the following:
1) create the .md5 file (in check_download_file())
2) move or copy the file into the download dir

This can result in the file having a later mod time than the .md5 file,
which causes process_input_template() to reject the .md5 file.

Solution: touch the .md5 file after the move or copy
2017-05-25 20:26:36 -07:00
David Anderson 2b6eff91f6 remove job submission: fixes to query_batch() 2017-03-02 13:38:40 -08:00
David Anderson 0681baad54 remote job submission: add <get_job_details> option to query_batch() 2017-02-25 15:05:14 -08:00
David Anderson 9b75ddebec remote job submission: fix bug when specify per-job input templates
I used map<char*, char*> to cache templates.
Using char* as a map key doesn't work as intended.
Change it to std::string.
2017-02-21 06:49:44 -08:00
David Anderson 39547c574f remote file management: improve error checking 2017-02-17 12:58:35 -08:00
David Anderson 52429613bf remote job submission: wrong template path in a certain case 2017-02-16 01:26:10 -08:00
David Anderson ef49109a88 remote job submission: fix error if no input files
also use hashlib instead of md5 in python code to avoid deprecation warning
2017-01-29 15:19:28 -08:00
David Anderson 0b6cb9e0d5 input file management: standardize creation of .md5 files
Files in the download dir can have accompanying ".md5" files
containing their MD5 and size.
This eliminates the need to calculate these when creating a job using the file.

The .md5 files were being created by stage_file (local staging)
but not by remote file management.
In fact, the latter wasn't checking for file immutability violations.

I changed remote file management to add this check,
and to create the .md5 file.
The latter is done in a new function shared with stage_file.
2017-01-29 11:54:18 -08:00
David Anderson 030069c36a remove job submission: don't require the presence of an input template file
If jobs specify their own input templates, shouldn't have to have one
2017-01-28 01:25:12 -08:00
David Anderson 23a43c7c5d remove file management: fixes; add python interface to query_files 2017-01-27 14:21:03 -08:00
David Anderson 37854b5262 remote job submission, python interface: fix typo 2017-01-27 13:55:26 -08:00
David Anderson e2d09f3de7 remote job submission: bug fix 2017-01-27 12:35:35 -08:00
David Anderson 01533dc9e4 remote file management: bug fixes
- The RPC handler was expecting the "BOINC names" to be the file MD5.
  This is no longer true; the BOINC name can be anything as long as it's unique.
- To reflect this, use <phys_name> instead of <md5> in request messages.
  This means that you'll need to update both RPC client and server software.
- BoincJobFile::insert() needed to return the insert ID
2017-01-25 16:17:42 -08:00
David Anderson 381e0caf14 Remote job submission: add support for per-job templates in submit requests
This supports the TACC use case,
in the jobs in a batch can use different Docker images
and different input and output file signatures,
none of which are known in advance.

Python API binding:
    - A JOB_DESC object can optionally contain wu_template and result_template
        elements, which are the templates (the actual XML) to use for that job.
        Add these to the XML request message if present.
    - Added the same capability to the PHP binding, but not C++.
    - Added and debugged test cases for both languages.

    Also, submit_batch() can take either a batch name (in which case
    the batch is created) or a batch ID
    (in which the batch was created prior to remotely staging files).

RPC handler:
    - in submit_batch(), check for jobs with templates specified
        and store them in files.
        For input templates (which are deleted after creating jobs)
        we put them in /tmp,
        and use a map so that if two templates are the same we use 1 file.
        For output templates (which have to last until all jobs are done)
        we put them in templates/tmp, with content-based filenames
        to economize.
    - When creating jobs, or generating SQL strings for multiple jobs,
        use these names as --wu_template_filename
        and --result_template_filename args to create_work
        (either cmdline args or stdin args)
    - Delete WU templates when done

create_work.cpp:
    handle per-job --wu_template and --result_template args in stdin job lines
    (the names of per-job WU and result templates).
    Maintain a map mapping WU template name to contents,
    to avoid repeatedly reading them.

    For jobs that don't specify templates, use the ones specified
    at the batch level, or the defaults.
2017-01-21 00:24:11 -08:00
David Anderson d00c641703 remote job submission test code: tweak 2016-10-19 13:20:34 -07:00
David Anderson 799126a039 Mostly finish Python interface to remote job submission and file handling 2016-10-18 00:38:02 -07:00
David Anderson 2ce773d320 Add Python interface for remove job submission 2016-10-16 16:30:16 -07:00
David Anderson d19c366692 update CERN URL 2016-10-16 16:28:55 -07:00