mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=1410
This commit is contained in:
parent
812406f524
commit
e292890908
|
@ -255,7 +255,7 @@ int authenticate_user(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
|
||||||
if (retval) {
|
if (retval) {
|
||||||
strcpy(reply.message, "Can't find host record");
|
strcpy(reply.message, "Can't find host record");
|
||||||
strcpy(reply.message_priority, "low");
|
strcpy(reply.message_priority, "low");
|
||||||
log_messages.printf(SchedMessages::NORMAL, "[HOST#%d] can't find host\n", sreq.hostid);
|
log_messages.printf(SchedMessages::NORMAL, "[HOST#%d?] can't find host\n", sreq.hostid);
|
||||||
sreq.hostid = 0;
|
sreq.hostid = 0;
|
||||||
goto new_host;
|
goto new_host;
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ int authenticate_user(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
|
||||||
strcpy(reply.message_priority, "low");
|
strcpy(reply.message_priority, "low");
|
||||||
reply.request_delay = 120;
|
reply.request_delay = 120;
|
||||||
reply.nucleus_only = true;
|
reply.nucleus_only = true;
|
||||||
log_messages.printf(SchedMessages::NORMAL, "[USER#%d] can't find\n", reply.host.userid);
|
log_messages.printf(SchedMessages::NORMAL, "[HOST#%d] [USER#%d?] can't find user record\n", host.id, reply.host.userid);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
reply.user = user;
|
reply.user = user;
|
||||||
|
@ -279,8 +279,8 @@ int authenticate_user(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
|
||||||
strcpy(reply.message_priority, "low");
|
strcpy(reply.message_priority, "low");
|
||||||
reply.request_delay = 120;
|
reply.request_delay = 120;
|
||||||
reply.nucleus_only = true;
|
reply.nucleus_only = true;
|
||||||
log_messages.printf(SchedMessages::CRITICAL, "[USER#%d] Bad authenticator '%s'\n",
|
log_messages.printf(SchedMessages::CRITICAL, "[HOST#%d] [USER#%d] Bad authenticator '%s'\n",
|
||||||
reply.host.userid, sreq.authenticator);
|
host.id, user.id, sreq.authenticator);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,7 +309,7 @@ int authenticate_user(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
|
||||||
);
|
);
|
||||||
strcpy(reply.message_priority, "low");
|
strcpy(reply.message_priority, "low");
|
||||||
reply.request_delay = 120;
|
reply.request_delay = 120;
|
||||||
log_messages.printf(SchedMessages::CRITICAL, "Bad authenticator [%s]\n", sreq.authenticator);
|
log_messages.printf(SchedMessages::CRITICAL, "[HOST#<none>] Bad authenticator '%s'\n", sreq.authenticator);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
reply.user = user;
|
reply.user = user;
|
||||||
|
@ -456,21 +456,21 @@ int handle_results(
|
||||||
reply.result_acks.push_back(*rp);
|
reply.result_acks.push_back(*rp);
|
||||||
|
|
||||||
log_messages.printf(SchedMessages::DEBUG, "[HOST#%d] [%s] got result\n",
|
log_messages.printf(SchedMessages::DEBUG, "[HOST#%d] [%s] got result\n",
|
||||||
sreq.hostid, rp->name);
|
host.id, rp->name);
|
||||||
|
|
||||||
strncpy(result.name, rp->name, sizeof(result.name));
|
strncpy(result.name, rp->name, sizeof(result.name));
|
||||||
sprintf(buf, "where name='%s'", result.name);
|
sprintf(buf, "where name='%s'", result.name);
|
||||||
retval = result.lookup(buf);
|
retval = result.lookup(buf);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
log_messages.printf(SchedMessages::NORMAL, "[HOST#%d] [%s] can't find result\n",
|
log_messages.printf(SchedMessages::CRITICAL, "[HOST#%d] [%s] can't find result\n",
|
||||||
sreq.hostid, rp->name);
|
host.id, rp->name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.server_state == RESULT_SERVER_STATE_UNSENT) {
|
if (result.server_state == RESULT_SERVER_STATE_UNSENT) {
|
||||||
log_messages.printf(SchedMessages::NORMAL,
|
log_messages.printf(SchedMessages::CRITICAL,
|
||||||
"[HOST#%d] [%s] got unexpected result: server state is %d\n",
|
"[HOST#%d] [RESULT#%d %s] got unexpected result: server state is %d\n",
|
||||||
sreq.hostid, rp->name, result.server_state);
|
host.id, result.id, result.name, result.server_state);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (result.server_state == RESULT_SERVER_STATE_OVER) {
|
if (result.server_state == RESULT_SERVER_STATE_OVER) {
|
||||||
|
@ -478,9 +478,9 @@ int handle_results(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.hostid != sreq.hostid) {
|
if (result.hostid != sreq.hostid) {
|
||||||
log_messages.printf(SchedMessages::NORMAL,
|
log_messages.printf(SchedMessages::CRITICAL,
|
||||||
"[HOST#%d] [%s] got result from wrong host; expected [HOST#%d]\n",
|
"[HOST#%d] [RESULT#%d %s] got result from wrong host; expected [HOST#%d]\n",
|
||||||
sreq.hostid, rp->name, result.hostid);
|
host.id, result.id, result.name, result.hostid);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,16 +496,16 @@ int handle_results(
|
||||||
result.outcome = RESULT_OUTCOME_SUCCESS;
|
result.outcome = RESULT_OUTCOME_SUCCESS;
|
||||||
retval = wu.lookup_id(result.workunitid);
|
retval = wu.lookup_id(result.workunitid);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
log_messages.printf(SchedMessages::NORMAL,
|
log_messages.printf(SchedMessages::CRITICAL,
|
||||||
"[HOST#%d] [RESULT#%d %s] can't find WU#%d for result\n",
|
"[HOST#%d] [RESULT#%d %s] Can't find [WU#%d] for result\n",
|
||||||
sreq.hostid, result.id, result.name, result.workunitid);
|
host.id, result.id, result.name, result.workunitid);
|
||||||
} else {
|
} else {
|
||||||
wu.need_validate = 1;
|
wu.need_validate = 1;
|
||||||
retval = wu.update();
|
retval = wu.update();
|
||||||
if (retval) {
|
if (retval) {
|
||||||
log_messages.printf(SchedMessages::CRITICAL,
|
log_messages.printf(SchedMessages::CRITICAL,
|
||||||
"[HOST#%d] [WU#%d] Can't update WU\n",
|
"[HOST#%d] [RESULT#%d %s] Can't update [WU#%d %s]\n",
|
||||||
sreq.hostid, wu.id);
|
host.id, result.id, result.name, wu.id, wu.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -518,8 +518,8 @@ int handle_results(
|
||||||
retval = result.update();
|
retval = result.update();
|
||||||
if (retval) {
|
if (retval) {
|
||||||
log_messages.printf(SchedMessages::NORMAL,
|
log_messages.printf(SchedMessages::NORMAL,
|
||||||
"[HOST#%d] [RESULT#%d] can't update result: %s\n",
|
"[HOST#%d] [RESULT#%d %s] can't update result: %s\n",
|
||||||
sreq.hostid, result.id, boinc_db_error_string());
|
host.id, result.id, result.name, boinc_db_error_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -549,8 +549,8 @@ int send_work(
|
||||||
|
|
||||||
if (sreq.work_req_seconds <= 0) return 0;
|
if (sreq.work_req_seconds <= 0) return 0;
|
||||||
|
|
||||||
log_messages.printf(SchedMessages::DEBUG, "[HOST#%d] got request for %d seconds of work\n",
|
log_messages.printf(SchedMessages::NORMAL, "[HOST#%d] got request for %d seconds of work\n",
|
||||||
sreq.hostid, sreq.work_req_seconds);
|
reply.host.id, sreq.work_req_seconds);
|
||||||
|
|
||||||
seconds_to_fill = sreq.work_req_seconds;
|
seconds_to_fill = sreq.work_req_seconds;
|
||||||
if (seconds_to_fill > MAX_SECONDS_TO_SEND) {
|
if (seconds_to_fill > MAX_SECONDS_TO_SEND) {
|
||||||
|
@ -570,7 +570,7 @@ int send_work(
|
||||||
wu = ss.wu_results[i].workunit;
|
wu = ss.wu_results[i].workunit;
|
||||||
if (!wu_is_feasible(wu, reply.host)) {
|
if (!wu_is_feasible(wu, reply.host)) {
|
||||||
log_messages.printf(SchedMessages::DEBUG, "[HOST#%d] [WU#%d %s] WU is infeasible\n",
|
log_messages.printf(SchedMessages::DEBUG, "[HOST#%d] [WU#%d %s] WU is infeasible\n",
|
||||||
sreq.hostid, wu.id, wu.name);
|
reply.host.id, wu.id, wu.name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,9 +582,9 @@ int send_work(
|
||||||
);
|
);
|
||||||
if (retval) continue;
|
if (retval) continue;
|
||||||
|
|
||||||
log_messages.printf(SchedMessages::DEBUG,
|
log_messages.printf(SchedMessages::NORMAL,
|
||||||
"[HOST#%d] [RESULT#%d %s] sending result\n",
|
"[HOST#%d] Sending [RESULT#%d %s]\n",
|
||||||
sreq.hostid, result.id, result.name);
|
reply.host.id, result.id, result.name);
|
||||||
|
|
||||||
// copy the result so we don't overwrite its XML fields
|
// copy the result so we don't overwrite its XML fields
|
||||||
//
|
//
|
||||||
|
@ -608,13 +608,16 @@ int send_work(
|
||||||
if (nresults == MAX_WUS_TO_SEND) break;
|
if (nresults == MAX_WUS_TO_SEND) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_messages.printf(SchedMessages::DEBUG, "[HOST#%d] sending %d results\n",
|
log_messages.printf(SchedMessages::DEBUG, "[HOST#%d] Sent %d results\n",
|
||||||
sreq.hostid, nresults);
|
reply.host.id, nresults);
|
||||||
|
|
||||||
if (nresults == 0) {
|
if (nresults == 0) {
|
||||||
strcpy(reply.message, "no work available");
|
strcpy(reply.message, "no work available");
|
||||||
strcpy(reply.message_priority, "low");
|
strcpy(reply.message_priority, "low");
|
||||||
reply.request_delay = 10;
|
reply.request_delay = 10;
|
||||||
|
|
||||||
|
log_messages.printf(SchedMessages::NORMAL, "[HOST#%d] No work available\n",
|
||||||
|
reply.host.id);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -683,7 +686,7 @@ bool wrong_major_version(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
|
||||||
strcpy(reply.message_priority, "low");
|
strcpy(reply.message_priority, "low");
|
||||||
log_messages.printf(SchedMessages::NORMAL,
|
log_messages.printf(SchedMessages::NORMAL,
|
||||||
"[HOST#%d] Wrong major version '%s' from user: wanted %d, got %d\n",
|
"[HOST#%d] Wrong major version '%s' from user: wanted %d, got %d\n",
|
||||||
sreq.hostid,
|
reply.host.id,
|
||||||
sreq.authenticator, MAJOR_VERSION, sreq.core_client_major_version);
|
sreq.authenticator, MAJOR_VERSION, sreq.core_client_major_version);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -696,7 +699,6 @@ void process_request(
|
||||||
) {
|
) {
|
||||||
PLATFORM* platform;
|
PLATFORM* platform;
|
||||||
int retval;
|
int retval;
|
||||||
char buf[256];
|
|
||||||
|
|
||||||
// if different major version of BOINC, just send a message
|
// if different major version of BOINC, just send a message
|
||||||
//
|
//
|
||||||
|
@ -711,12 +713,10 @@ void process_request(
|
||||||
//
|
//
|
||||||
platform = ss.lookup_platform(sreq.platform_name);
|
platform = ss.lookup_platform(sreq.platform_name);
|
||||||
if (!platform) {
|
if (!platform) {
|
||||||
sprintf(buf, "[HOST#%d] platform [%s] not found\n",
|
sprintf(reply.message, "platform '%s' not found\n", sreq.platform_name);
|
||||||
sreq.hostid,
|
|
||||||
sreq.platform_name);
|
|
||||||
strcpy(reply.message, buf);
|
|
||||||
strcpy(reply.message_priority, "low");
|
strcpy(reply.message_priority, "low");
|
||||||
log_messages.printf(SchedMessages::NORMAL, buf);
|
log_messages.printf(SchedMessages::CRITICAL, "[HOST#%d] platform '%s' not found\n",
|
||||||
|
reply.host.id, sreq.platform_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue