Commit Graph

726 Commits

Author SHA1 Message Date
Christian Beer e3f5d6cecf Tools: fix typos in error message 2016-05-25 12:25:42 +02:00
Christian Beer d6f2846a73 Tools: add check for required cmdline tools 2016-05-25 12:23:53 +02:00
Christian Beer 50dbb2e01f Tools: remove trailing white-space 2016-05-25 12:21:43 +02:00
Christian Beer b91f5167f2 Merge pull request #1547 from drshawnkwang/feature_checkperm
Feature checkperm - checks permissions of apache user and presence of php modules
2016-05-25 11:41:52 +02:00
Shawn Kwang 4a9c352e2e Added mysqli php module to the list of modules to check 2016-05-23 09:04:16 -05:00
Christian Beer 4787140f79 Merge pull request #1513 from BOINC/found_copy_file
create_work: use file_name as open_name when copy_file is set
2016-05-23 15:57:16 +02:00
Shawn Kwang 9e7bfa88ca Changed mkdir2 function to check if directory already exists, and updated it to raise an exception if there is a problem otherwise.
Added some text for the enduser to change apache 2.4 conf and add the project name and copyright holder.
2016-05-20 12:57:51 -05:00
Shawn Kwang 2f98a14301 fixed bug in indentation 2016-05-20 11:13:16 -05:00
Shawn Kwang 4575b87b4a Updated check_project script to include php module checks 2016-05-20 10:57:44 -05:00
Shawn Kwang c24ae42a9a version1 of check_project script, checks to see if certain directories are writable by apache Web server user 2016-05-16 11:28:33 -05:00
Shawn Kwang b9a1338b5a bug 1528: change script to use short hostname for config.host. URLs should still be FQDN 2016-04-20 10:42:53 -05:00
Christian Beer c57cee5ca6 create_work: use file_name as open_name when copy_file is set
If no open_name is specified in a file_ref element of the input template but copy_file is set for this file use the physical filename as logical filename.
2016-03-23 14:59:49 +01:00
marius d6d5c2610a dont add example_app to project.xml unless requested 2016-03-13 23:43:24 +01:00
funkydude 71831ee639 Expand usage of HTTPS and fix a few URLs 2016-03-08 20:04:28 +00:00
David Anderson 90cb8b9580 update_versions: fix bug that choked on <foo>1</foo> XML boolean 2015-12-23 17:16:31 -08:00
David Anderson 2eabe3eab8 server: fix typo in result file name generation (from Keith) 2015-11-20 13:19:18 -08:00
David Anderson 6b81b0e63b server: provide access to output file names without random part
- add random substring as "_r123123"
- add function remove_random_from_filename() that removes
  the random substring from an output filename
2015-11-18 13:42:06 -08:00
Rom Walton f660d9dd62 Revert "server: Refine 153f660 so that it reverts back to the original behavior by default."
This reverts commit 3cecde776b.
2015-11-18 15:40:22 -05:00
Rom Walton 2404092894 server: fix build break. 2015-11-18 13:53:10 -05:00
Rom Walton 0a63f1b05c server: remove automatic assignment of the result.random field. Reverts back to previous behavior. 2015-11-18 13:49:43 -05:00
Rom Walton 3cecde776b server: Refine 153f660 so that it reverts back to the original behavior by default.
Introduce a new template macro <RANDFILE_*/>.  This will inject a random number into the result file names making them hard to guess.
2015-11-18 13:30:57 -05:00
Rom Walton 75d4091d14 make_project: Fix path location issue 2015-11-17 01:07:39 -05:00
Rom Walton 503b94a4f6 make_project: Add some additional comments and fix white space 2015-11-17 00:30:01 -05:00
David Anderson 153f6600d0 Server (assimilator): add random string to result file names
Otherwise, result file names can be inferred from result names.
An attacker with task A could find the name of the "wingman" task B,
upload fake files as B's output files,
upload the same files as A's output files,
report A as completed, and get unearned credit.
2015-11-16 19:28:30 -08:00
Rom Walton 61f8d3dddc make_project: Make sure that scripts cannot be run from the download, stats, and user_profile directories. 2015-11-16 20:23:18 -05:00
Rom Walton 43e900b49f make_project: Make sure to turn off access to certain directories if the global configuration defaults to allow access. 2015-11-14 18:40:09 -05:00
Christian Beer 5f9ac9a0bc use safe_strcpy to prevent buffer overflow
fixes CID 27767, 27778 found by Coverity
2015-10-22 15:21:06 +02:00
Christian Beer bb6ded7975 use safe_strcpy to prevent buffer overflow
fixes CID 27777, 27797 found by Coverity
2015-10-22 15:08:08 +02:00
Christian Beer 1b5f48a8f8 use safe_strcpy to prevent buffer overflow
fixes CID 27894 found by Coverity
2015-10-22 15:02:20 +02:00
Christian Beer d160bb371b ignore time of check to of use defect
This is intentional and only an issue if multiple work generators are creating input files that have the same name but different content.
Ignores CID 27922, 27993 found by Coverity
2015-10-22 14:44:23 +02:00
Christian Beer 851412a5ec use snprintf to prevent buffer overflow
fixes CID 27969, 28010, 28027 found by Coverity
2015-10-21 17:27:19 +02:00
Christian Beer e2508a0d36 use snprintf to prevent buffer overflow
fixes CID 27939 found by Coverity
2015-10-21 17:01:12 +02:00
Christian Beer 145942cbb3 use safe_strcpy to prevent buffer overflow
fixes CID 27938 found by Coverity
2015-10-21 16:59:32 +02:00
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
David Anderson b9f0733c06 server: replace strcpy() with strlcpy() various places 2013-06-03 22:42:53 -07:00
David Anderson 3ce09f1efe create_work: job input template can specify size class 2013-05-21 20:24:02 -07:00
David Anderson 8e2524f55f Unix build: Makefile changes for "make install", from Steffen Moeller
"make install" followed by make_project should now work
2013-05-20 15:19:13 -07:00
David Anderson f1c7b6a97d fix some Clang warnings; from Steffen Moeller 2013-05-20 12:58:52 -07:00
David Anderson ac66666ed6 fix PHP warnings 2013-05-05 01:26:17 -07:00
David Anderson 1a1a01c103 - server: initialize result.size_class and workunit.size_class to -1 2013-05-03 15:09:45 -07:00
David Anderson 0c430ce1fa Add support for multi-size apps
See http://boinc.berkeley.edu/trac/wiki/MultiSize
The components of this include:
- DB changes:
    add size_class to workunit and result
    n_size_classes to app; >1 means multi-size
- size_regulator daemon program: change results states
    from INACTIVE to UNSENT carefully
- size_census program; writes quantile info in flat files
- transitioner: when creating results for multi-size apps,
    set server state to INACTIVE
- sched shmem (feeder): read quantile info from flat files,
    store in shared memory
- scheduler (score-based scheduling): for multi-size apps,
    add component to score function for size class.
- show_shmem: show result size class
- make_work (and other callers of count_unsent_results()):
    count both INACTIVE and UNSENT
- create_work: add --size_class cmdline option

Also:
- if get MySQL errors in upgrade, don't rewrite db_version
2013-04-25 00:27:35 -07:00
David Anderson 0eaaca174a - make_project: don't write <cgi_url> in config.xml; it's not used 2013-04-13 21:32:10 -07:00
David Anderson 77ee073f58 - client: show error notice if a GPU exclusion (in cc_config.xml)
has an invalid URL, type, or app
- server, create_work() function: if a <file_info> in input template
    lists URLs, they're directories; append filename to each one
2013-03-05 16:57:51 +01:00
David Anderson 48e1de5348 - remote job submission: bug fixes, and avoid divide by zero
in adjust_user_priority.  From Niclas Lockner.
2013-03-05 16:42:44 +01:00
David Anderson 3c029c7613 - client: job scheduler tweak to avoid CPU idleness in situation
where GPU jobs use different CPU fractions
- single-job submission: default platform is that of server
2013-03-05 15:57:34 +01:00
David Anderson c9ce9eeccc - single job submission: update the setup script to use the
current app version directory structure.
2013-03-05 15:57:34 +01:00
David Anderson d4a40a8841 - admin web: remove outdated code that tried to show SVN version
in the admin main page
2013-03-05 15:05:20 +01:00
David Anderson 6f98cf9dc0 - project setup: create a default gui_urls.xml file 2013-03-05 14:52:38 +01:00
David Anderson 8b25f8ccdc - job submission: show batch priority in web page;
add priority stuff to example job submission script
2013-03-04 17:44:39 +01:00
David Anderson 3d60ae2508 - add PHP script for initializing user submit priorities
based on existing batches
2013-03-04 17:39:23 +01:00
David Anderson 6f962d5b61 - file upload handler: in FCGI version, check for trigger file
each time through loop (from Bernd).
- validator: fix bug that zeroed result.random
2013-03-04 17:24:18 +01:00