Commit Graph

27 Commits

Author SHA1 Message Date
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 bed8265d29 remote job submission: return better error msg if file too large 2017-05-23 12:09:01 -07:00
David Anderson 3f0f36ac5a remote file management: allow long filenames
Originally, the idea for remote file management was that
the physical name of a file was its md5, or jf_md5.
This was changed to let the submitter choose the name.
But in the DB (job_file.md5) we only kept 64 chars.

Change the field name to job_file.name, and change it to varchar(255)
2017-02-17 13:51:30 -08:00
David Anderson 39547c574f remote file management: improve error checking 2017-02-17 12:58:35 -08:00
David Anderson 863ae7331a remote file management: fix typos found by Scrutinizer 2017-01-29 12:37:17 -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 27018ca2a8 remove file management: fix typos 2017-01-25 17:39:31 -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
Christian Beer caaefce47b Merge pull request #1640 from BOINC/fix_job_file_upload
The upload_files function did not do a good job on error reporting. It now can handle and report several more problems.
- Loop over the uploaded files not the supplied md5 values so we can detect a discrepancy between the two
- Check upload error value provided by PHP (catches filesize limit problems, permission problems and partial uploads)
- Calculate md5 of uploaded file and check with supplied values (The size of uploaded files is typical small enough so this is not a problem)
- Report any error condition in the response and delete the uploaded files (especially if they are in the PHP temp directory)
- Added script to debug upload problems
2016-11-23 13:45:15 +01:00
Christian Beer f3c380f411 Merge pull request #1634 from bema-ligo/remote_submission_log
remote submission: log xml requests to file specified as <remote_submisson_log>
2016-11-23 13:43:20 +01:00
David Anderson 2ce773d320 Add Python interface for remove job submission 2016-10-16 16:30:16 -07:00
Christian Beer 144f5343fb Web: fix typo
Found by a scrutinizer-ci.com Inspection
2016-09-06 09:13:07 +02:00
Christian Beer 438ffabcaa Web: fix job file upload error reporting
The upload_files function did not do a good job on error reporting. It now can handle and report several more problems.

* Loop over the uploaded files not the supplied md5 values so we can detect a discrepancy between the two
* Check upload error value provided by PHP (catches filesize limit problems, permission problems and partial uploads)
* Calculate md5 of uploaded file and check with supplied values (The size of uploaded files is typical small enough so this is not a problem)
* Report any error condition in the response and delete the uploaded files (especially if they are in the PHP temp directory)
2016-09-05 14:13:12 +02:00
Bernd Machenschalk 0e45430865 remote submission: log xml requests to file specified as <remote_submisson_log> in config.xml 2016-09-01 11:20:57 +02:00
David Anderson c56f284904 remote job submission: improve error handling.
The way errors were being handled in submit_rpc_handler.php,
the replies could end up looking like:
<error>
    ...
    </error>
<actual_reply>
    ...
</actual_reply>

which doesn't parse with PHP's simplexml because there's no outer element.
So the PHP interface to job submission didn't work in some cases.

To fix this, I changed the RPC replies to have an enclosing element,
which is the name of the RPC, e.g.
<submit_batch>
    <error>
        ...
    </error>
    ... other stuff
</submit_batch>

RPC replies should now always be valid XML, errors or not.
2016-07-31 23:00:24 -07:00
David Anderson a259991c7a Fix bugs in content-based file management system
- stray return in compute_boinc_name()
- BoincJobFile::delete() was wrong
- error-check DB record deletions
2016-07-24 22:55:33 -07:00
Bernd Machenschalk c4d79c39d8 web: job_file.php: use project_dir() to get the project directory (instead of ../..) 2016-07-22 11:04:44 +02:00
David Anderson e11b62adab Improve error reporting for XML RPCs
- If handling an XML RPC, use set_error_handler() to output PHP warnings as XML.
Otherwise they appear as strings in the XML reply, making them not parse.

- suppress warnings from PHP function calls where we're already checking errors
2016-07-22 01:41:43 -07:00
David Anderson 1872fd0f6b web: eliminate some mysql_*() calls in preparation for mysqli conversion 2013-11-22 22:46:19 -08:00
David Anderson 29c41fd980 Bug fixes for job file management and BOINC GAHP, from Jaime Frey 2013-09-09 16:18:43 -07:00
David Anderson 1c31f6feaa Condor: fix bug when 2 input files have same contents; fix error messages 2013-08-09 16:06:36 -07:00
David Anderson 48e044fa76 Condor interface: bug fixes, and set WU names correctly 2013-05-28 23:14:17 -07:00
David Anderson d6c92d870c - Code cleanup for remote job submission
- Add abort_jobs operation to BOINC GAHP
- Change batch-related RPCs so that you can identify batch
    either by database ID or name
2013-03-05 17:15:18 +01:00
David Anderson 7f4263b079 - Condor stuff; basic function works now! 2013-03-05 14:26:40 +01:00
David Anderson 2a73dc0e01 - remote file management stuff for Condor 2013-03-05 14:05:04 +01:00