- Add an official notion of dynamic AM.
Conveyed in AM reply message, stored in AM account file.
- Report accounting info only to dynamic AMs
- Fix bug where account info file wasn't written for AMs using authenticators
- In handling GUI RPC to do AM RPC, use info for current AM, e.g. if it's dynamic
See issue #2452.
If using a dynamic AM, the client may starve, e.g. because
the assigned projects are down.
Detect this, and send "starvation RPCs" to the AM
giving details about the situation.
But don't do this too often; use exponential backoff.
Previously, the credentials in account manager requests
were login name and password hash.
We need to keep this for compatibility with BAM and GR,
but it has problems:
- users can't change AM password
- password hash is stored on client and sent with each AM request
Solution: AM reply can include authenticator instead of name/passwd.
If so, store and use that.
Also: login_token_lookup.php needs to return auth instead of weak auth,
for both projects and AMs.
Weak auths are invalidated when user changes password.
when handling an AM repy:
- check URL signature only for projects being attached.
- clear dont_request_more_work, detach_when_done if not present in reply
Store disk usage and share in state file; report to AM
- 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
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.
- If using an AM, show its name on startup
- accept either <error> or <error_msg> in AM reply; document
- If using an AM and get a request to contact a different AM,
return "detach first" error (relevant if using boinccmd)
- Add mechanism for AM to send opaque data to schedulers
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.
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.
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.