Commit Graph

3146 Commits

Author SHA1 Message Date
Kevin Reed 768447941f Merge branch 'dpa_submit3_redo' 2017-10-17 08:40:41 -05: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 e86f29e7fb Merge pull request #2092 from LocutusOfBorg/new-glibc
Fix build with new glibc 2.26
2017-10-15 15:32:46 -07:00
David Anderson 8495e2f806 Merge pull request #2133 from BOINC/dpa_template
job submission: don't error out if standard templates missing; change comment in transitioner
2017-09-23 14:32:04 -07:00
Juha Sointusalo 27dfa374e3 lib: set correct buffering mode after cycling logs
After freopen() stream is fully buffered. In this mode client's log
messages are written to stdoutdae.txt BUFSIZ (typically 512) bytes
at a time.

Set stdout to line buffered mode after freopen() so that messages
are written one line at a time.

Set stderr's buffering mode after making sure freopen() succeeded.

Fixes #2141.
2017-09-23 23:23:38 +03:00
David Anderson 3fb7949336 remote job submission: make python and PHP APIs agree 2017-09-19 16:56:21 -07:00
RichardHaselgrove 8e1a54621f client library: inconsistent terminology for intel_gpu
fixes presenting problem in #2103
2017-09-14 01:09:30 -07:00
Gianfranco Costamagna 4f11a3edd7 Update xlocale definitions also for gui_rpc_client.h 2017-09-08 09:59:41 +02:00
David Anderson 3308d58615 Merge pull request #2075 from BOINC/xml_parse_fix
XML parser: never use fgets(); don't require any tags to be on differ…
2017-08-25 16:18:04 -07:00
David Anderson cebee1ccc0 XML parser: never use fgets(); don't require any tags to be on different lines
There were a few places, like copy_element_contents() type functions,
that used fgets() and looked for end tag on that line.
The problem is this wipes out next tag if it's on same line.
2017-08-25 15:43:21 -07:00
David Anderson 89248f56c9 Merge pull request #2074 from BOINC/am_parse_fix
Fix parsing of AM reply messages
2017-08-25 15:35:42 -07:00
Charlie Fenton 61c3c64b3d Manager: Include android_debug in Event Log Options and in cc_config.xml file only if running on Android 2017-08-18 02:12:51 -07: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 da64baf29d Merge pull request #1895 from AenBleidd/PVS_V814_for_pr
Move 'strlen' function outside of the loop
2017-08-14 17:37:12 -07:00
David Anderson d1561a7402 Merge pull request #1638 from BOINC/fix_c++11_build
Fix c++11 build
2017-08-14 16:56:02 -07:00
David Anderson 870d34ad03 Fix parsing of AM reply messages
- use std::string instead of malloced array for ACCT_MGR_OP::global_prefs_xml
- use copy_element_contents() instead of dup_element_contents()
  to get global prefs.
  The latter uses fgets instead of fgetc,
  so it requires that close tag be on a line by itself.
  TODO: don't use fgets anywhere in XML parsing.
- fix a bug in copy_element_contents() where it consumes an extra character
2017-08-14 14:46:30 -07:00
David Anderson 92d87fbc97 Merge pull request #2008 from JuhaSointusalo/lib-fix-boinc-file-exists
lib: fix boinc_file_exists() on Windows
2017-08-09 22:36:48 -07:00
David Anderson ed9e1e8c99 Merge pull request #1980 from JuhaSointusalo/lib-fix-get_real_executable_path
lib: fix out of bounds write in get_real_executable_path
2017-08-04 15:06:34 -07:00
David Anderson 59716fc84d Merge pull request #1979 from JuhaSointusalo/client-no-flush-in-mainloop
client/lib: don't flush stdout and stderr in main loop
2017-08-04 15:04:48 -07:00
Juha Sointusalo eaf200e54d lib: fix boinc_file_exists() on Windows
The function is documented to check if anything exists at the given path. The client depends on this behavior. If the function checks only for regular files the client will fail to clean up slot directories before using them for another task.

Fix the function to match the documentation.
2017-08-03 23:07:53 +03:00
David Anderson 1e55ec0c82 fix fcgi build, hopefully 2017-07-30 16:06:43 -07:00
David Anderson d15d0b95de client: parse keyword file and export keywords in get_state() GUI RPC
- This adds overhead to the get_state() call,
  but this happens only once per minute with the Manager.
- rename things so that "keyword_ids" refers to lists of keyword IDs
  and "keywords" refers to full KEYWORD objects
- have boinccmd include keywords in workunit properties
2017-07-30 13:12:16 -07:00
David Anderson 85d1c0fc63 client: parse job keywords from scheduler and save in state file 2017-07-29 14:51:39 -07:00
David Anderson 20d07be2b8 back end: add keyword-based component to job scheduling score.
- add DB field for storing job keywords: workunit.keywords
    add this to various DB parse/write functions
- add --keywords option to create_work for specifying job keywords
- add <keyword_sched> option in config.xml for enabling keyword score
    (it's disabled by default).
    If set, increment score for "yes" keyword matches,
    and disallow jobs with "no" matches
- in scheduler, add array job_keywords_array for parsed versions
    of job keywords (vector<int>)

also:
- use symbols instead of numbers for slow_check() return values
- parse unused fields in req message to remove unparsed-XML warnings
2017-07-22 00:48:38 -07:00
Juha Sointusalo 2f7de95b41 lib: fix out of bounds write in get_real_executable_path
If the link were max_len bytes long or longer, the null terminator would have been written one past the end of path.
2017-07-17 22:11:24 +03:00
Juha Sointusalo 6b67fe6152 client/lib: don't flush stdout and stderr in main loop
The client flushes stdout and stderr at every iteration of the main loop. On Windows, stderr is opened in commit mode and this results in a write to NTFS $Log every time the stream is flushed even if nothing was written to the stream since last flush. These unnecessary writes totals to several hundred megabytes per day. Some users are concerned that this shortens the lifespan of their hardware.

Fix this by removing the flushes from main loop. stderr is unbuffered so it never needed the flush. After freopen() in diagnostics_init() stdout is fully buffered. Change stdout to line buffered mode so that log messages are visible in log files immediately.

MSVCRT doesn't support line buffered streams. It treats them as fully buffered. Emulate line buffered stream by flushing stdout in logging functions when compiling with Visual C++.
2017-07-17 21:58:23 +03:00
Charlie Fenton 15680d88a2 Mac uninstaller: better optimization and error checking 2017-07-16 20:50:03 -07:00
Rom Walton a07c33744b Merge branch 'master' of github.com:BOINC/boinc 2017-07-16 14:22:31 -07:00
Rom Walton a91f4c6408 LIB: Prevent the possible issue of dereferencing a NULL pointer. 2017-07-16 14:22:20 -07:00
David Anderson 930f58e1c6 Add new file to Win project; fix compile warning
Also update Installshield files for VBox 5.1.22
2017-07-16 12:08:21 -07:00
David Anderson 5add5fda1d client: update keyword handling
new keyword model:
- keywords as identified by integer IDs
- instead of being treated as opaque data,
    the keyword XML is now parsed by the client.

This is a first step: pass keywords from AM to client to scheduler,
so that they can be used in job filtering.
Displaying keywords in the client will come later.
2017-07-15 19:05:23 -07:00
Rom Walton daee3b66fc Merge branch 'master' of https://github.com/BOINC/boinc 2017-07-15 11:06:01 -07:00
Charlie Fenton ff355b7a6c Mac uninstaller: fix incompatibility with OS 10.6 2017-07-15 05:07:49 -07:00
Charlie Fenton baafd72e19 Mac installer: Prevent displaying "OSAScript" in menu bar on newer versions of OS X 2017-07-14 04:12:16 -07:00
Charlie Fenton 5d9df2de45 lib: Mac: add missing dlclose() 2017-07-11 07:24:35 -07:00
David Anderson 9c13fe9548 Merge branch 'master' of github.com:BOINC/boinc 2017-07-07 13:45:35 -07:00
David Anderson 3a96e95d02 GUI RPC client: use std::string instead of fixed-size buffer for requests
RPC_CLIENT::send_request() had a local char[100000] variable.
I got a stack trace from a crash on entry to this function, in __chkstk(),
presumably a stack overflow.
Shouldn't happen on a modern system, but may as well eliminate the possibility.
2017-07-07 13:37:11 -07:00
Charlie Fenton a9a5e48c60 lib: Mac: Fix bug which crashed PostInstall app causing installer failures when authorizing non-admin users to run Manager 2017-07-07 06:02:10 -07:00
David Anderson 824b3e7654 Manager: don't crash if GUI RPC returns empty reply
... though it's not clear how this could happen.
2017-07-06 01:10:26 -07:00
David Anderson f4a42f0d33 Win build: fix compile warning 2017-07-05 01:17:06 -07:00
David Anderson 8b06de2d28 change comment; not functional change 2017-07-03 14:46:01 -07:00
David Anderson ff7633a65d client: fix bug in URL-escaping that fails for non-ASCII chars 2017-07-01 23:26:24 -07:00
Rom Walton de26ed5674 Increase the number of use cases file_size() works correctly, per JuhaSointusalo.
Juha had a good point in pull-request #1860, capture the bug fix before it gets lost in the sands of time.
2017-06-20 06:55:40 -07:00
David Anderson 12b802df98 scheduler: write log msgs to stderr; fixes bug introduced in #5edf74a 2017-06-14 22:31:10 -07:00
David Anderson 90f8a1d4b4 client/scheduler/db: store GPU count and peak FLOPS in DB host table
This lets a project easily see how many GPUs and how much GPU power it has
2017-06-13 22:35:17 -07:00
David Anderson d11e775275 lib: fix compile warning in parse.cpp
The XML code had some random hardwired buffer sizes.
Make these uniform: max tag length is 4K, max element length is 64K
2017-06-09 15:12:40 -07:00
Charlie Fenton 65e752aa32 lib: update implementation of Mac function compareOSVersionTo(x, y) for better compatibility with future versions of OS X 2017-06-08 02:26:45 -07:00
David Anderson b16718f43c server: fix compile error 2017-06-07 12:43:56 -07:00
Charlie Fenton 4654a5e63d Mac backtrace: make detection of OS Version number more robust. 2017-06-07 04:04:25 -07:00
David Anderson a99cfd7244 sched message logging: add new level MSG_DETAIL 2017-06-06 15:53:11 -07:00