Commit Graph

120 Commits

Author SHA1 Message Date
David Anderson 99adec43ef Additions and fixes to plan class mechanism
- new plan class features:
    <user_id>
    <infeasible_random>
    <cpu_model_regex>
    <min_gpu_peak_flops>, <max_gpu_peak_flops>
- apply projected_flops_scale to GPU as well as CPU apps
- web code: recognize "amd" as well as "ati"
2018-05-15 21:56:17 -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 6121ce1b58 scheduler: add flags to host description for Vbox extensions present, enabled 2016-06-28 12:19:02 -07:00
David Anderson d5f5918111 Replace strncpy() with strlcpy() various places.
Except for very specific cases, strncpy() should never be used.
It can result in a non-terminated string.

Also replace strncat() with strlcat(); the latter is simpler
because you don't have to calculate remaining buffer space.
2016-02-01 20:23:18 -08:00
David Anderson 9daab7acb1 Scheduler: when matching host by CPID, make sure basic system params match
In handling a request without host ID, if we match a host record by CPID,
make sure the computers are not obviously different.
2016-01-15 15:48:12 -08:00
Rytis Slatkevièius f33c4ed1d6 Sched: use X-Forwarded-For as the client's IP address in case it is set (if the scheduler is behind a load balancer, environment's remote_addr will contain load balancer's IP). 2015-11-03 10:15:07 +02: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
David Anderson 74e6a5fb10 scheduler: don't mark jobs as abandoned if request lists jobs; from William Stilte 2015-07-08 13:49:29 -07:00
David Anderson 9411118774 client: fix bug where GPU jobs non suspended
There was a bug where, when you suspend GPU activity,
GPU jobs show as suspended but are not actually suspended.
This was because of recent changes to distinguish GPU and non-GPU coprocs.
Change things so that coprocs are by default GPUs.
If you want to declare a non-GPU coproc in your cc_config.xml,
you much put <non_gpu/> in its <coproc> element.
2014-12-08 20:38:56 -08:00
David Anderson 870ec73327 scheduler: fix crash bug caused by recent checkin 2014-10-09 08:56:03 -07:00
David Anderson 323d61bcee scheduler: fix bug that would send work for miner_asic only if other types requested also 2014-10-08 10:18:16 -07:00
David Anderson a7c6b32ca2 scheduler: changes to allow the code signing key to be changed.
Aargh!  My checkin of 31 Aug 2011 causes the client to strip the trailing \n
from the code-signing key; this change affects 7.0+ clients.
This broke the documented protocol for changing code-signing keys,
since signatures for the new key with the trailing \n won't work.

Solution: when you change code-signing key,
you have to sign both the stripped and non-stripped versions
of the new public key.
See http://boinc.berkeley.edu/trac/wiki/CodeSigning

This required a change to the scheduler so that it sends
one signature or the other based on client version
(stripped for 7.0+, else unstripped).
This change is entirely within send_code_sign_key(),
in case you want to update just that.
2014-08-29 13:35:51 -07:00
David Anderson 7fb13c0eaf scheduler: use config.maintenance_delay instead of 3600 for client backoff
Use a configurable delay (default 3600) instead of hardwired 3600 if
- can't open database
- feeder not running
- shmem size inconsistency
- can't open log file
- can't parse config file
- can't find key file
- can't attach shmem
2014-07-28 09:00:14 -07:00
David Anderson 9a9041cf7d server: fix support for client break; show it on web 2014-07-16 21:08:18 -07:00
David Anderson 246f5a2d1e client/scheduler: add support for "client brand"
Currently the server doesn't know about different client "brands",
e.g. HTC Power to Give, Charity Engine, GridRepublic, etc.,
so there's no way to collect statistics about them.

Changes:
- client: at startup, read a "client brand" string from client_brand.txt
    (i.e. branded clients will have to include this file in their installer)
    Report this string in scheduler requests.
- scheduler: parse this request element,
    and store it in host.serialnum as [BOINC|7.4.2|brand]
2014-07-16 20:18:06 -07:00
David Anderson 5250f55c8a scheduler: fix bugs related to changing code signing key
Two separate problems:
- a well-meaning change to remove compile warnings on 9 July 2013
  broke the reading of key files
- in the logic to scan old key files, we needed to use strip_whitespace()
  to remove the \n at end of file.
2014-07-03 13:33:53 -07:00
David Anderson 572d7bf9e5 scheduler: handle <dont_send_work> tag from client
If a project has both NCI and non-NCI apps,
it needs to send NCI jobs even if the work request is zero;
otherwise a client might not get NCI jobs.

However, this policy will send NCI jobs even if the user
has set "no new tasks" for the project.
To handle this correctly, we recently added a <dont_send_work>
element to the scheduler request.
Add logic to the scheduler to parse and enforce this flag.
2014-07-03 00:39:33 -07:00
David Anderson ec08b24c7f scheduler: if a request returns new code sign key, it can also return work 2014-07-02 22:26:18 -07:00
David Anderson 0b11b3f6e2 scheduler: don't send spurious "no tasks available" msgs w/ score scheduling 2014-06-16 16:53:49 -07:00
Bernd Machenschalk d9ec92a014 scheduler: log the host id if another scheduler instance is running for that 2014-06-10 14:13:13 +02:00
David Anderson af5d5b35f2 scheduler: add stub code for debugging a particular user or host, for Rytis 2014-05-09 01:06:37 -07:00
David Anderson c7db808abd Scheduler: message tweak 2014-02-04 10:07:46 -08:00
David Anderson ef82d5d9fb server: fix compile error on systems that don't define MAXPATHLEN 2013-08-22 17:01:45 -07:00
Eric J Korpela 244ba5bc85 SCHED: modified scheduled log output to use unsigned format for WU and RESULT
ids.  This allows IDs greater than 2^31 to be printed.
2013-06-19 10:15:08 -07:00
David Anderson b9f0733c06 server: replace strcpy() with strlcpy() various places 2013-06-03 22:42:53 -07:00
David Anderson cde42fcbcc server: parse product_name in scheduler request, store in DB
This will let projects see what kind of device each Android host is,
possibly helping with app debugging.
2013-05-23 23:30:42 -07:00
David Anderson 64ccb6afbf scheduler: fix bug that prevented Intel GPUs from getting work 2013-05-23 09:48:43 -07:00
David Anderson 2fea038249 - Scheduler: fix security vulnerabilities 2013-03-07 11:28:42 +01:00
David Anderson 450c5592ae - scheduler: add feature for deleting no-longer-used sticky files.
Create a file "file_delete_regex" in your project dir.
    Each line is a regular expression.
    Any sticky file whose name matches one of the expressions is deleted.
2013-03-04 17:39:24 +01:00
David Anderson f31a63b0c8 - scheduler: if primary platform is anonymous, ignore alternate platforms. 2013-03-04 15:06:32 +01:00
David Anderson e538c8c303 - client: TIME_STATS fields go in <time_stats> part of state file
- scheduler: parse TIME_STATS fields (e.g., uptime)
- admin web: small fix for manage_apps.php
2013-03-04 14:14:05 +01:00
David Anderson 11a6e85632 - scheduler: support for projects with some non-CPU-intensive apps
(but not all) wasn't finished.
    New logic: if the project has an NCI app then:
    - make a list of NCI apps for which the client doesn't have
        a job in progress.
    - try to send one job for each of these apps
    - do this even if no work is being requested.
    - don't send jobs for NCI apps by other mechanisms

NOTE: the client logic isn't quite right for mixed NCI projects.
    If there's no job for a given NCI app,
    the client should do a scheduler RPC.
    This isn't critical so we won't do this now.


svn path=/trunk/boinc/; revision=26068
2012-09-01 04:58:12 +00:00
David Anderson 6b7fb36056 - scheduler: msg tweaks
svn path=/trunk/boinc/; revision=26066
2012-08-29 18:08:15 +00:00
David Anderson 0492e0c2b8 - scheduler: add <need_ati_libs> option
svn path=/trunk/boinc/; revision=25747
2012-06-07 03:39:37 +00:00
David Anderson 8d284f2b17 - scheduler: if we truncate the # of results accepted
(like we're doing in SETI@home)
    don't resend lost results since we don't know what they are


svn path=/trunk/boinc/; revision=25733
2012-06-05 03:48:05 +00:00
Bernd Machenschalk 003700930e scheduler: don't try to send_file_deletes() with an incomplete request
svn path=/trunk/boinc/; revision=25670
2012-05-11 09:45:02 +00:00
David Anderson 32a08d27d9 - C++ code: use MAXPATHLEN for char arrays that hold paths
svn path=/trunk/boinc/; revision=25659
2012-05-09 16:11:50 +00:00
David Anderson 66b20e1138 - scheduler: handling of allow_multiple_clients flag from client
was wrong.  From Bernd.


svn path=/trunk/boinc/; revision=25579
2012-04-17 23:23:22 +00:00
Wenjing Wu ccad62b912 - wrapper: when reading fraction-done file, read the last line
(or at least the last double).
    This accommodates a particular application (LAMMPS)
    that can only append to this file.
- CAS@home stuff


svn path=/trunk/boinc/; revision=25557
2012-04-13 09:44:01 +00:00
David Anderson 7f3b3584d0 - scheduler: zero host.nsame_ip_addr if IP addr differs from previous
svn path=/trunk/boinc/; revision=25500
2012-03-27 21:22:00 +00:00
David Anderson 127e905e0d - storage stuff. Getting there.
svn path=/trunk/boinc/; revision=25355
2012-02-29 07:22:59 +00:00
David Anderson f18ffd6fe7 - VDA: add some log messages
- scheduler: add VDA
- client, web: change default prefs to min_buf=.1 days, max_buf=.5 days
- scheduler: app plan function for vbox requires 7.0+ client


svn path=/trunk/boinc/; revision=25351
2012-02-28 06:57:28 +00:00
Bernd Machenschalk 5bb86f79b8 scheduler: allow to configure userids for which the scheduler should
not scan the host table. This was previously hardcoded for
  Einstein@home to prevent some users with many (identical) hosts
  from flooding the DB with slow queries. Now add
  <dont_search_host_for_userid>userid</dont_search_host_for_userid>
  to the project config (in config.xml) for each such userid.

svn path=/trunk/boinc/; revision=25346
2012-02-27 12:08:25 +00:00
David Anderson 0f46b80985 - scheduler: record Vbox version correctly in host records
- remote job submission: partial checkin for new file sandbox stuff


svn path=/trunk/boinc/; revision=24937
2011-12-29 06:30:18 +00:00
David Anderson 4111c5696c - scheduler: fix crashing bug (don't memset SCHED_REQUEST).
svn path=/trunk/boinc/; revision=24660
2011-11-29 04:47:10 +00:00
David Anderson 279c3a2b37 - scheduler: problem: in the daily quota mechanism,
the boundary between days is 00:00 in server local time.
    This creates a spike of jobs being dispatched
    (and files being downloaded) after that time.

    Solution: distribute the boundary uniformly,
    using a random number determined by the host ID.
    (Make sure to save/restore the seed around this,
    so we don't destroy the randomness of other things)


svn path=/trunk/boinc/; revision=24353
2011-10-08 05:17:44 +00:00
David Anderson 228f56b464 - client: in the function that sorts jobs by arrival time,
don't use name as a tiebreaker.
    The will typically group jobs of the same application,
    and (it is believed that) things run faster when
    applications are mixed.
- scheduler: bug: if a client gets host-specific prefs
    (e.g. from an account manager)
    it will send only the working prefs to the scheduler.
    The scheduler then always sends back the DB prefs,
    overwriting the host-specific prefs.
    Fix: note the mod time in the working prefs,
    and only send the DB prefs if they're more recent.


svn path=/trunk/boinc/; revision=24332
2011-10-05 04:12:16 +00:00
David Anderson c84ede6156 - scheduler: record VirtualBox version # in the host table
svn path=/trunk/boinc/; revision=24327
2011-10-04 03:33:04 +00:00
David Anderson c5c5975b44 - Improve interface of XML_PARSER.
Add parsed_tag and is_tag to the class,
    so that parsing functions don't need to declare them
    and pass them around.
- Complete the task of using XML_PARSER as the argument
    to all parsing functions.
    (Internally, many of these functions still use the old XML parser;
    that's the next step.)


svn path=/trunk/boinc/; revision=23978
2011-08-10 17:11:08 +00:00
David Anderson 27e05a3da9 - server: some stuff to prepare for distributed storage
- don't create result records for uploads and downloads.
        Just create a msg_to_client record.
    - the scheduler handles file-transfer results specially;
        it makes a vector of them, then calls a project-supplied function
        handle_file_xfer_results()
    - change the interface and implementation of put_file and get_file
- client write project sched priority in GUI RPC replies,
    but not to the state file


svn path=/trunk/boinc/; revision=23857
2011-07-19 20:52:41 +00:00