On Linux, Manager sometimes prints timestamps in C locale instead of the
locale user has chosen. This happens when Manager is formatting a
timestamp and at the same time a GUI RPC is in progress. GUI RPCs
temporarily set the global locale to C locale with SET_LOCALE.
Use SET_LOCALE's per-thread locale version and set thread locale in
Manager's RPC thread to fix this.
Also clean up #ifdef mazes in SET_LOCALE and Manager's RPC thread now
that there are HAVE_* macros available. Remove OS X < 10.4 code because
that old OS X versions are not supported any more.
Fixes#2399.
New commands:
--acct_mgr info: show name and URL of current AM
--acct_mgr synch: do RPC
also (for uniformity) new names for existing commands:
--acct_mgr attach URL email password
--acct_mgr detach
Tempted to remove old names, but didn't.
- 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
The GUI RPC element for a result didn't include the platform name.
So in cases where there were app versions with the same
version # and plan class (but different platforms)
the Manager would just show the first one
(e.g. the "executable file" item in Task Properties),
which was not necessarily correct.
- get_project_config.php: if project supports LDAP,
advertise this to the client.
- Manager: if project supports LDAP, say "Email address or LDAP ID"
in Attach Project wizard,
and don't do email address validation.
- lookup_account GUI RPC (client side): if passing an LDAP ID,
don't lowercase it, and don't hash passwd
- lookup_account GUI RPC (server side): if passing an LDAP ID,
pass appropriate URL args to Web RPC
- lookup_account Web RPC: in LDAP case, pass "ldap_auth" arg,
and pass "ldap_uid" and "passwd".
Handle these appropriately.
A month or two ago I added code to put user CPID in the project info
exported via GUI RPC, so that GUIs (like BoincTasks) could link
to user pages on stats sites.
However, I completely forgot that the CPID known to the client
(PROJECT::cross_project_id) is the "internal CPID",
while what gets exported to stats is the "external CPID",
which is MD5(internal CPID, email addr).
Solution: include the external CPID in scheduler replies,
store it in the client state file,
and export it in GUI RPCs as PROJECT::external_cpid.
This will eventually work for BoincTasks,
but only after projects update their server software,
and volunteers update their client software.
If a job reports its network usage (via boinc_network_usage()),
keep track of this across episodes of the job, and report it to the server
(some projects may want to give credit for network usage).
- If run with --gui_rpc_unix_domain, the client will listen on
a Unix-domain socket (named "boinc_socket") rather than on a TCP port.
- Add RPC_CLIENT::init_unix_domain() function to C++ GUI RPC interface
(Note: we'll need to add a corresponding function to the Java interface)
- boinccmd: add --unix_domain option
The web RPCs done by the client during project attach
(lookup_account, create_account)
have an email address and password hash in their request.
Network sniffers could potentially see these,
so we should use HTTPS for these RPCs if possible.
However, not all BOINC projects have SSL-enabled web servers.
So I did the following:
- Change get_project_config.php to return an additional
<web_rpc_url_base> element.
This is SECURE_URL_BASE (if specified in the project's
project.inc config file) or, if not, the master URL.
- This new element is parsed into the PROJECT_CONFIG structure.
- In calls to create_account and lookup_account,
the Manager uses PROJECT_CONFIG::web_rpc_url_base
if it's available, else the master URL.
So, the new Manager/client uses HTTPS for RPCs to projects
that have updated their get_project_config.php,
and specify a SECURE_URL_BASE with https:// prefix.
Android note: I added code to parse the new config element,
but didn't change the higher-level code;
Joachim will need to do this.
- Add a GUI RPC ("set_language") that lets the Manager communicate
the user's selected language code to the client at startup.
- The client stores the language code in the client state file
- The client appends a "lang=X" GET argument to the URLs from
which notices are fetched.
- The next steps (not done) are 1) to change the get_notices.php
script to parse the argument and do translation, and
2) extend our Pootle system to allow volunteer translation
of notices by all projects.
We want to track the product name (e.g. "HTC One X") of Android devices.
On Android, the API to get this is Java,
so we need to do it in the GUI rather than the client.
- Add product_name field to HOST_INFO
- Add a GUI RPC for passing this info from the GUI to the client.
- Store it in client_state.xml, so that the client knows it initially.
The product name is included in scheduler RPC requests, as part of <host_info>.
TODO: add server-side support for parsing it and storing in DB.
Also: move DEVICE_STATUS out of HOST_INFO; it didn't belong there.
Previously the client had (C++) code to
- check whether on AC or USB power
- get battery status and temperature
- check whether on wifi
These functions looked in various places under /sys.
Problem: the paths are system-dependent,
so whatever we do won't work on all devices.
The Android APIs for getting this info are in Java,
so we can't call them from the client.
Solution: have the GUI periodically get this info
and report it to the client via a GUI RPC.
The GUI must make this RPC periodically:
if the client doesn't get one within some period of time
(currently 30 sec) it suspends computing and network.
Also: if suspending jobs because of battery charge level
or temperature, leave them in memory.
the binding of the get_state() RPC
- client: move client_start_time and previous_uptime
from CLIENT_STATE to TIME_STATS,
so that these are also visible in GUI RPC
- scheduler RPC: move uptime and previous_uptime
into <time_stats>
- client: condition an RR simulation message on <rrsim_detail>
- boinccmd: show TIME_STATS info in --get_state
show if a GPU type is excluded by configuration
- client: don't fetch work for a resource type if all instances
of that type are excluded
- web: don't use filter_var(, FILTER_SANITIZE_STRING)
to strip HTML tags from a string.
This escapes singles quotes also.
Use strip_tags() instead.
svn path=/trunk/boinc/; revision=25375
boinc_temporary_exit(),
explaining why the app is exiting.
Convey this to the client, and then to the Manager,
and display it there and in the log.
clientgui/
MainDocument.cpp
lib/
gui_rpc_client_ops.cpp
gui_rpc_client.h
api/
boinc_api.cpp,h
client/
client_types.cpp,h
app.h
app_control.cpp
svn path=/trunk/boinc/; revision=25315
resource-specific backoff and exclusion
Old: client writes
<rsc_backoff_time>
<rsc_backoff_interval>
<no_rsc_ams>
<no_rsc_apps>
<no_rsc_pref>
in GUI RPC entries for projects.
Manager (GUI RPC client): PROJECT struct has
cpu_backoff_time
cpu_backoff_interval
... cuda, ati
no_cpu_pref
... cuda, ati
and it parses tags of these names.
In other words, no information is being conveyed
from client to Manager.
New:
manager parses both forms
svn path=/trunk/boinc/; revision=25217
send the size of the compressed file as well.
- client: parse and write the compressed size (FILE_INFO::gzipped_nbytes).
For get_transfer GUI RPCs, if it's a compressed download send
the compressed size.
That way the manager will show the fraction done correctly.
svn path=/trunk/boinc/; revision=25152