Commit Graph

76 Commits

Author SHA1 Message Date
David Anderson 7cb58b5268 client: include # GPUs in <host_info> XML, including acct mgr requests 2017-01-12 13:15:42 -08:00
David Anderson 536d89f228 Merge branch 'master' of https://github.com/BOINC/boinc 2017-01-04 13:34:37 -08:00
David Anderson b949b87ac2 client: njobs_fail, not njobs_error 2017-01-04 13:34:26 -08:00
David Anderson c44a2b45dc client: tweak account manager logic
1) store AM and login info in files whose names include the AM URL,
    and don't delete them when detach from the AM.
    That way if user detaches and reattaches,
    we'll still have the opaque data (e.g. host ID)
    and the AM won't create a new host.
2) If the AM RPC has an error on the server,
    it probably won't return AM name, signing key, or opaque data.
    In that case hang onto the old ones.
2017-01-04 13:29:10 -08:00
David Anderson 958c89c1e7 client: account per-project CPU and GPU usage; report to account managers
Also report per-project #jobs success/failure
2016-12-27 23:48:37 -08:00
David Anderson 5710a5e8c8 client: report project-level REC to account managers 2016-12-21 22:17:50 -08:00
David Anderson 80562d230d code cleanup
In .cpp files, put "using std::" at the top and don't use std:: after that
2016-12-16 12:12:00 -08:00
David Anderson 1fe02c9d4f GUI RPC: enclose message bodies in CDATA to avoid XML parse errors
for messages containing "<".

Also strip off <?xml tag from project config
to make GUI RPC reply valid.
2016-04-05 13:14:21 -07:00
Artem Vorotnikov 7a6b5ee204 Work around invalid XML in logs
Ironically, should the user specify invalid XML tag in cc_config.xml, BOINC will write log message containing that tag unescaped and unclosed. Needless to say, it breaks XML parsing instantly. This patch auto-closes this tag in the log message.
2016-03-23 15:26:52 +03:00
Rom Walton 2cc9a0b6c4 client: Cleanup low hanging fruit with regards to cleaning up sprintf.
Use snprintf instead.
2016-02-18 00:59:13 -05:00
Rom Walton 59b5bf2f71 client: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 23:34:18 -05:00
David Anderson cf607534a9 Client: acct manager fixes
- honor suspend flag for first-time attaches
- do initial RPC even if suspended (to get project name etc).
2015-12-20 01:58:30 -08:00
Christian Beer 9c7bf33c45 initialize fields in constructors
fixes CID 27935, 28004 and 27948 found by Coverity Scan
2015-10-19 18:23:55 +02:00
David Anderson 979d726c9f client: debug account manager fix from 2 days ago 2015-01-19 09:39:13 -08:00
David Anderson e67c6a12e1 client: fix bug where project erroneously marked as attached via acct mgr 2015-01-18 11:43:46 -08:00
David Anderson 1e2fcb4b68 client/lib: change CONFIG to CC_CONFIG, config to cc_config.
Eliminates ambiguity of "config" global var, which is used in server code.
This confuses IDEs that are looking at all the code at once.
2014-05-08 00:51:18 -07:00
David Anderson cfffccac35 client: if acct mgr RPC gets HTTP error, don't create a notice
Such an error typically means the acct mgr server is down.
2014-05-05 12:13:32 -07:00
David Anderson 6a8eab73cd replace tab characters with spaces 2014-05-01 21:03:49 -07:00
David Anderson db9abb12ce client: fix bug in parsing <no_rsc> from account managers
Also Manager message tweak
2014-04-17 00:23:44 -07:00
David Anderson 1dac077a05 client: message tweak 2013-08-08 10:59:49 -07:00
David Anderson 59ba61b323 client (Android): don't use network preferences
Many Android users had existing preferences with settings like
"don't compute when idle" that make sense for PCs but not mobile devices.
When this pref is enforced on Android, no computing happens
and user confusion results.
We're addressing this by using only local prefs on Android.
We considered other approaches - e.g. having a "mobile" venue -
but they're too complex.
2013-08-04 15:13:26 -07:00
David Anderson 9d43d18011 client: include project resource shares in account manager request message 2013-08-03 13:13:54 -07:00
David Anderson 9978c40bcb client: fix bug where <no_project_notices> from account manager didn't work 2013-07-02 20:53:50 -07:00
David Anderson 846b8c7757 all components: change strcpy() to strlcpy() when possible.
This commit should cover the client and manager code.
2013-06-03 20:24:48 -07:00
David Anderson 9c50abaffa Manager and GUI RPC interface: fix possible buffer overruns
If the user typed an extremely long URL into the
Attach to Account Manager wizard, a buffer overrun could result.
There were several places in the code that assumed user-entered
URLs are small (e.g. 256 chars):
- canonicalize_master_url.cpp()
- several GUI RPC interfaces, when generating XML request message
- URL-escaping (not relevant here, but fix anyway)
Change all these to stay within buffers regardless of URL size.
Note: do this by truncation.
This will cause error messages like "can't connect to project"
rather than saying the URL is too long.  That's OK.
2013-05-27 23:08:02 -07:00
David Anderson 527cddbb90 client: update notice feeds when detach from account manager 2013-05-20 19:50:27 -07:00
David Anderson 4434a9dd62 - client: add support for bool <no_project_notices> element
in account manager RPC reply.
    If set, suppress display of notices from projects
    (still display notices from the account manager).
2013-04-19 21:40:10 -07:00
David Anderson 1174b00aba - client/manager: tweaks to Intel GPU code 2013-03-04 15:27:25 +01:00
Charlie Fenton ce87ec9848 OpenCL: First pass at adding support for Intel Ivy Bridge GPUs 2013-03-04 15:23:39 +01:00
David Anderson bbfbef0fe8 - client: code cleanup. Move RESULT and PROJECT to separate files
svn path=/trunk/boinc/; revision=25621
2012-04-30 21:00:28 +00:00
David Anderson 3b363f9a87 - web RPC: include rpc_time in XML host description
- client: if acct mgr sends us an account with no authenticator,
    show an error message instead of trying to attach


svn path=/trunk/boinc/; revision=25608
2012-04-30 18:46:50 +00:00
David Anderson cdd40fcc10 - client: intermediate checkin for async file verification
svn path=/trunk/boinc/; revision=25202
2012-02-06 06:06:44 +00:00
David Anderson ad2f3771da - client: fix bugs when writing/parsing cc_config.xml via GUI RPCs
(e.g. when editing it via the Manager).
    Include only the GPUs that were specified in the original cc_config.xml,
    not those detected by the client.
- client: fix bug that failed to require authorization for
    GUI RPCs that are supposed to be authorized
- client: report parse errors in acct_mgr_url.xml and acct_mgr_login.xml
- fix compile warnings
- user web: in sample project_specific_prefs.inc,
    get app names from the DB instead of listing them in the PHP code.


svn path=/trunk/boinc/; revision=24518
2011-11-03 19:19:36 +00:00
David Anderson 9d2d540267 - client: intermediate checkin for replicated trickle-ups.
Not finished yet.
- example app: add --trickle_up and --trickle_down options,
    for testing trickle messages


svn path=/trunk/boinc/; revision=24245
2011-09-20 18:49:38 +00:00
David Anderson 0e3d27961c - client: in handling the acct_mgr GUI RPC,
don't start the RPC directly;
    that might fail if CLIENT_STATE::gui_http is busy.
    Instead, set a timer field.
- client: structure ACCT_MGR_OP the same as other GUI_HTTP_OP variants
- client: clarify the comments on GUI_HTTP and GUI_HTTP_OP

Note: GUI_HTTP and GUI_HTTP_OP are misnomers; they refer to
any HTTP op other than scheduler requests and file transfers.
Should change the name, maybe to CLIENT_HTTP*


svn path=/trunk/boinc/; revision=24238
2011-09-19 21:15:36 +00:00
David Anderson fa419731dd - scheduler RPC: add <override_file_present> element to
the <working_global_preferences> element in
    scheduler RPC request
    (tells the server that there's an override file).
- account manager RPC: add <working_global_preferences> element,
    including the override flag.
- web: add "no time limit" option for forum search
- web: increase show-user-post query limit to 10000


svn path=/trunk/boinc/; revision=24129
2011-09-06 04:34:29 +00:00
Charlie Fenton 97f5146f2a define GPU_TYPE_NVIDIA, GPU_TYPE_ATI, use everywhere instead of literal strings "NVIDIA" and "ATI" to ensure uniformity
svn path=/trunk/boinc/; revision=24090
2011-08-31 11:08:13 +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 cceea7f6d4 - client: rename MODE to RUN_MODE, and rename vars accordingly
svn path=/trunk/boinc/; revision=23974
2011-08-09 20:41:15 +00:00
David Anderson 94e8c48220 - client: change --detach_phase_two (??) to --detach_console
- eliminate compiler warnings (e.g. shadowed vars)
    in various places, mostly in client


svn path=/trunk/boinc/; revision=23710
2011-06-12 20:58:43 +00:00
David Anderson 6cd5fee780 - client: update to previous commit:
only change the authenticator if both old and new
    authenticators are weak
    (strong authenticators don't change).


svn path=/trunk/boinc/; revision=23481
2011-04-28 22:57:55 +00:00
David Anderson 8757e07f4f - client: change the handling of account manager replies:
Old:
        If the AM sends us a project we're already attached to,
        and the authenticator is different,
        print an error message and don't change anything.
    Problem:
        If the AM is using weak authenticators,
        and the user has changed their password,
        the weak authenticator changes.
        In this case the AM will send the new weak auth,
        the client will ignore it,
        and all subsequent scheduler RPCs will fail
        until the user removes/adds the project.
    Solution:
        If the AM sends us a new auth for a project, use it.
    Note:
        From the time the password is changed on the project
        to the next AM RPC,
        the client will have a bad weak auth and scheduler RPCs will fail.
        That's OK.

client/
    acct_mgr.cpp

svn path=/trunk/boinc/; revision=23479
2011-04-28 22:10:23 +00:00
David Anderson 863950ecc1 - client: show error messages from account managers correctly
- client/manager: if a job is missing a GPU, show details
	- client: win compile fix

svn path=/trunk/boinc/; revision=23430
2011-04-24 19:56:28 +00:00
David Anderson 3d3d902896 - account manager RPC: include TIME_STATS and NET_STATS in request message
svn path=/trunk/boinc/; revision=23429
2011-04-24 18:14:13 +00:00
David Anderson 3b906a191c - client: generalize the GPU framework so that
- new GPU types can be added easily
		- users can specify GPUs in cc_config.xml,
			referred to by app_info.xml,
			and they will be scheduled by BOINC
			and passed --device N options
			Note: the parsing of cc_config.xml is not done yet.
		- RPC protocols (account manager and scheduler)
			can now specify GPU types in separate elements
			rather than embedding them in tag names
			e.g. <no_rsc>NVIDIA</no_rsc> rather than <no_cuda/>
	- client: in account manager replies, parse elements of the form
		<no_rsc>NAME</no_rsc>
		indicating the GPUs of type NAME should not be used.
		This allows account managers to control GPU types
		not hardwired into the client.
		Note: <no_cuda/> and <no_ati/> will continue to be supported.
	- scheduler RPC reply: add
		<no_rsc_apps>NAME</no_rsc_apps>
		(NAME = GPU name)
		to indicate that the project has no jobs for the indicated GPU type.
		<no_cuda_apps> etc. are still supported 
	- client/lib: remove set_debts() GUI RPC
	- client/scheduler RPC
		remove <cuda_backoff> etc. (superceded by no_app)
		Exception: <ip_result> elements in sched request
		still have <ncudas> and <natis>.
		Fix this later.

	Implementation notes:
	- client/lib: change "CUDA" to "NVIDIA" in type/variable names, and in XML
		Continue to recognize "CUDA" for compatibility
	- host_info.coprocs no longer used within the client;
		use a global var (COPROCS coprocs) instead.
		COPROCS now has an array of COPROCs;
		GPUs types are identified by the array index.
		Index zero means CPU.
	- a bunch of other resource-specific structs (like RSC_WORK_FETCH)
		are now stored in arrays, with same indices as COPROCS
		(i.e. index 0 is CPU)
	- COPROCS still has COPROC_NVIDIA and COPROC_ATI structs to hold vendor-specific info
	- APP_VERSION now has a struct GPU_USAGE to describe its GPU usage

svn path=/trunk/boinc/; revision=23253
2011-03-25 03:44:09 +00:00
David Anderson b8a88713d8 - client: don't put CDATA around account manager opaque data
in request msg

svn path=/trunk/boinc/; revision=23210
2011-03-08 20:36:04 +00:00
David Anderson 44addd53d3 - client: send <?xml version="1.0" encoding="UTF-8" ?>
at start of scheduler and account manager requests.


svn path=/trunk/boinc/; revision=23090
2011-02-23 00:57:08 +00:00
David Anderson 01a1ec33c3 - client: add cpu_sched debug messages for anti-domino-effect
and anti-thrasing mechanisms
- wrapper: to kill an app, use SIGTERM instead of SIGKILL
    

svn path=/trunk/boinc/; revision=23082
2011-02-22 21:05:21 +00:00
David Anderson d4f00d4467 - client: if we're using an acct mgr,
and we're attached to a project manually (not via acct mgr)
    and the acct mgr tells us to detach from it, don't.

svn path=/trunk/boinc/; revision=22930
2011-01-20 00:36:45 +00:00
David Anderson 6784283211 - user web: fix bugs in server status page
- fix some indentation


svn path=/trunk/boinc/; revision=22890
2011-01-06 23:09:13 +00:00