- client/server: add a new result state RESULT_UPLOAD_FAILED

for when the job completed successfully but
    one or more output files had permanent upload failures.
    Show this state in web interfaces.
- sample_work_generator: check return value of count_unsent_results(),
    so that we don't generate infinite work if there's a DB problem
- web: RSS feed shows news items from last 90 days, rather than 14


svn path=/trunk/boinc/; revision=24377
This commit is contained in:
David Anderson 2011-10-11 17:41:10 +00:00
parent 7de6b8a378
commit cb3cdae1a5
12 changed files with 62 additions and 42 deletions

View File

@ -4239,9 +4239,9 @@ David 20 July 2011
gui_rpc_client_ops.cpp
David 20 July 2011
- client/server: change the implementation of upload signatures
- client/server: change the implementation of upload certificates
as described here: http://boinc.berkeley.edu/trac/wiki/ClientDataModel
Compatibility: if your project is using upload signatures:
Compatibility: if your project is using upload certificates:
- set ignore_upload_certificates
- disable job creation
- let your job queue drain
@ -7066,3 +7066,28 @@ Rom 11 Oct 2011
/
configure.ac
version.h
David 11 Oct 2011
- client/server: add a new result state RESULT_UPLOAD_FAILED
for when the job completed successfully but
one or more output files had permanent upload failures.
Show this state in web interfaces.
- sample_work_generator: check return value of count_unsent_results(),
so that we don't generate infinite work if there's a DB problem
- web: RSS feed shows news items from last 90 days, rather than 14
sched/
sample_work_generator.cpp
html/
inc/
result.inc
user/
rss_main.php
lib/
coproc.cpp,h
error_numbers.h
common_defs.h
client/
client_types.cpp,h
client_state.cpp
coproc_detect.cpp

View File

@ -1678,6 +1678,7 @@ int CLIENT_STATE::report_result_error(RESULT& res, const char* format, ...) {
if (!res.exit_status) {
res.exit_status = ERR_RESULT_UPLOAD;
}
res.set_state(RESULT_UPLOAD_FAILED, "CS::report_result_error");
break;
case RESULT_FILES_UPLOADED:
msg_printf(res.project, MSG_INTERNAL_ERROR,

View File

@ -929,6 +929,7 @@ int FILE_INFO::parse(XML_PARSER& xp) {
sizeof(xml_signature)
);
if (retval) return retval;
strip_whitespace(xml_signature);
continue;
}
if (xp.match_tag("file_signature")) {
@ -1975,7 +1976,6 @@ bool RESULT::is_upload_done() {
}
// resets all FILE_INFO's in result to uploaded = false
// if upload_when_present is true.
//
void RESULT::clear_uploaded_flags() {
unsigned int i;

View File

@ -90,10 +90,11 @@ struct URL_LIST {
}
};
// Values of FILE_INFO::status.
// If the status is neither of these two,
// it will be an error code defined in error_numbers.h,
// indicating an unrecoverable error in the upload or download of the file,
// or that the file was too big and was deleted
// it's an error code indicating an unrecoverable error
// in the transfer of the file,
// or that the file was too big and was deleted.
//
#define FILE_NOT_PRESENT 0
#define FILE_PRESENT 1
@ -104,7 +105,7 @@ struct FILE_INFO {
double max_nbytes;
double nbytes;
double upload_offset;
int status;
int status; // see above
bool executable; // change file protections to make executable
bool uploaded; // file has been uploaded
bool sticky; // don't delete unless instructed to do so

View File

@ -297,8 +297,9 @@ void COPROCS::get_opencl(
// 1/2 of total global RAM size.
// This bug applies only to ATI GPUs, not to NVIDIA
// Assume this will be fixed in openCL 1.2.
if ((!strstr("1.0", prop.opencl_platform_version)) ||
(!strstr("1.1", prop.opencl_platform_version))) {
if ((!strstr("1.0", prop.opencl_platform_version))
|| (!strstr("1.1", prop.opencl_platform_version))
){
prop.global_mem_size *= 2;
}
if (!ati.have_cal) {
@ -326,6 +327,7 @@ void COPROCS::get_opencl(
}
// Create descriptions for OpenCL NVIDIA GPUs
//
for (i=0; i<nvidia_opencls.size(); i++) {
nvidia_opencls[i].description(buf, GPU_TYPE_NVIDIA);
descs.push_back(string(buf));
@ -336,6 +338,7 @@ void COPROCS::get_opencl(
// Work around a bug in OpenCL which returns only
// 1/2 of total global RAM size: use the value from CAL.
// This bug applies only to ATI GPUs, not to NVIDIA
//
ati.opencl_prop.global_mem_size = ati.attribs.localRAM;
} else {
ati.find_best_opencls(use_all, ati_opencls, ignore_ati_dev);
@ -344,6 +347,7 @@ void COPROCS::get_opencl(
} // End if (! ati.have_cal)
// Create descriptions for OpenCL ATI GPUs
//
for (i=0; i<ati_opencls.size(); i++) {
ati_opencls[i].description(buf, GPU_TYPE_ATI);
descs.push_back(string(buf));

View File

@ -25,5 +25,5 @@ if (!$forum) {
exit;
}
forum_rss($forum->id, 0, 0, 1, 14);
forum_rss($forum->id, 0, 0, 1, 90);
?>

View File

@ -183,6 +183,7 @@ function state_string($result) {
case 3: return tra("Error while computing");
case 4: return tra("Error while uploading");
case 6: return tra("Aborted by user");
case 6: return tra("Upload failed");
}
return tra("Error");
case 4: return tra("Timed out - no response");
@ -235,7 +236,9 @@ function result_client_state_string($result) {
return tra("Cancelled by server");
}
return tra("Aborted by user");
case 7: return tra("Upload failed");
}
return tra("Unknown");
}
function validate_state_str($result) {

View File

@ -25,5 +25,5 @@ if (!$forum) {
exit;
}
forum_rss($forum->id, 0, 0, 1, 14);
forum_rss($forum->id, 0, 0, 1, 90);
?>

View File

@ -57,25 +57,6 @@
#define HTTP_STATUS_INTERNAL_SERVER_ERROR 500
#define HTTP_STATUS_SERVICE_UNAVAILABLE 503
// the core client can be requested to provide screensaver graphics (SSG).
// The following are states of this function:
#define SS_STATUS_ENABLED 1
// requested to provide SSG
#define SS_STATUS_BLANKED 3
// not providing SSG, SS should blank screen
#define SS_STATUS_BOINCSUSPENDED 4
// not providing SS because suspended
#define SS_STATUS_NOAPPSEXECUTING 6
// no apps executing
#define SS_STATUS_NOGRAPHICSAPPSEXECUTING 7
// apps executing, but none graphical
#define SS_STATUS_QUIT 8
// not requested to provide SSG
#define SS_STATUS_NOPROJECTSDETECTED 9
// SSG unsupported; client running as daemon
#define SS_STATUS_DAEMONALLOWSNOGRAPHICS 10
// graphics messages
//
#define MODE_UNSUPPORTED 0
@ -129,20 +110,22 @@ enum SUSPEND_REASON {
// THESE MUST BE IN NUMERICAL ORDER
// (because of the > comparison in RESULT::computing_done())
//
#define RESULT_NEW 0
#define RESULT_NEW 0
// New result
#define RESULT_FILES_DOWNLOADING 1
#define RESULT_FILES_DOWNLOADING 1
// Input files for result (WU, app version) are being downloaded
#define RESULT_FILES_DOWNLOADED 2
#define RESULT_FILES_DOWNLOADED 2
// Files are downloaded, result can be (or is being) computed
#define RESULT_COMPUTE_ERROR 3
#define RESULT_COMPUTE_ERROR 3
// computation failed; no file upload
#define RESULT_FILES_UPLOADING 4
#define RESULT_FILES_UPLOADING 4
// Output files for result are being uploaded
#define RESULT_FILES_UPLOADED 5
#define RESULT_FILES_UPLOADED 5
// Files are uploaded, notify scheduling server at some point
#define RESULT_ABORTED 6
#define RESULT_ABORTED 6
// result was aborted
#define RESULT_UPLOAD_FAILED 7
// some output file permanent failure
// values of ACTIVE_TASK::task_state
//
@ -165,7 +148,6 @@ enum SUSPEND_REASON {
// aborted process has exited
#define PROCESS_COULDNT_START 7
// values of "network status"
//
#define NETWORK_STATUS_ONLINE 0
@ -175,7 +157,6 @@ enum SUSPEND_REASON {
// reasons for making a scheduler RPC:
//
#define RPC_REASON_USER_REQ 1
#define RPC_REASON_RESULTS_DUE 2
#define RPC_REASON_NEED_WORK 3

View File

@ -256,7 +256,7 @@ int OPENCL_DEVICE_PROP::get_device_version_int() {
return 0;
}
void OPENCL_DEVICE_PROP::description(char* buf, char* type) {
void OPENCL_DEVICE_PROP::description(char* buf, const char* type) {
char s1[256], s2[256];
int n;

View File

@ -136,7 +136,7 @@ struct OPENCL_DEVICE_PROP {
void write_xml(MIOFILE&);
#endif
int parse(XML_PARSER&);
void description(char* buf, char* type);
void description(char* buf, const char* type);
};

View File

@ -117,6 +117,12 @@ void main_loop() {
check_stop_daemons();
int n;
retval = count_unsent_results(n, 0);
if (retval) {
log_messages.printf(MSG_CRITICAL,
"count_unsent_jobs() failed: %s\n", boincerror(retval)
);
exit(retval);
}
if (n > CUSHION) {
sleep(10);
} else {
@ -145,7 +151,6 @@ void usage(char *name) {
fprintf(stderr, "This is an example BOINC work generator.\n"
"This work generator has the following properties\n"
"(you may need to change some or all of these):\n"
"- Runs as a daemon, and creates an unbounded supply of work.\n"
" It attempts to maintain a \"cushion\" of 100 unsent job instances.\n"
" (your app may not work this way; e.g. you might create work in batches)\n"
"- Creates work for the application \"example_app\".\n"