Commit Graph

643 Commits

Author SHA1 Message Date
Rom Walton cb340c533c Merge pull request #1371 from marius311/master
new `make_project` options which allow building and running project on different systems
2015-07-24 07:18:15 -04:00
David Anderson 8cd8c8e7ee server software: handle 64-bit database IDs
The SETI@home result table is about to run out of 32-bit IDs,
so we need to move to 64-bit result IDs.
This will happen to the workunit table at some point too.

I changed the server C++ code to use the "long" type for all DB IDs
(and to use appropriate conversion codes like %lu).
"long" is 64 bit on 64-bit machines.
For uniformity I did this for all tables,
even ones (like app) that will never get big.

I chose NOT to change the DB schema for now.
The new code will work with 32-bit ID fields in the DB.
As projects approach the 32-bit limit on a table they can change
its ID field, and fields that reference this table, to BIGINT.
This is likely to happen only on the result and workunit tables.
I put functions in html/ops/db_update.php
to change the IDs of these tables.
2015-07-23 10:11:08 -07:00
marius add497f1f6 added --project_host option to make_project 2015-07-20 16:45:30 -07:00
marius d384489952 added --no_db option to make_project 2015-07-20 15:46:52 -07:00
David Anderson 9988c831e1 make_project: don't do update_stats by default 2015-07-10 00:02:29 -07:00
David Anderson 84259c408f xadd: replace Python script with PHP equivalent
The python version was failing cryptically.
For scripts that access the DB, I'd like to move from Python to PHP,
so that we have one less DB layer to maintain.
2015-06-27 13:31:03 -07:00
Rom Walton f8d2cfdff3 tools: Fix typo in make_project. 2015-06-08 23:06:21 -04:00
David Anderson c3efe4fe44 make_project: comment tweak 2015-04-15 21:58:14 -07:00
David Anderson f81105f707 create_work: show DB error messages 2015-04-13 23:58:59 -07:00
David Anderson e5d845dad2 create_work: add --continue_on_error option 2015-03-17 09:45:27 -07:00
David Anderson 51b3e05fd1 create_work: add --verbose option 2015-03-16 14:16:27 -07:00
David Anderson a7a05ca184 stage_file: add --verbose option 2015-03-16 13:58:08 -07:00
David Anderson 35950cf193 stage_file: if arg is a dir, stage all files in that dir 2015-03-11 12:26:24 -07:00
David Anderson e4172f1535 update_versions: fix bug related to MYSQLI changes
PHP tools now need chdir into html/inc before including DB-related files
2014-09-28 01:47:59 -07:00
David Anderson 2d99dccc2e update_versions: fix bug when have > 1 URLs for file 2014-09-19 08:48:19 -07:00
David Anderson 4850d0236c update_versions: handle files that are both gzipped and replicated 2014-09-17 10:30:48 -07:00
David Anderson 2fa78ba328 make_project: don't generate Apache 2.4 directives because they break 2.2
... but put in comments saying what changes are needed.
2014-08-18 00:14:58 -07:00
David Anderson 25fc233f4d make_project: change httpd conf syntax for Apache 2.4
Add

Require all granted

as well as (for 2.2)

Order allow,deny
Allow from all

See http://httpd.apache.org/docs/2.4/upgrading.html#run-time
2014-08-17 23:58:30 -07:00
Rom Walton 7feae3ae7f tools: make sure update_versions actually puts the api_version into the xml_doc field. 2014-07-31 14:28:39 -04:00
David Anderson 09832f4335 update_versions: remove unused code 2014-07-29 11:28:13 -07:00
David Anderson 44906a92b4 update_versions: msg tweak 2014-07-29 11:26:06 -07:00
David Anderson cd64b384da update_versions: version.xml can specify API version
Normally update_version gets the API version from the executable,
by scanning for the string API_VERSION.
However, if the project compresses executables this won't work.
So let it be specified in version.xml.
2014-07-29 11:11:48 -07:00
David Anderson aa04502db4 create_work: allow targeting commands in stdin job descriptions 2014-07-25 00:51:51 -07:00
David Anderson 870cbb0079 create_work program: add --hr_class cmdline argument 2014-07-02 00:17:20 -07:00
David Anderson b4dba535c0 web: fix typo 2014-06-21 13:40:02 -07:00
David Anderson 032d4529a2 update_versions: allow <beta/> in version.xml, to specify beta app version 2014-06-06 09:47:33 -07:00
David Anderson 558d76212f server: fix race condition when creating targeted jobs.
We were creating the workunit, then updating its transitioner_flags field.
If the transitioner runs inbetween,
it would (incorrectly) create results for the workunit.
Solution: set transitioner_flags during insert.
2014-06-02 19:01:44 -07:00
David Anderson 03850d103d create_work: error out if bad ID arg in "--target_host ID" etc.
Actually we just check that the arg is nonzero.
We could look up the DB record (e.g. the host record)
but that would slow down mass job creation.
2014-05-21 09:20:33 -07:00
David Anderson cecee4bc9e create_work: make targeting work with stdin-based job creation 2014-05-02 00:24:59 -07:00
David Anderson 3a82ec871f create_work: fix bug when using remote input files 2014-04-25 22:15:47 -07:00
David Anderson 944e5a3b29 job submission: generate physical name for remote input files
Don't require job submitters to come up with (unique) names
for remote input files.  Just use "jf_MD5".
2014-04-21 13:19:10 -07:00
David Anderson 46d90b2b60 server: improve support for remote input files
A "remote input file" is located on a data server other than the project server.
Previously these could be specified only in the input template,
which was of limited utility.
Add new ways of specifying remote input files:
1) in the create_work program, a remote input file can be specified
  with command-line args
  --remote_file name URL nbytes MD5
  or by the same syntax in stdin when creating multiple jobs
2) add a variant of create_work() called create_work2(),
  which takes a vector of INFILE_DESC structures that can specify
  either local or remote files
2014-04-20 23:52:51 -07:00
David Anderson 65ec42da6c remote job submission: fix bug 2014-04-14 12:33:43 -07:00
David Anderson 39edd6d3f8 remote job submission: improve error reporting 2014-04-12 10:05:59 -07:00
David Anderson fec574f4e8 create_work: increase the efficiency of bulk job creation
The job submission RPC handler (PHP) originally ran the
create_work program once per job.
This took about 1.5 minutes to create 1000 jobs.
Recently I changed this so that create_work only is run once;
it does one SQL insert per job.
Disappointingly, this was only slightly faster: 1 min per 1000 jobs.

This commit changes create_work to create multiple jobs per SQL insert
(as many as will fit in a 1 MB query, which is the default limit).
This speeds things up by a factor of 100: 1000 jobs in 0.5 sec.
2014-04-10 23:53:19 -07:00
David Anderson 99a21e3443 remote job submission: create batches more efficiently
Change the "submit_batch" RPC handler to use the new feature of create_work
that lets you create multiple jobs in one command.
2014-04-07 10:14:32 -07:00
David Anderson c3cbf29af3 create_work: add --stdin option for more efficient batch creation
Previously if you wanted to create lots of jobs from a script (e.g. PHP)
you had to run create_work once per job.
With the --stdin option you run it once,
passing it a file (view stdin) with one line per job.
Each line can specify a command line and/or a set of input files.

On my server this gives a performance of about 1000 jobs per minute,
which is less than I would have expected,
but all the time is spent in doing MySQL inserts
so that's as good as we can do for now.

Also fix a bug in stage_file.
2014-04-07 09:07:00 -07:00
David Anderson 97229c0fcf Server: enable gzipped input files, and fix bugs in MD5 caching
The docs said that putting <gzip/> for a file in your input template
would cause it to be transferred in gzip form.
But most of the server-side implementation was missing.

- in process_input_template(), parse <gzip/>,
  and add <gzipped_url> elements to the output.
- stage_file was generating MD5 cache files containing only the MD5,
  but process_input_template() expected them to contain file size as well.
  Change stage_file to write both,
  and change process_input_template() to write an error message
  if it finds a bad MD5 file.
- remove stuff from process_input_template() related to
  "generated_locally", a feature that doesn't exist anymore.
2014-03-26 15:15:16 -07:00
David Anderson 92fec3e4ae admin web: enhance badge admin page
- add delete button
- show # of badges assigned
- don't use separate head/tail function are admin pages
- add badge assign task for new projects
- turn on db_dump, update_uotd, update_forum_activities,
  update_profile_pages, notify for new projects
2013-12-23 21:02:55 -08:00
David Anderson a33e76e656 admin web: add "SQL rule" field to badge form 2013-12-13 00:07:36 -08:00
David Anderson 50863972b4 update_versions: handle <is_wrapper> flag 2013-11-07 11:49:04 -08:00
David Anderson 438cd78b13 Remote job submission: add C++ APIs for query_batches() and query_batch()
- Add program (tools/remote_submit_test.cpp) for testing C++ API for remote job submission.
- Rename Condor-specific API to query_batch_set().
2013-10-22 15:27:34 -07:00
David Anderson 0c8e30d0e9 Translation: update templates, and fix tools for generating templates 2013-10-15 22:46:18 -07:00
David Anderson c6346bef5f Translation system: fixes and updates
Add script (compare_pot) for comparing templates module comments,
   and sending reminder emails if they differ.
Add script (buid_pos) for generating all templates and comparing
   them with current versions.
2013-10-15 11:19:59 -07:00
David Anderson 34933c8cd6 make_project: revert change that doesn't work with Apache 2.2 2013-09-17 23:13:49 -07:00
David Anderson ffd4b89905 make_project: add HTTP config file items for Apache 2.4 2013-09-05 06:03:04 -07:00
David Anderson 223f448739 Server: fix "make install" file permission 2013-08-23 22:05:59 -07:00
David Anderson ef82d5d9fb server: fix compile error on systems that don't define MAXPATHLEN 2013-08-22 17:01:45 -07:00
David Anderson 3faf18c7b4 remote_submit script: exit with nonzero status if error
Also, suppress warnings from simplexml_load_string()
2013-07-16 13:18:46 -07:00
David Anderson 78f7610f6e remove dependency of boinc_api.h on str_replace.h (and hence config.h)
Any files that use strlcpy() or strlcat() must directly include str_replace.h
2013-06-06 17:31:46 -07:00